blog image

Control the read only property of BC Field from script

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:

calrofield1

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")

calrofield2 

Your Business Component User Property

calrofield3 

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 ! 

Before we begin: take a look at the processing of your personal data

If you visit a site that records cookies, a small text file will be created on your computer and stored in your browser. The next time you visit the same page, it will help you connect to the web faster. Our website will offer you relevant information and make it easier for you to work.

We mainly use cookies for anonymous traffic analysis and to improve our website. If you set your browser to block cookies, it is possible that the website will slow down and some parts of the website may not work completely correctly. More info on the processing of cookies.