Sunday, Jun. 25, 2017

PreDefault Value Vs PostDefault Value Vs Scripting

Written By:

|

November 2, 2012

|

Posted In:

In this article I will show you how the values are populated on the Siebel UI when we have predefault as well as post default value set on a field with scripting on Buscomp_NewRecord Event. ( In this example we are using the field  “Description” on the Activities Screen)

Say we have field properties set as :
1. PreDefault Value = Pre
2. PostDefault Value = Post
AND
we also have written a script on the BC_NewRecord called “Action” which sets the Field Description to a value called as “Script”

Sample screenshots are below:

Predefault_Postdefault1

Predefault_Postdefault0

Now let us try and create a new record on the Siebel UI.
1. When I press a New button on the Siebel UI, I see Description set as value of “Script”. It means that Setting a value in the Script overrides the PreDefault value set at Field Property Level.

Predefault_Postdefault2

2. If I remove this value and set it as blank and save the record, PostDefault Value is fired as shown below:

Predefault_Postdefault3

3. Now when a value “Post” is populated on the Description field, I set this value to Blank and again save this record. The Blank value is saved in the Database.

Predefault_Postdefault4

In the DB value is shown as (null)

Predefault_Postdefault5

4. Let’s say I create a NewRecord again, “Script” Value is set on the UI (as in point 1). Now I try overwrite the value with “(null)” and save the record. “(null)” is saved in the UI and as well as at the database.

Predefault_Postdefault6

5. Let’s say I create a NewRecord again, “Script” Value is set on the UI (as in point 1). Now I try overwrite the value by pressing Space button on the keyboard five times as shown below.

Predefault_Postdefault7

When I save the record, PostDefault Value is fired as shown below

Predefault_Postdefault8

Now I again overwrite the value “Post” with 5 Space characters on the UI in the Description Field, I see the Description Field set as Blank.

Predefault_Postdefault9

Notes:

1. BusComp_NewRecord – this event will be triggered when the record is first created, similar to the functionality of the PreDefault value.

2. BusComp_PreWriteRecord – Works similar to the functionality of the Post Default value but be sure that you check if the field is null before assigning a new value through script.

 



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