Discussions
Streamline Invoice Processing with AI-Powered Automation
Use AI-Driven Insights for Faster, Better Planning and Forecasting
"paypaltranid" is not available on the cashsale record?
I'm trying to get PayPal transaction ID and PayPal Status in Cash Sale afterSubmit trigger (server side SuiteScript). For some reason getFieldValue() returns null for both of them, while I can clearly see in the UI that they are definitely not nulls. Am I missing something?
function afterSaveCashSale(type)
{
/* process new Cash Sales only */
if (type.toLowerCase() != 'create') return;
var logSubject = '';
var logDetails = '';
try
{
/* check that record type is cashsale */
var newRec = nlapiGetNewRecord();
var recType = newRec.getRecordType();
if (recType.toLowerCase() != 'cashsale')
{
logSubject = 'Incorrect script deployment';
logDetails = 'afterSaveCashSale is associated with record type: ' + recType.toString();
nlapiLogExecution('ERROR', logSubject, logDetails);