Netsuite Custom GL Plugin map standard line to transaction line - netsuite

I am working on a custom GL plugin for netsuite. Our setup is we have a classfication that has an income refund acct and an asset refund acct on it.
When looping through the standard lines, I need to know be able to map it to the transaction lines so that I can know if the tran item line that created this GL line's asset account and income account.
Is there a way to A) get the item that created the GL impact line or B) re-create somehow what the GL impact will be from a script? This way I can loop through the "what will be gl lines" and add back to an account and withdrawal from a different account.
Is there a way to do this with a custom column on the Credit Memo? When looping through the GL Impact I cannot access the custom column data :(

If you have access to suite analytics, you can use transactionaccountingline to look at the accounting impact of each transaction.

Related

Search payment records information in Netsuite using Suitelet

Need to get payment data from Transaction >> Payable >> Pay single vendor form and create a data file. This has been done with an eventscript (add button), a clientscript and a Suitelet by searching currentRecord data from client script to Suitelet and generated a file. However, searching Transaction record type could not get payer payment department and cost center data as I know. So any advice and recommendation from Netsuite experts on how can get these payer data from Netsuite with the existing Transaction information on the Bill Payment form, like payment check number, entity id, transaction number, etc ?
When using the N/search module the following 3 tools are invaluable for retrieving data from netsuite transactions.
Netsuite records browser (shows all of the fields, available search filters, and joins ect.)
https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2020_1/script/record/vendorpayment.html
Another great tool is an extension called Netsuite Field Explorer developed by Michoel Chaikin
you can also turn on field ids in your account by navigating to Home->Set preferences->General tab->Set defaults->Show internal ids
(This will show the field id when you click on the field "What is this?" link directly on the record)
between the three you should be able to get everything you need to run a search and retrieve the data you are looking for.
Depending on your needs you can either search.create (return multiple records) or search.lookupfield(return a single record)

How to modify the Account field of GL Impact on the invoice page through suitescript?

According to different conditions, I need to modify the account field in GL Impact. I am still a novice. Who can tell me how to modify the GL Impact on the invoice page through suitescript? Greatful
Customization -> Plugins -> Plugin Implementations.
You will need to create a GL Plugin that will run on every submit event. You cannot change the existing GL lines as far as I know but you CAN "re-allocate them" by creating new lines that balance the book.
Here are a few URL extensions to articles on the help regarding how to create a script of this type:
/app/help/helpcenter.nl?fid=section_4072818715.html
/app/help/helpcenter.nl?fid=section_4072803104.html
/app/help/helpcenter.nl?fid=section_3989534344.html

Error while inserting Journal Transactions

I am trying to create a Journal Transaction of AR module from Shipment screen with new button, on this new button click, it should create Journal Transactions document with credit amount in one account and debit amount in one account, These two accounts are configured in shipment screen only. but am getting below error. I am passing Project and all the other mandatory field values from code.
Error: Inserting 'GL Transaction' record raised at least one error.
Please review the errors. Project is Required but was not specified. Account '40000' used in the GL Transaction is mapped to Project Account Group.
You need to either pass in the project from the shipment (if the journal transaction should hit the project) or pass in the default non project value.
for example if not setting the project from the shipment you can set your project field on the journal lines using the following:
myInTran.ProjectID = ProjectDefaultAttribute.NonProject();
If you are pulling the project from the shipment you need to set the journal tran lines for the ProjectID, TaskID, & CostCodeID fields.
Depending on the version of Acumatica you are using, you might not have CostCodeID. I think it was added in 2018R1.
If using the Non project value, the TaskID and CostCodeID are not required.

Unable to find a matching line for sublist apply with key:

We are seeing failure to Netsuite while updating payments via the netsuite API,
the error message we see is as below Unable to find a matching line for sublist apply with key: [doc,line] and value: [123344,null] where 123344 is the external id of the bill.
Any ideas what might be the cause of this?
Note that SuiteTalk will give you this cryptic little message when you try to create a payment for an invoice that already has an Invoice:Paid In Full transaction status.
Don't get me wrong—it's good that NetSuite has this sanity check. I just wish the error was more helpful.
"Unable to find a matching line for sublist apply with key: [doc,line] and value: [123344,null]"
There is your problem, you can't match a line if you are not passing the line number.
We had the same problem inserting new payments, but it worked using the Internal ID for the Invoice column.
Note that the mapping specification is not clear on how to identify the Invoice when adding/updating payments for it. The API requires an invoice, and it works when you provide the Internal ID for the invoice.
I get this error when creating a customer payment. Below is my code. Make sure invoiceId is invoice's internal id and amount is less than or equal to invoice amount.
CustomerPaymentApply paymentApply = new CustomerPaymentApply();
paymentApply.setAmount(amount);
paymentApply.setApply(true);
paymentApply.setDoc(Long.valueOf(invoiceId));
We were getting this error with the Chargebee-Netsuite integration. The solution was to open the corresponding Accounting Period in Netsuite and rerun the sync.
The first number [123344,null] is the Netsuite internal ID of the affected document. If you navigate to the document in Netsuite and it has a padlock this could be the reason:
Open the Accounting Period for the affected document and rerun the sync. Setup/accounting/manage accounting periods:

How can I map fields from Product to Order Product and Product to Quote Product in CRM 2011

can anybody please let me know how can I map field from Product to Order Product and Product to Quote Product in CRM 2011.
CRM doesnt allow us to direct map.
You can't map these using attribute mappings.
One way around this is to write plugins on the PreCreate so that at least when you save the record it populates the data on save.
For plugin reference, the Quote Product entity is called quotedetail and the Order Product entity is called salesorderdetail.
Another other way around this, if you only need it firing on the UI, is create some javascript that triggers during onload of the form and populates this data for you.
If you want a no code method you could fire a workflow on create of the Order/Quote product and populate the fields from the product using an update. Only downside to this is the workflow runs asynchronously so you cannot predict when this mapping data will hit the record.
Finally, if you want another no code way to achieve this, and you don't mind investing a little money in a Formula Rules Engine tool I'd recommend looking into Formula Manager by xRM Consultancy and North 52 (Link to Formula Manager). This allows you to set up formulas on both the UI and Server Side which would do all of this mapping for you.
If you want a no code method you could fire a workflow on create of the Order/Quote product and populate the fields from the product using an update. The only downside to this is the workflow runs asynchronously so you cannot predict when this mapping data will hit the record.

Resources