Solved

method to prevent sending sales order acknowledgement for sales orders on credit hold?

  • 11 June 2021
  • 4 replies
  • 397 views

We have created a BPM to auto send the sales order acknowledgement when the sales order is flagged ready to process. We can prevent sending if the sales order is on hold but can’t figure out how to prevent if that sales order is on credit hold - don’t find any database field in orderhead that identifies the order credit hold condition??

Suggestions appreciated!

icon

Best answer by mwilson 16 June 2021, 19:47

View original

4 replies

Userlevel 1

The sales order is on credit hold when the customer is on credit hold (Custome.CreditHold) and the OrderHed.CreditOverride is false. CreditOverride of true on OrderHed when the Customer is on credit hold means this order has been released from credit hold. So to find orders that are on credit hold you need Customer.CreditHold = true and OrderHed.CreditOverride = false.

 

Thanks Jim  - sure appreciate the response

I should have included that I was aware of the credit hold conditions you mentioned above - I have a nice query/dashboard to show the open orders on credit hold.

The problem I have with the data directive is that there is no database field in ShipHead containing the hold related data consequently I don’t know how to bring that Customer hold and override data into the directive. I’m a bit new to directives so only using the basic options - haven’t learned what all is even possible, let alone how to accomplish it. Wish there was documentation available.

 

Userlevel 4

I haven’t found a way to do a BPM like this with widgets only; when I have to take the temp table and use the info to look up entries in another table, I always do it with custom code.  Here’s an example of custom code for E10, that triggers on ttLaborDtl then uses the values and some other logic to look up entries in the related table JobOper, and under certain conditions throw an exception.  Throwing the exception both informs the user of the issue and prevents the transaction from completing in Epicor.

 

HTH

Monty.

 

// Force inspection for appropriate oprs

//

Erp.Tables.JobOper JobOper = null;

var ttLaborDtl_xRow = (from ttLaborDtl_Row in ttLaborDtl

    where ttLaborDtl_Row.RowMod == "A" || ttLaborDtl_Row.RowMod == "U"

    select ttLaborDtl_Row).FirstOrDefault();

    

if (ttLaborDtl_xRow != null)     // added or updated labor detail record exists?

{

   

    JobOper = (from JobOper_Row in Db.JobOper

        where JobOper_Row.Company == Session.CompanyID 

        && JobOper_Row.JobNum == ttLaborDtl_xRow.JobNum

        && JobOper_Row.OprSeq == ttLaborDtl_xRow.OprSeq

        && JobOper_Row.AssemblySeq == ttLaborDtl_xRow.AssemblySeq

        && JobOper_Row.SNRequiredOpr == true)



        select JobOper_Row).FirstOrDefault();

        

    if (JobOper != null)   // found matching job operation record?

    {

        throw new Ice.BLException(

            "Current (complete) qty must be zero for assemblies requiring inspection - use Non-Conform Qty instead"

            + Environment.NewLine + "(BPM exception: If Serial Force PDI");

    } // end if found job oper record

} // end if added or updated LaborDtl record exists

Thanks Monty!       You have confirmed what I suspected which also confirms my need for a better understanding of the capabilities/possibilities using custom code. Still new to the wonderful world of BPMs but this info sure helps!

Reply