简体   繁体   中英

SuiteScript: how to have a custom data field to load infomation from database

I use suitescript user event to add tab and some field belong to that tab when open a sale order. However, whenever I save the the information in that field, I can't see the information I manually input and save when i go back to that document. It seems like I miss the step loading data for custom field. Any suggestion on how to fix that problem? Thanks!!!

The normal way to do this is to create a customized form, rather than writing SuiteScript.

Have you looked at the field APIs? I would try nlapiGetFieldValue().

You are creating a fields dynamically using script. You should be aware that the information on these fields will not be saved because you created it using a script unless you get the value of this dynamically created field and put it to an existing standard or custom field before you submit the record to capture the information. As for viewing the record you need to get the value from the standard or custom field and set that as default value of your dynamically created field.

I am not sure why you need to create the field dynamically if you can create a custom field.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM