Reserve/Allocate at Order Entry

Hi,

I am wanting to Reserve Stock from Primary Warehouse once a Line or Release has been created rather than having to use the Actions > Reserve/Allocate (Opens Fulfilment Workbench) > Reserve > Primary Warehouse Only…

We process 100s of orders daily and its a chore to manually Reserve the stock.
Ideally I would like a Stock Reserve UD Field (Boolean) which when True on the Line Update the Stock is Reserved. If the field later turns to false it UnReserves the stock.

Does anyone already have something in place lke this?

@Ricky, You can also reserve the multiple sales order on a single click using Fulfillment Workbench. Please follow the below-mentioned steps

  1. Open the Fulfillment Workbench
  2. Navigate to Order Fulfillment
  3. Click on the Search button and select the sales order based on filters
  4. Select All
  5. Go to Actions> Reserve > All Warehouses.

@prakash

@Hari_Dutt

Thanks but we are looking to automate this due to the volume of orders.
The manual way through Fulfilment Workbench doesn’t cut it for us.

@prakash @enbw
I imagine there may be a way to do this?

hi , we have automated for uk based lighting business. i have left working for them. however have source code of it. i have also posted the pseudocode in the below post Fulfillment Workbench - #8 by prakash

should you need any further assistance/buy the full source code, feel free to reach me out. also, if you started customizing and stuck at somepoint, post the code here and i will attempt to help you out. @Ricky90

1 Like

BTW - Per KB0063746 Enhancement Problem PRB0141062 was submitted 2 years ago (as of 04/2021) but the feature is still missing.

I couldn’t find it in Epicor Ideas, so I added it, feel free to vote for it and or add comments:
Allow Auto Reserve Allocation When SO Ready To | Epicor ERP Ideas (aha.io)

@prakash
I have looked at the code from the other post. I am just struggling to find a good point to invoke the code.
Is there a specific Method I have to call it from?

put a ud field, on update method, invoke the custom code?

@prakash I have done so. but I seem to get plenty of error of fields not existing in the current context.

Edit** I have managed to remove the namespace error by adding ERP.Contracts.BO.OrderAlloc to the Usings and References but the rest of the errors remain.

you need to declare those variables and assign values.

1 Like

@prakash
I have declared those variables.

I haven’t set any Values yet, is that using the Set Argument/Variable to just set the OrderNum, OrderLine and OrderRel values? or do i need to do an update table by query to fill the SlimOrderAlloc Tableset with the values from the code?

@prakash I set the Variables to values: see below as example for ordNum variable

I get this error when saving on the Sales Order Entry.

System Information

==================

AppServer Connection: ServerName
Form Name: Sales Order Entry
Customization Name:CustomizationName
Menu ID: OMMT3001
Software Version: 10.2.700.12

============

Server Side Exception

BPM runtime caught an unexpected exception of ‘InvalidCastException’ type.
See more info in the Inner Exception section of Exception Details.

Exception caught in: Epicor.ServiceModel

Error Detail

============

##!Correlation ID:##! a3965766-e84b-45d6-9ab6-feb43bd5c7fc
##!Description:##! BPM runtime caught an unexpected exception of ‘InvalidCastException’ type.
See more info in the Inner Exception section of Exception Details.
##!Program:##! RefEmit_InMemoryManifestModule
##!Method:##! lambda_method
##!Original Exception Type:##! InvalidCastException
##!Framework Method:##! A005_CustomCodeAction
##!Framework Line Number:##! 0
##!Framework Column Number:##! 0
##!Framework Source:##! A005_CustomCodeAction at offset 1000 in file:line:column :0:0

Client Stack Trace

==================
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.SalesOrderImpl.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage, SalesOrderDataSet ds)
at Erp.Adapters.SalesOrderAdapter.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage)
at Erp.UI.App.SalesOrderEntry.Transaction.Update()

Inner Exception

===============
Specified cast is not valid.

hi, the variable name represents data it requires. i.e ordLine variable should be set sales order line number data.

@prakash I will give that a go.

On another note i noticed one of your posts indicated that you had managed to automate the intercompany SO>PO>SO procedure. Is this something i could talk to you about further.

@Ricky90 yes sure.

@prakash
I do apologies but i really do not know how to send private messages on this site.

@prakash
I invoked the BPM from the Standard Data Directive from the OrderRel table.
I used a condition that a UD field had to = true
I set the ordLine Variable to ttOrderRelRow.OrderLine.ToString() (I did the same with the ordNum and relNum variables + reservemsg was set to a message string. The only thing i didnt set was the false or true on the res variable. i get the below error.

System Information

==================

AppServer Connection: ServerName
Form Name: Sales Order Entry
Customization Name: CustomisationName
Menu ID: CRGO3500
Software Version: 10.2.700.12

============

Server Side Exception

BPM runtime caught an unexpected exception of ‘InvalidCastException’ type.
See more info in the Inner Exception section of Exception Details.

Exception caught in: Epicor.ServiceModel

Error Detail

============

##!Correlation ID:##! 6fe5906f-64d6-4188-ae1b-185a3bef7f7c
##!Description:##! BPM runtime caught an unexpected exception of ‘InvalidCastException’ type.
See more info in the Inner Exception section of Exception Details.
##!Program:##! RefEmit_InMemoryManifestModule
##!Method:##! lambda_method
##!Original Exception Type:##! InvalidCastException
##!Framework Method:##! A005_CustomCodeAction
##!Framework Line Number:##! 0
##!Framework Column Number:##! 0
##!Framework Source:##! A005_CustomCodeAction at offset 1000 in file:line:column :0:0

Client Stack Trace

==================
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.SalesOrderImpl.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage, SalesOrderDataSet ds)
at Erp.Adapters.SalesOrderAdapter.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage)
at Erp.UI.App.SalesOrderEntry.Transaction.Update()

Inner Exception

===============
Specified cast is not valid.

@prakash

It now reserves and shows it from the fulfilment workbench that stock is reserving but that reserved qty doesn’t show anywhere else IE Part Tracker still shows 0 Reserved Qty.

The reserved stock shows in the PartAlloc tables correctly so im a bit lost now as to why it isn’t showing anywhere else

@prakash
Hi, i have attempted the SO>PO>SO automation.

I believe i have to call POSugg.GetNewSugPODtl and fill that will details from the OrderHed, OrderLine & OrderRel. Then I would run POSugg.Generate which would then generate the New Po Suggestion?

If i am on the right lines i seem to be running into an error on the Order Header. Error message underneath.

image

System Information

==================

AppServer Connection: ServerName
Form Name: Sales Order Entry
Customization Name: CustomisationName
Menu ID: CRGO3500
Software Version: 10.2.700.12

============

Business Layer Exception

Cannot create Suggstions with this object

Exception caught in: Epicor.ServiceModel

Error Detail

============

##!Correlation ID:##! 767f91be-9141-4177-bae0-008f64b04b5c
##!Description:##! Cannot create Suggstions with this object
##!Program:##! Erp.Services.BO.POSugg.dll
##!Method:##! SugPoDtlBeforeGetNew
##!Line Number:##! 4334
##!Column Number:##! 13
##!Table:##! SugPoDtl

Client Stack Trace

==================
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.SalesOrderImpl.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage, SalesOrderDataSet ds)
at Erp.Adapters.SalesOrderAdapter.MasterUpdate(Boolean lCheckForOrderChangedMsg, Boolean lcheckForResponse, String cTableName, Int32 iCustNum, Int32 iOrderNum, Boolean lweLicensed, Boolean& lContinue, String& cResponseMsg, String& cCreditShipAction, String& cDisplayMsg, String& cCompliantMsg, String& cResponseMsgOrdRel, String& cAgingMessage)
at Erp.UI.App.SalesOrderEntry.Transaction.Update()