Vishnu (regular reader of SiebelMantra) asked me to put a post regarding making a field read only when some other field get set to some specific value. So this post is dedicated to you Vishnu.
Some might of you already know which User Property I am talking about. This is BusComp User Property : "Field Read Only Field".
Some might of you already know which User Property I am talking about. This is BusComp User Property : "Field Read Only Field".
Purpose :
This is a field user property which makes a field read only on the applet, depending upon the value of some other field.
Lets take an example and try to configure it. Suppose, on Opportunity business Component, there are two fields : a) Sales Stage b) Revenue. The requirement is as soon as "Sales Stage" = "Lost", user is not allowed to make any more change in "Revenue" field.
Lets how we can achieve this :
Lets take an example and try to configure it. Suppose, on Opportunity business Component, there are two fields : a) Sales Stage b) Revenue. The requirement is as soon as "Sales Stage" = "Lost", user is not allowed to make any more change in "Revenue" field.
Lets how we can achieve this :
1. Create a calculated field:
Name = Revenue Read Only CalcCalculated = TRUECalculated Value = iif([Sales Stage] = "Lost", "Y", "N")
2. Create one User Property at Opportunity Business Component :
Name = Field Read Only Field: RevenueValue = Revenue Read Only Calc
That's it !! Compile the Opportunity Business Component and try to change the value of Sales Stage on the UI.
You can play with the Calculated expression to test some more scenarios using AND, OR clause.
A lot of the Buscomp user properties are available only to certain base classes. Users should check bookshelf prior to using them.
ReplyDeleteAlso if it is not working make sure that the Admin Mode Flag is not Checked on the View the BC is on. I ran into this problem.
ReplyDeleteIs thr a way to make field readonly in Admin Mode?
DeleteWhen the field became read-only by that user property, a script can still alter the value of the field?
ReplyDeleteNope!!
Delete