This is a very useful tip shared with us by “Kavitha Devarajan” known as “Kavi” to us.
==================================================================
Requirement:
Disable the Button if user has ‘Junior Sales Representatives’ responsibility assigned to him.
Thoughts/Assumptions:
This requirement is quite different for me, since every time we configure enable and disable button functionalities based on Position Names.
We have a button called as “create Quote” with method name as “CreateQuote” on Quote list applet based on Quote BC. We would like to enable/disable this button conditionally according to above given requirement.
Solution:
- In Quote BC, create Calculated Field with following details:
Name: ResponsibilityFound
Calculated Value:IIf(InList(“Junior Sales Representatives”,GetProfileAttrAsList(“User Responsibilities”))). - Write Script on Quote List Applet
if (MethodName == “CreateQuote” && this.BusComp().GetFieldValue(“ResponsibilityFound “) == “Y” )
{
CanInvoke = “FALSE”;
return( CancelOperation );
}
Explanation:
In the above expression, ‘User Responsibilities’ is a MVF field in “Personalization Profile” BC. The Link is based on Responsibility/Personalization Profile BCs. This field stores the List of Responsibilities assigned to the user of Siebel Application.
GetProfileAttrAsList(“User Responsibilities”) returns the MVG Value as a comma separated list.
From this list of responsibilities, required Responsibility Name is checked using ‘InList’ function.
InList function accepts 2 arguments.
- A string which is to searched.
- A comma separated from which the string should be searched.
In our case we are searching for “Junior Sales Representatives” from a comma separated list of responsibilities returned by GetProfileAttrAsList.
Hope this helps…!!
Thanks Kavi


(8 votes, average: 4.13 out of 5)