Jump to content

Forcing button on layout to "update"


This topic is 2046 days old. Please don't post here. Open a new topic instead.

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!

 

 

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.

Link to post
Share on other sites

This topic is 2046 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

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