Hello! I need to change GL impact, according to cu...
# suitescript
b
Hello! I need to change GL impact, according to customer category. I need to change account number when customer category is for foreign customers... Does anybody have some example script? Or advice how to start with this task...
s
You would generally use a SuiteGL (Custom GL Lines) Plug-in script to achieve this. This PDF should help you get started (it includes examples as well): https://docs.oracle.com/cloud/latest/netsuitecs_gs/NSCGL/NSCGL.pdf
b
Thank you. How to approach customer category in script? In function cusomizeGlIpact parameters are transactionRecord, standarsLines, customLines and book
b
As an alternative, depending on which gl impact you want modified, you may want to setup the transaction correctly so that the correct accounts are impacted. You may be able to do something simple like change the account fields on payments to point to the correct account
b
I want to modified on invoice. When I choose customer (which category can be domestic, foreign, etc) then in gl impact depending on customer category I want to change account
s
The simplest way would be to use the entity field from the transactionRecord, then search on that as the customer internal id to get customer category (or whatever fields will help you determine if the customer is foreign or not).
b
Thank you!