Integrations & ERP Custom Fields / Oracle NetSuite

Credit Memo Template/PDF scripts updates

Create a Folder to store PDFs for Credit Memos:  


  • This could be in the path of your preference. In my case I created one as follows: 

    • Documents > Files > SuiteScripts 

    • Folder Name = YAYPAY Credit Memo PDF 

    • Get the id.


Scripts Records for Credit Memo 

Delete

Note

To obtain the script files, please contact your onboarding specialist.


YP_MR_UpdateCMPdfs

YP_MR_UpdateCMPdfs.js

Script Type Name ID
Map/Reduce YP_MR_UpdateCMPdfs  customscript_yp_mr_updatedcmpdfs  

Script Parameters

Name ID Type List/Record Values
Credit Memo PDF Folder  custscript_yp_mrpdffolder  Free-Form Text 
Folder where the PDFs will be stored 
Credit Memo Array  custscript_yp_cmarray Free-Form Text 
Empty

Script Record for Map/Reduce 

1. Create a new script record 

    a. Customization > Scripting > Scripts > New 

        i. Upload the file YP_MR_UpdateCMPdfs .js without .txt extension 

            1. Set property Name = YP_MR_UpdateCMPdfs 

            2. Set property Id = _yp_mr_updatedcmpdfs 

            3. After the steps above save the record. 

        ii. Adding script Parameters 

            1. Sub-tab Parameters 

                a. Click on button ‘New Parameter’ 

                    i. Parameter ‘PDF Credit Memo Folder’ 

                        1. Label = Credit Memo PDF Folder 

                        2. Id = _yp_mrpdffolder 

                        3. Type = Free-Form Text 

                        4. Store Value = True 

                        5. Save 

                b. Click on button ‘New Parameter’ 

                    i. Parameter ‘PDF MR Script’

                        1. Label = Credit Memo Array 

                        2. Id = _yp_cmarray 

                        3. Type = Free-Form Text 

                        4. Store = true 

                        5. Save

        2. Save script record 

Script Deployments

Script  Applies to ID Log Level Execute AS Role Audience 
YP_MR_UpdateCMPdfs 
customdeploy_yp_mr_updatedcmpdfs  Debug Admin

All Roles 

All Employees

Other Properties:  

Status: Not Scheduled 

    1. Create scripts deployments for script ‘YP_MR_UpdateCMPdfs ’ 

        a. Go to script record and click the button ‘Deploy Script’ 

            i. Title = YP_MR_UpdateCMPdfs 

            ii. Id = _yp_mr_updatedcmpdfs

            iii. Execute as = Administrator 

           iv. Status = Not Scheduled (this could be ‘Testing’ if you just want to test this) 

            v. Go to sub-tab ‘Audience’ 

                    1. All Roles = true 

                    2. All Employees  = true

            vi. Go to sub-tab ‘Parameters’ 

                    1. Credit Memo PDF Folder = Id of the folder where the PF for Credit Memos will be stored 

                    2. Credit Memo Array = Empty 

            vii. Save




YP_UE_CreditMemoPDF 

YP_UE_CreditMemoPDF.js

Script Type

Name 

ID 

User Event

YP_UE_CreditMemoPDF 

customscript_yp_ue_creditmemopdf 

Script Parameters 

Name ID  Type List/Record  Value 
PDF Credit Memo Folder custscript_yp_pdffolder  Free-Form Text
Folder Id where the PDFs will be stored 
PDF MR Script  custscript_yp_creditmemomr List/Record  Script  Select the Map/Reduce script that will be executed 


    1. Create a new script record 

        a. Customization > Scripting > Scripts > New 

            i. Upload the file YP_UE_CreditMemoPDF.js

                1. Set property Name = YP_UE_CreditMemoPDF 

                2. Set property Id = _yp_ue_creditmemopdf

                3. After the steps above save the record. 

            ii. Adding script Parameters 

                1. Sub-tab Parameters 

                    a. Click on button ‘New Parameter’ 

                        i. Parameter ‘PDF Credit Memo Folder’

                            1. Label = PDF Credit Memo Folder 

                            2. Id = _yp_pdffolder 

                            3. Type = Free-Form Text 

                            4. Store Value = True 

                            5. Save

                    b. Click on button ‘New Parameter’ 

                        i. Parameter ‘PDF MR Script’ 

                            1. Label = PDF MR Script 

                            2. Id = _yp_creditmemomr 

                            3. Type = List/Record

                            4. List/Record = Script 

                            5. Store Value = true 

                            6. Save 

                2. Save script record


Reference image 1


Reference image 2


Script Deployments 

Script Applies to ID Log Level Execute AS Role Audience
YP_UE_CreditMemoPDF Credit Memo customdeploy_yp_ue_creditmemopdf Debug Admin

All Roles 

All Employees


YP_UE_CreditMemoPDF  Customer Payment customdeploy_yp_ue_cp_creditmemopdf Debug Admin

All Roles 

All Employees


YP_UE_CreditMemoPDF  Customer Refund customdeploy_yp_ue_cr_creditmemopdf  Debug Admin

All Roles 

All Employees


1. Create scripts deployments for script ‘YP_UE_CreditMemoPDF’ 

    a. Deployment for Credit Memo 

        i. Go to script record and click button ‘Deploy Script’ 

        ii. Applies to = ‘Credit Memo’ 

        iii. Id = _yp_ue_creditmemopdf 

        iv. Execute as = ‘Administrator’ 

        v. Status = Released (this could be ‘Testing’ if you just want to test this) 

        vi. Go to sub-tab ‘Audience’ 

                1. All Roles = true 

                2. All Employees  = true 

        vii. Go to sub-tab ‘Parameters’ 

                1. PDF Credit Memo Folder = Id of the folder where the PDF for Credit Memos will be stored

                2. PDF MR Script = YP_MR_UpdateCMPdfs 

        viii. Save 

    b. Deployment for Customer Payment 

            i. Go to script record and click button ‘Deploy Script’ 

            ii. Applies to = ‘Customer Payment’

            iii. Id = _yp_ue_cp_creditmemopdf 

            iv. Execute as = ‘Administrator’

            v. Status = Released (this could be ‘Testing’ if you just want to test this) 

            vi. Go to sub-tab ‘Audience’ 

                    1. All Roles = true

                    2. All Employees  = true 

            vii. Go to sub-tab ‘Parameters’ 

                    1. PDF Credit Memo Folder = Id of the folder where the PDF for Credit Memos will be stored 

                    2. PDF MR Script = YP_MR_UpdateCMPdfs 

            viii. Save

    c. Deployment for Customer Refund 

            i. Go to script record and click button ‘Deploy Script’ 

            ii. Applies to = ‘Customer Refund 

            iii. Id = _yp_ue_cr_creditmemopdf 

            iv. Execute as = ‘Administrator’

            v. Status = Released (this could be ‘Testing’ if you just want to test this) 

            vi. Go to sub-tab ‘Audience’ 

                1. All Roles = true 

                2. All Employees  = true 

            vii. Go to sub-tab ‘Parameters’

                1. PDF Credit Memo Folder = Id of the folder where the PDF for Credit Memos will be stored 

                2. PDF MR Script = YP_MR_UpdateCMPdfs 

            viii. Save 


Credit Memo Script Deployment  



Customer Payment Script Deployment  



Customer Refund Script Deployment  


YP_MR_InitCreateCreditMemoPdfs

YP_MR_InitCreateCreditMemoPdfs.js

Script Type Name ID
Map/Reduce YP_MR_InitCreateCreditMemoPdfs  customscript_yp_mr_initcreatecmpdfs  

 Script Parameters

Name ID Type List/Record Values
Init Credit Memo PDF Folder custscript_yp_cmfolder Free-Form Text 
Folder where the PDFs will be stored 

Script Record for Map/Reduce

 1. Create a new script record:

        a. Customization > Scripting > Scripts > New

            i. Upload the file YP_MR_InitCreateCreditMemoPDFs.js without .txt extension

                1. Set property Name = YP_MR_InitCreateCreditMemoPDFs

                2. Set property Id = _yp_mr_initcreatecmpdf

                3. After the steps above save the record

            ii. Adding script Parameters

                1. Sub-tab Parameters

                    a. Click on button ‘New Parameter’

                        i. Parameter ‘Init Credit Memo PDF’

                            1. Label = Init Credit Memo PDF 

                            2. Id = _yp_cmfolder 

                            3. Type = Free-Form Text 

                            4. Store Value = True 

                            5. Save

                2. Save script record 


Script Record  

Script Parameter


Script Deployment

  • Go to the script record of ‘YP_MR_InitCreateCreditMemoPdfs’ 

    - Click Deployment button 

    • Set Properties 
      • Title: YP_MR_InitCreateCreditMemoPdfs 
      • Id: _yp_mr_initcreatecmpdfs 
    • Adding script Parameters value
      • Sub-tab Parameters 
        • Add the id of the folder where the PDfs for credit memos will be saved 


Script parameter on the deployment 


Go to the script record of ‘YP_MR_InitCreateCreditMemoPdfs’  - click Edit  -  click Save and Execute


Custom Fields

Name ID Type List/Record Values
YP Credit Memo PDF  custbody_yp_pdfcm Free-Form Text
Will store the internal id of the pdf created  

How to create the ‘YP Credit Memo PDF’ custom field? 

- Go to Customization > List, Records & Fields > Transaction Body Fields > New:

  • Set Properties
    • Label = YP Credit Memo PDF
    • Id = _yp_pdfcm
    • Type = Free-Form Text
    • Store Value = true
    • Sub-tab ‘Applies to’ 
      • Sale
    • Sub-tab ‘Display’
      • Subtab = Sales (this is optional) 
  • You can apply this field to the transaction forms you need.



Net Suite - PDF “CreditMemo” folder

The description of how to check the location of the credit memo PDF folder in NetSuite.

Pre-requirement:

Verify scripts are installed - see above.

Description:

  1. Log in to NetSuite.

  2. Go to “Documents” > “Files” > “Suite scripts” 

  3. Go to the folder > “YAYPAY Credit Memo PDF” 

  4. Check - The folder is not empty and includes PDF files of Credit Memo. 

In the list above you can see already created PDFs by the initial script - “YP_UE_CreditMemoPDF“.





Can't find what you need?

Contact our support team support@yaypay.com for help.