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!
Default Income Account on Invoice, depending on Customer
Hello everybody,
I made a script, but it does not do anything.
Basically, it should set default income account on invoices for Customers that have a particular custom field value on them.
It needs to be executed on the custom Invoice form.
function validateDefaultAccount(type, name)
{
var customer = nlapiGetFieldValue('entity')
if(customer.nlapiGetFieldValue('custentity4') == 'Intercompany')
{
nlapiSetFieldValue('account', 216,true);
}
return true;
}
Could you tell me what am I doing wrong?
Thank you
Regards
IGor