How can bypass the credit limit while creating invoice or saleorder in Netsuite using SuiteTalk Webservice?

1.2k Views Asked by At

I am using Netsuite SuiteTalk web service since 3-4 months I felt comfortable to use it. now, i have issues i want to create saleorder/invoice in netsuite using SuiteTalk but i am unable to do that because everytime i am getting error of credit limit i.e customer invoice amount is more than their credit limit. it's O.K, but as long as i am sending payments too with the same webservice request.

I would appreciate if someone or Netsuite people can help me to bypass credit limit while creating invoice.

please have a look suitetalk c# code.

    Invoice inv = new Invoice();
    inv.entity = new RecordRef() { internalId = 25, type = RecordType.customer, typeSpecified = true };
    inv.tranDate = new DateTime(2018,9,18);
    inv.memo = "Test Memo";

    inv.department = new RecordRef() { internalId = 10, type = RecordType.department, typeSpecified = true };
    inv.location = new RecordRef() { internalId = 16, type = RecordType.location, typeSpecified = true };


     InvoiceItemList itemList = new InvoiceItemList();

     InvoiceItem[] items = new InvoiceItem[1];

     // invoice items
     InvoiceItem item = new InvoiceItem();
     item.item = new RecordRef() { internalId = 12510 };
     item.rate = 2.65;
     item.amount = 265.00;                    
     item.quantity = 100;

     items[0] = item;                

     itemList.item = items;
     inv.itemList = itemList;


     inv.amountPaid = 180;
     inv.amountPaidSpecified = true;

     inv.onCreditHold = "true";

     WriteResponse writeRes = ns.Service.add(inv);
2

There are 2 best solutions below

0
On BEST ANSWER

I have found the best solution, in order to avoid credit limit while creating invoice we can create Payment as PaymentItem and then we need to add in invoice.

1
On

Try below solution

  1. Go to -> Setup -> Accounting -> Accounting Preferences
  2. In General tab account Receivable section
  3. See that CUSTOMER CREDIT LIMIT HANDLING field. choose appropriate value based on your situation.

enter image description here

  1. Ignore – Select this method to allow sales orders and invoices to be entered without a warning for a customer that is at or above their credit limit.
  2. Warn Only – Select this method to generate a warning when a sales order or invoice is being entered that puts the customer at or above their credit limit. You can choose to enter or cancel the transaction once the warning has appeared.
  3. Enforce Holds – Select this method to block the entry of a sales order or invoice that puts the customer at or above their credit limit. This method also blocks the addition of items to existing orders for customers at or above their credit limit.