This content has been marked as final. Show 4 replies
Open the form with forms builder and check if QMS$BLACK_ON_YELLOW is available as a visual attribute. If not, then the template you use to generate the form in designer might not contain that visual attribute and you have to add it there.
Check also the event where you want to change this property. Maybe the event has not yet occured and therefore the item is not changed.
Of course, I took the visual attribute from the form (I tested with many visual attribute that all are all available in the form). For the event, I tried when-new-form-instance, post query ...
Really, I do not understand !
Want to say that the same visual attribute works for a text field but not for a button !
Instead of the set_item_instance_property you could try the set_item_property. I also tried a form and I saw the set_item_instance_property is not working.
SET_ITEM_PROPERTY ('block.button', VISUAL_ATTRIBUTE, 'QMS$BLACK_ON_YELLOW')
You have a multi-record block so I asume you want different colors for the button with the record. If you use the set_item_property, all the buttons get a different color.