Here, we can have list of the sales order item with quantity and the item fulfillment items with their quantity. We need to compare the items and set the sales order quantity in the item fulfillment object list based on item line number. So, first we need to get the sales order line items as… Continue reading Compare two objects in the script
Tag: script
Replace email template value using script
First render the email template using the internal id. Then get the subject and body details of the email. Then replace the word using the replace method(). // set email template let readyMergemail = render.mergeEmail({ templateId: tempalte internal id; … Continue reading Replace email template value using script
How to pass our object to render method in script and access in the PDF template
Here we can pass an object to render method to print the PDF . // Load the item fulfillment record let itemFulfillmentRecord = record.load({ type: ‘itemfulfillment’, … Continue reading How to pass our object to render method in script and access in the PDF template
Get the address sub record from the field.
The getSubrecord() method is used to get the address book fields from a specific field subrecord. The script code is used as below. let subRec = record.getSubrecord({ // Here the record must be the record obj of the required record fieldId: ‘billingaddress’ … Continue reading Get the address sub record from the field.
How to create a table using html in script
We can use the HTML elements to create a table in the script. We can use the script values as table data. Here the data as the objets. try { let tableHtml = ‘<br><br><table style=”border-collapse: collapse; border=1″><tbody>’; tableHtml +=… Continue reading How to create a table using html in script
Create custom records using recmach function in script
The word recmach is attached to the custom records id when the record is attached into another record. We can use this function to create custom records instead of using record.create function. So, the governance limit is controlled. newRecord.selectNewLine({ sublistId: ‘sublistid’ }); newRecord.setCurrentSublistValue({ … Continue reading Create custom records using recmach function in script
Proposal For New CA Warehouse default Script for Sale Orders
New CA Warehouse default Script for Sale Orders