Control the read only property of BC Field from script
29. 1. 2018
This short block shows the possibility how can the read only property of a BC field be dynamically managed from a script in the Oracle Siebel CRM application. Our requirement is to have a BC field in the UI always read only. We but need to set this same field in the background from a script or workflow. We will show how can be this achieved by not cloning BC or the field, just by configuration and scripting.
BC Field Read Only Field easy workaround for Scripts.
If you set Field Read Only Field Business Component User Property, Scripts (BusComp Server Scripts etc) will also not be able to update the field.
There are several workarounds, we used an easy one that we want to share.
First Create a Calculated Field:
Leave Calculated Value empty! And check Immediate Post Changes
Add it to your own calculated field that you use in your Business Component User Prop
For example, with this
IIF ([Script Write Calc] IS NOT NULL), "N", "Y")
Your Business Component User Property
And in your Script:
Before you will change the Read Only Field:
this.SetFieldValue("Script Write Calc","N");
After you finish your changes
this.SetFieldValue("Script Write Calc","");
Hope you find this helpful and it helps you achieve the requirement in you Siebel Oracle CRM application !
Späť na Blog