ASKER
function FreightName()
{
//Create an array to set as the DataValue for the lookup control.
var lookupData = new Array();
//Create an Object add to the array.
var lookupItem= new Object();
//Set the id, typename, and name properties to the object.
lookupItem.id = '{16F711C2-5C9C-E411-8DC3-005056897092}';
lookupItem.typename = 'csc_lookup';
lookupItem.name = 'Collect';
// Add the object to the array.
lookupData[0] = lookupItem;
// Set the value of the lookup field to the value of the array.
Xrm.Page.getAttribute("csc_freightterm").setValue(lookupData);
}
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
ASKER
Open in new window