Wednesday, December 26, 2018

Source Start Date from Project Record to a Custom Record

This article whill show how to create a client script that will source the Start Date from Project Record.


1. Create a new client script. Customization > Scripting > Scripts > New > Client
2. Enter information needed on the Basic Information:
     Name: (name of your script)
     Scripts > Script : Upload the sample script Below.
     Field Changed Function: sourceDate
     Deployments > Applies to: Your Custom Record
                   Deployed: Yes
                   Status: Released
    Save


Sample Script:


function sourceDate(type, name){
    if (name == 'projectfieldid) {//projectfieldid is the id of the field that is referencing to the proj'ect record
    var sDate = nlapiLookupField('job',nlapiGetFieldValue(projectfieldid), 'startdate');
    
nlapiSetFieldValue(fielddateid, sDate);//fielddateid is the id of the date field 
   }
}


Alternate solution for Enhancement 227268

No comments:

Post a Comment