Thursday, Jan. 18, 2018

Automatically prefix Comments field with current date

Written By:


August 18, 2012


Posted In:


Implement a requirement to automatically prefix Comments field with current date in a BC.


To implement a solution for this requirement add the below lines of code the buscomp to prefix the entered value with todays date.

function BusComp_SetFieldValue (FieldName)
if (FieldName == “Comment”)                            //Check the Comments Field in the buscomp
var now = new Date();                                      // build date string
var nowstr = now.getDate() + “/” + (now.getMonth() + 1) +”/” + now.getFullYear();          // build date string
this.SetFieldValue(“Comment”, nowstr + ” ” + this.GetFieldValue(“Comment”) );  // update comment field

Share This Article

About Author


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