Saturday, Jun. 24, 2017

Conditionally Auto update a Field on a NewRecord

Written By:

|

December 8, 2012

|

Posted In:

Requirement:

The requirement is to conditionally auto update a field on a new record creation, for e.g. in Activities I create a New Record and as soon as Activity Status field is set to a value as ‘Alerted’, then the Comment field on Activities should be immediately stamped with a value as ‘Alert Sent to User’.
Moreover, comment field should not be set when Activity “Status” field is set to other values such as “Not Started”, “Sent”, “Planned”, “Quoted” and on the existing Activity records.

Solution:

To implement this requirement, follow the configuration steps as below.

1. In Siebel Tools, go to the Action BC, Edit Server Scripts and in BusComp_NewRecord, write a line of code to declare a profile attribute as below:

autoupdate1

2. In the Action BC, Edit Server Scripts and in BusComp_PreSetFieldValue event, write the code as shown below:

autoupdate2

3. Go to Action BC, Query for the field called Status and set the Property “Immediate Post Changes” = TRUE as shown below:

autoupdate3

4. Compile the Action BC and launch the Siebel Client Application.

Now when you create a NewRecord and as soon as set the Status as “Alerted” on this New record, Comment will be immediately stamped as “Alert Sent to User”

Notes:

In order to confine step 1 to a particular view, you can also try and use TheApplication().ActiveViewName() vanilla function.



Share This Article

About Author

Gurdeep

Hi, I am sharing my experience to alleviate beginners with open UI and HI version of Siebel CRM. I work in Sun Life Financials and can be reached via IT Tool box as well. Thanks.

Comments are closed.

Leave A Reply