Monday, January 7, 2019

How to create a Custom Button to create a Case Record from a Sales Order where the Company field is pre-populated?

Question: How to create a Custom Button to create a Case Record from a Sales Order where the Company field is pre-populated

Answer:

Create a User Event Script that has this before load event:

function createNewCaseButton(type, form){
  form.addButton('custpage_close_button', 'Create New Case', 'javascript:document.location=\'/app/crm/support/supportcase.nl?pi=' + nlapiGetRecordId() + '&pr=-30&default=' + nlapiGetFieldValue('entity')+ '\'');
}

No comments:

Post a Comment