I have a custom form with 2 fields.
FieldB becomes required when YY is chosen.
I am able to make fieldB as required, but I am not able to get proper color(yellow).
to achieve this I created a visual group and assigned that to fieldB in runtime using below code:
The background color of DATA_REQUIRED1 is r100g100b55. But still I am not able to find the exact yellow that is used for other required field in APPS, my yellow(r100g100b55) is little bit brighter.
Please let me know how to get the visual_attribute of mandatory fields, and assign them in FIELDB.
Note: the entry in registry.dat is:
app.ui.requiredFieldVABGColor=255,0,0(not sure what it means)
Use the following code in your List (When list changed trigger)
IF :list_value = 'XX' THEN
SET_ITEM_INSTANCE_PROPERTY('B',CURRENT_RECORD,VISUAL_ATTRIBUTE,'YOUR VISUAL ATTRIBUTE');
ELSIF :list_value = 'YY' THEN
SET_ITEM_INSTANCE_PROPERTY('B',CURRENT_RECORD,VISUAL_ATTRIBUTE,'YOUR DEFAULT VISUAL ATTRIBUTE');
And if you have problem with making a field required or not then...
You have to set the property in both 'B' field WHEN VALIDATE ITEM and your list's WHEN LIST CHANGED trigger...
Hope this will help you...
The Trigger is firing perfectly, I have checked with other colors.
The functionality is working, the issue is with color matching.
Is there any way I can get the visual_attribute of other required feilds and use that in fieldB using set_item_instance_property
I used the below to check
it returns null.