Counter Sales - Credit Hold message when customer is not on Credit hold

Ran into this issue with Counter Sales:

  1. I’m getting:a Customer on Credit Hold warning when they are not
  2. A server side error message shows when Create Invoice is selected

If Create Invoice Is unchecked:

  1. I get the Credit Hold message:
    image
    I select YES

  2. New Pack Slip message appears

  3. The “Print Packing Slip/Labels” form appears

  4. I submit the report and close the Print window

  5. Focus returns to the Order Entry window, and it updates to show the order is closed.

If Create Invoice Is NOT checked:

  1. I get the Credit Hold message:
    image
    I select YES

  2. I get the following server side message:
    image

with the details being

Details
Server Side Exception

A server error occurred. Review the server event logs for details.

Exception caught in: Epicor.ServiceModel

Error Detail 
============
Description:  A server error occurred. Review the server event logs for details.
Program:  Epicor.System.dll
Method:  ProvideFault
Line Number:  32
Column Number:  13
Server Trace Stack:     at Epicor.Hosting.Wcf.ErrorHandler.ProvideFault(Exception error, MessageVersion version, Message& fault) in C:\_Releases\ICE\ICE3.2.300.23\Source\Framework\Epicor.System\Hosting\Wcf\ErrorHandler.cs:line 32
   at System.ServiceModel.Dispatcher.ErrorBehavior.ProvideFault(Exception e, FaultConverter faultConverter, ErrorHandlerFaultInfo& faultInfo)
...
  1. Event Viewer on the App Server shows:
    image
System.Data.Entity.Core.UpdateException: An error occurred while updating the entries. See the inner exception for details. ---> System.Data.SqlClient.SqlException: String or binary data would be truncated.
  1. After closing the Server Side Error message, neither the popup stating the Packer was created, nor the “Print Packing Slip/Labels” form appear.

  2. Focus returns to the Order Entry window, and it updates to show the order is closed (both create Packer and Create Invoice are checked).

  3. I open that order with Order Tracker, and it finds the Shipment, but not the invoice.

The fact that it is successful when Create Invoice is NOT selected, makes me think it is something with making the invoice. But the fact that neither the message that a Packer was created, nor the Print Packer window show, makes me think it is something prior to the invoice creation.

That exception you are getting is generally because the field size in the DB is smaller than what the datamodel allows for. This can happen in a number of ways, but I would see if you can figure out what field it is yelling about and compare the datamodel size to the actual DB field.

If I re-create that order (but not as a counter sale), and manually process it, I have no problem making, printing or shipping the packer. Nor any issue making, printing or posting the invoice.

Making it Counter Sale but with just Create Packer, it runs, and I can create the invoice manually.

I do have 6 UD fields on OrderHed and InvcHead (none are related, i.e. nooderhead UDs are copied to InvcHead UD’s). Should I focus on those?

I added two MD BPM’s that do nothing more tha nshow a message (to indicate that the method has fired). One a Pre-process, the other a post-process.

Neither fires, even though the trace shows the BO method was called.

<tracePacket>
  <businessObject>Erp.Proxy.BO.SalesOrderImpl</businessObject>
  <methodName>ProcessCounterSale</methodName>
  <appServerUri>net.tcp://usdcaaps00371/TST_102300/</appServerUri>
  <returnType>System.Void</returnType>
  <localTime>3/13/2020 13:09:22:6611242 PM</localTime>
  <threadID>1</threadID>
  <executionTime total="946" roundTrip="924" channel="0" bpm="0" other="22" />
  <retries>0</retries>
  <parameters>
    <parameter name="iOrderNum" type="System.Int32"><![CDATA[2200224]]></parameter>
    <parameter name="lGeneratePackingSlip" type="System.Boolean"><![CDATA[True]]></parameter>
    <parameter name="lGenerateInvoice" type="System.Boolean"><![CDATA[True]]></parameter>
    <parameter name="lReadyToShip" type="System.Boolean"><![CDATA[True]]></parameter>
    <parameter name="cCreditShipAction" type="System.String"><![CDATA[WARN]]></parameter>
    <parameter name="cPackNum" type="System.String"><![CDATA[]]></parameter>
    <parameter name="iInvoiceNum" type="System.Int32"><![CDATA[0]]></parameter>
    <parameter name="opMessage" type="System.String"><![CDATA[]]></parameter>
    <parameter name="ds" type="Erp.BO.SalesOrderDataSet">
      <SalesOrderDataSet xmlns="http://www.epicor.com/Ice/300/BO/SalesOrder/SalesOrder" />
    </parameter>
  </parameters>
</tracePacket>

the parameter cCreditShipAction shows the value WARN. I’m not sure if that is an issue.

But why don’t either of the BPM’s (pre or post) show their message?

Hmmmm… The BPM messages show when I don’t include creating an Invoice.

This may be completely unrelated, but we had an issue where we upgraded from 10.0.700.4 to 10.2.300 last year where the counter sales errored out. Root cause was the counter sales invoice prefix field was limited to 2 characters in 10.2.300 in the underlying code, and we were using ‘CS-’. Can’t hurt to double check that…

1 Like

that would jive with "String or binary data would be truncated."

It turned out that we had the Counter Sales Invoice prefix set to CTR. Changing it to CS, and no no error is generated.

But I’m still getting the Customer Credit warning, when I shouldn’t.