Jump to content
Sign in to follow this  
mikedr

Forcing button on layout to "update"

Recommended Posts

I'm using a "does nothing" button as a status indicator.  Basically, if the value of a given related record field is zero, the button is hidden, and if the value is one, the button is not hidden.  I specify this under "Hide object when" under the button's behavior.

 

I noticed that when I browse to a particular record in the layout, the button displays OK.  However, if I change the value of the related record field, the button does not automatically change state.  I.e., if the value is 0, and I change it to 1, the button does not display automatically, and similarly, if the value is 1 and I change it to 0, the button does not hide automatically.

 

If I browse to a different record and browse back to the record, then all is well again, and the button is shown or is hidden properly.

 

So, the issue seems to be that the button is not checking its status when the related record field value has changed.  Is there any way to "force" this? 

 

More specifics, if it's important.  The related record is selected by name field, via a drop-down menu, in the layout in question.  The related record has a numeric field that is 0 or 1.  If I change the related record by selecting a different name field, and if the new related record has a different value for the numeric field, the button doesn't change. 

 

Interestingly, I have a popover in the layout that lets the numeric field be changed.  If for a given related record I change the numeric field in the layout, the button *is* displayed/hidden appropriately.  But if I change which record is related, then no dice!

 

 

Share this post


Link to post
Share on other sites

Figured it out!!!  Turns out I had the wrong instance of the primary table being displayed in the layout . . . Once I fixed that, it works as expected.

 

I did add a script trigger to commit the record when exiting the field in question, so if you change the name field of the related record, it commits the record so the button is updated accordingly.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.