Search code examples
suitescriptsuitescript2.0

how to get navigated to a custom record from a button with some field sourced?(suitescript 2.0)


i m doing this in my Client script which is being called by the function of UE script button.

 var createEstimatorURL = url.resolveRecord({
   recordType: 'customrecord_awt_estimator_hdr',
   recordId: '',
   isEditMode: true,
   params: {
    'project': project,
    'customer': customer,
    'createdBy': createdBy,
    'projectStatus': projectStatus,
    'subsid': subsid,
    'awtEstRef': awtEstRef
  }
});

After getting the URL from resolve record, I m doing newWindow = window.open(createEstimatorURL); The record is getting opened in create mode (not saved yet), but how to source the fields that I sent as params? please help


Solution

  • They are in the request parameters of your context on the new page that opens. You can use this bit context.request.parameters['*'], where * is the name of your parameter, to get them.