I am trying to unallocate a sales order release from a method directive.
I’ve traced the process and I can make it work in the BL Tester but won’t work in my BPM.
Below is the relevant code with extra taken out.
The problem is that the call to GetListOfOrders works and returns the expected data but the call to OrderAllocationGetRows returns no rows in the OrderAlloc table so nothing gets unallocated.
Any ideas?
Erp.Tablesets.OrderAllocListTableset OrderAllocListDataSet;
Erp.Tablesets.OrderAllocTableset OrderAllocDataSet;
string waveWhereClause = string.Empty;
string orderHedWhereClause = string.Empty;
string orderDtlWhereClause = string.Empty;
string orderRelWhereClause = string.Empty;
string customerWhereClause = string.Empty;
string partAllocWhereClause = string.Empty;
string countryWhereClause = string.Empty;
string shipToWhereClause = string.Empty;
string creditHoldClause = string.Empty;
string SortByOrder = string.Empty;
string SortByWarehouse = string.Empty;
string SortByAllocation = string.Empty;
int pageSize = 0;
int absolutePage = 0;
bool morePages = false;
string outMessage = string.Empty;
Erp.Contracts.OrderAllocSvcContract SOprocHandle = null;
orderHedWhereClause = "OrderHed.OrderNum >= " + ttOrderHedRow.OrderNum.ToString() + " and OrderHed.OrderNum <= " + ttOrderHedRow.OrderNum.ToString();
partAllocWhereClause = "NoFilter,NoFilter,NoFilter,NoFilter";
creditHoldClause = "NoFilter";
SortByOrder = "";
waveWhereClause = "";
orderDtlWhereClause = "";
orderRelWhereClause = "";
customerWhereClause = "";
countryWhereClause = "";
shipToWhereClause = "";
SortByOrder = "";
SortByWarehouse = "";
SortByAllocation = "";
pageSize = 100;
absolutePage = 0;
SOprocHandle = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.OrderAllocSvcContract>(Db);
OrderAllocListDataSet = SOprocHandle.GetListOfOrders(waveWhereClause, orderHedWhereClause, orderDtlWhereClause, orderRelWhereClause, customerWhereClause, partAllocWhereClause, countryWhereClause, shipToWhereClause, creditHoldClause, SortByOrder, SortByWarehouse, SortByAllocation, pageSize, absolutePage, out morePages, "");
OrderAllocDataSet = SOprocHandle.OrderAllocationGetRows(OrderAllocListDataSet, 0);
foreach (Erp.Tablesets.OrderAllocRow OrderAllocRow in OrderAllocDataSet.OrderAlloc)
{
OrderAllocRow.SelectedForAction = true;
OrderAllocRow.RowMod = "U";
}
SOprocHandle.UnallocateAndUnreserve(ref OrderAllocDataSet, out outMessage);
SOprocHandle = null;
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:1e5a19.png@6ce7d947.409b6155]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
[Non-text portions of this message have been removed]
I’ve traced the process and I can make it work in the BL Tester but won’t work in my BPM.
Below is the relevant code with extra taken out.
The problem is that the call to GetListOfOrders works and returns the expected data but the call to OrderAllocationGetRows returns no rows in the OrderAlloc table so nothing gets unallocated.
Any ideas?
Erp.Tablesets.OrderAllocListTableset OrderAllocListDataSet;
Erp.Tablesets.OrderAllocTableset OrderAllocDataSet;
string waveWhereClause = string.Empty;
string orderHedWhereClause = string.Empty;
string orderDtlWhereClause = string.Empty;
string orderRelWhereClause = string.Empty;
string customerWhereClause = string.Empty;
string partAllocWhereClause = string.Empty;
string countryWhereClause = string.Empty;
string shipToWhereClause = string.Empty;
string creditHoldClause = string.Empty;
string SortByOrder = string.Empty;
string SortByWarehouse = string.Empty;
string SortByAllocation = string.Empty;
int pageSize = 0;
int absolutePage = 0;
bool morePages = false;
string outMessage = string.Empty;
Erp.Contracts.OrderAllocSvcContract SOprocHandle = null;
orderHedWhereClause = "OrderHed.OrderNum >= " + ttOrderHedRow.OrderNum.ToString() + " and OrderHed.OrderNum <= " + ttOrderHedRow.OrderNum.ToString();
partAllocWhereClause = "NoFilter,NoFilter,NoFilter,NoFilter";
creditHoldClause = "NoFilter";
SortByOrder = "";
waveWhereClause = "";
orderDtlWhereClause = "";
orderRelWhereClause = "";
customerWhereClause = "";
countryWhereClause = "";
shipToWhereClause = "";
SortByOrder = "";
SortByWarehouse = "";
SortByAllocation = "";
pageSize = 100;
absolutePage = 0;
SOprocHandle = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.OrderAllocSvcContract>(Db);
OrderAllocListDataSet = SOprocHandle.GetListOfOrders(waveWhereClause, orderHedWhereClause, orderDtlWhereClause, orderRelWhereClause, customerWhereClause, partAllocWhereClause, countryWhereClause, shipToWhereClause, creditHoldClause, SortByOrder, SortByWarehouse, SortByAllocation, pageSize, absolutePage, out morePages, "");
OrderAllocDataSet = SOprocHandle.OrderAllocationGetRows(OrderAllocListDataSet, 0);
foreach (Erp.Tablesets.OrderAllocRow OrderAllocRow in OrderAllocDataSet.OrderAlloc)
{
OrderAllocRow.SelectedForAction = true;
OrderAllocRow.RowMod = "U";
}
SOprocHandle.UnallocateAndUnreserve(ref OrderAllocDataSet, out outMessage);
SOprocHandle = null;
Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-9278 | fax: 781-232-5191
addr: 179 Campanelli Pkwy | Stoughton | MA | 02072-3734
jrojas@... | www.matsinc.com
Ask us about our clean, green and beautiful matting and flooring
[cid:1e5a19.png@6ce7d947.409b6155]
This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
[Non-text portions of this message have been removed]