Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Setting field value in BeforeLoad having no effect
It's been a long day and I'm feeling a little loopy, but I'm pretty sure if I set the value of a field in a BeforeLoad script I should see the value when the record is displayed, no?
From the help:
3. The database loads the requested information into the application server for processing. This is where the before load operation occurs – before the requested data is returned to the client.
4. The client receives the now validated/processed before load data
The code:
function OnBeforeSubmit(type) { if(type == RECORD_STATE.DELETE) { return; } SyncFields(); } function OnBeforeLoad(type) { SyncFields(); } function SyncFields() { var physOrder = nlapiGetNewRecord(); log('processing Physician's Order ' + physOrder.getId()); physOrder.setFieldValue('custrecord_physorder_length_of_need', 99); }
Steve Klett | Senior Developer
NetValue Technology