Thursday, Oct. 19, 2017

Automatically prefix Comments field with current date

Written By:

|

August 18, 2012

|

Posted In:

Requirement:

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

Solution:

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

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