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

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:

Related

The record you are attempting to load has a different type: noninventoryitem from the type specified: serviceitem

I'm saving the vendor bill in NetSuite. and System give this error("The record you are attempting to load has a different type: noninventoryitem from the type specified: serviceitem.").
Can someone explain the what is the issue here and how I can fix this issue?
I have try to save many time but sysytem give same error and Im not able to save the bill from edit mode.
This could be due to customised scripts or workflows that apply to vendor bill which are for service item type only.
You can try goto Customisation > Scripted Record and then click view on Vendor Bill and see the list of scripts and workflows apply to bill.
Then try to disable one by one to find which one is causing the problem. Once you found the script/workflow that create the error, try to add a filter in the script/workflow to limit it to service item item type only.

Netsuite SS1 Cannot tell if inventory detail is set

I have a workflow script that transforms a sales order into an item fulfillment when the order is approved.
I can create a subrecord for inventory detail no problem, but in some cases Netsuite will automatically set the inventory detail. In these cases, when I go to add a subrecord, I receive an error on fulfillment submit record.
I have tried for 2 hours and cannot seem to find a way only to verify if the inventory detail is existing. I tried using the examples from the documentation
var invDetailSubrecord = fulfillment.editCurrentLineItemSubrecord('item', 'inventorydetail');
var invDetailSubrecord = fulfillment.viewCurrentLineItemSubrecord('item', 'inventorydetail');
fulfillment.removeCurrentLineItemSubrecord('item', 'inventorydetail');
None of the above commands do anything and are ignored. I don't see any way possible to verify that inventory detail is set before creating it. Viewing the actual data isn't necessary.
You can use nlapiGetLineItemCount on inventory-details subrecord(I am using the same in SuiteScript2.0 and it works) before setting/updating records manually and if you get line count greater than 0, you can safely assume inventory details already exists for the line.
You can check this out for further reading.

How to undo receive payment for invoice in quickbook desktop edition using qbfc sdk

I use QBFC v13 and asp.net with c#. I have create one invoice and paid some amount for this invoice, problem is that now i want to undo payment for this invoice.I try this but not working.
ITxnDel txnDelRq = RecPayrequestMsgSet.AppendTxnDelRq();
txnDelRq.TxnDelType.SetValue(ENTxnDelType.tdtReceivePayment);
txnDelRq.TxnID.SetValue(TxnId);
So if you look at the Exception, you can see that you're getting a response from QuickBooks, and it's an error:
Object 339-1507104811 specified in the request cannot be found.
What QuickBooks is telling you here is that, in your request, you referred to a specific object (the object with TxnID = 339-1507104811) and QuickBooks can not find this object.
That means one of two things. Either:
Somebody else already deleted the object
You're using an incorrect TxnID value
Did somebody else already delete the payment? You? Your program on a previous run?
Are you 100% positive you have the correct TxnID value? It should be from the ReceivePaymentAdd request you initially used to create the payment.

Amazon MWS Api usage

I am using "http://www.amazon.de/dp/{ASIN}" to get product info.
But after getting response it doesn't return product "SellerSKU"
Is there any way that I can get "SellerSKU" of a product specified by "ASIN"?
I also had same situation.
And I found that there is only some limited way to get it.
https://mws.amazonservices.com/FulfillmentInventory/2010-10-01?Action=ListInventorySupply
ListInventorySupply api of Fulfillment Inventory lists returns information about the availability of a seller's inventory.
Request parameter includes SellerSKUs, QueryStartDateTime, MarketplaceId, ResponseGroup
Here you can omit SellerSKUs, and you can pass QueryStartDateTime.
Then you will get InventorySupplyList including SellerSKU and ASIN matches.
You should find the product's SellerSKU in this list.
But the problem is that it returns only available inventory list.
It will not work when product you are finding is not in available inventory list.
In this case you should make the user manually add SellerSKU in your application.
For more information, please take a look at http://docs.developer.amazonservices.com/en_US/fba_inventory/FBAInventory_ListInventorySupply.html
Hope this would help you.

How to modify a Customer Refund in an After Submit User Event

After a new Customer Refund record is saved (After Submit user event) I need to communicate with an external web service and then update 2 fields in the record. When this code is executed to load the Customer Refund
var o = nlapiLoadRecord("customerrefund", 1906);
This error message is returned:
INVALID_TRANS_TYP
Transaction type specified is incorrect.
I found a list of supported records in the "Chapter 60 SuiteScript Supported Records" of SuiteScript Developer & Reference Guide which says the Customer Refund is only available in a server side script.
How should I go about updating the Customer Refund record?
Without seeing more code, it looks ok. I would double check that the internalId of 1906 is correct.
Also, if you're just submitting two fields, I would use nlapiSubmitField(), this will take less governance points and be quicker for NetSuite rather than nlapiLoadRecord / nlapiSubmitRecord.
Your code looks correct, if you are updating the current record I would recommend using below code to avoid incorrect internalid:
var o = nlapiLoadRecord("customerrefund", nlapiGetRecordId());
Also, I would recommend that if you need to update the fields, consider using before submit user event script on customer refund and you can update the fields using nlapiSetFieldValue(FIELD_ID, FIELD_VALUE). No need to submit the record in case of before submit.
If your script is deployed in the customer refund record, you can also do nlapiGetRecordType().

Resources