NetSuite Sublist/child record does not update/refresh in edit mode

房东的猫 提交于 2019-12-23 05:33:06

问题


If the form I am on is in edit mode, and I add items to the sublist (A child custom record) via my suitescript I can not get the list that is visible to the customer to refresh/update.

I have attempted to use the following command, but then found that it only works on a static / read only list.

// Refresh the package contents list
nlapiRefreshLineItems('recmachcustrecord_myCustomRecord');

Is there a way to force a sublist/child record to update its view when the parent transaction form is in edit mode?

On my form I have clicked my "Do Something" button which is to create child records. After the records are created the transaction form does not update the sublist. When I exit edit mode the form then realizes the new lines and displays them.

Thank you,


回答1:


You may have other fields on the record that are not saved yet.

In order to do what you want you'd have to save the record and reopen it with your script.

Here is an example from Netsuite help of saving and reopening a record:

try
{
//committing the phone call record to the database
  var callId = nlapiSubmitRecord(call, true);
  nlapiLogExecution('DEBUG', 'call record created successfully', 'ID = ' + callId);

  //Redirect the user to the newly created phone call
  nlapiSetRedirectURL('RECORD', 'phonecall', callId, false, null); 
}
catch (e)
{
  nlapiLogExecution('ERROR', e.getCode(), e.getDetails());
}


来源:https://stackoverflow.com/questions/21858783/netsuite-sublist-child-record-does-not-update-refresh-in-edit-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!