Using SET_ITEM_INSTANCE_PROPERTY ('block.button', CURRENT_RECORD, VISUAL_ATTRIBUTE, 'QMS$BLACK_ON_YELLOW') do not change the apparence of the button. Tried also other QMS visual attribute, same thing !
Any idea ?
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 !
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.