Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Magento Cash Sale Script
Hi,
We have moved our second site to Magento and using Celigo. The problem is Celigo will not create Cash Sales...So decided a script might do it.. again scripting is still new please could someone check this script?
I want to look at the Sales Order - Custom Tab -> Magento Payment Method if this is 'sagepaydirectpro' then to automatically create a cash sale with Payment Method 'Magento'.
function afterSubmit(type) { var itemDetails = nlapiSearchRecord('salesorder') //Check Sales Order Magento Payment Method// if (nlapiGetFieldText('custbody_celigo_magento_pay_meth')== 'sagepaydirectpro') var newId = nlapiGetRecordId(); var cashsale = nlapiCreateRecord('cashsale'); cashsale.setFieldValue('entity', newId ); cashsale.setLineItemValue('item', 'item', 1, 23); cashsale.setLineItemValue('item', 'quantity', 1, 1); cashsale.setFeildValue('paymentmethod', 'Magento'); var id = nlapiSubmitRecord(cashsale, true); } 0