Thursday, May 16, 2019

How to trigger client side script on Assembly Item record

While it is possible to deploy and trigger User Event scripts on Build/Assembly Item records, the same record type is not available for Client Script deployment.

There is an existing Enhancement request for this: #144796.

Alternatively, it can be achieved using Custom Transaction Form scripting with this procedure:
1) Navigate to Customization > Forms > Entry Forms
2) Customize "Standard Group Item Form"
3) Select Custom Code subtab, choose a client side script and its functions

As the script gets executed on all Group Item types (not only Assembly Items), it needs to check for the correct item type with nlapiGetRecordType(). For example:

function gritem_PageInit(type){

 if (nlapiGetRecordType() == 'assemblyitem') {

  alert('Assembly Item - pageInit()');



No comments:

Post a Comment