We need to be able to put a BPM for printing on a method directive to do some bartender file drop printing. The method that we need the BPM on is in the database, however it doesn’t show up in the UI list to pick so that we can make a BPM. When I look in the back end, I see that all of the methods that don’t show up on this list for PCID Build Split Merge have a signature status of -2. Does anyone know what this is used for, or why these methods are not is the list?
Directives Recompile, has a checkbox to refresh Signatures. Run that and it should refresh your Signatures.
Can you see those methods in your system?
Little bit more info on Signature.
Let me check
that would be a no… bummer.
Im just going to assume it means that they haven’t been implemented yet to support PRE,POST.
EDIT
Found the definitions
const int Valid = 1;
const int Incompleted = 0;
const int Migrated = -1;
const int Unsupported = -2;
I found the same thing… frustrating!
You can still call them in custom code directly though, jut not select them within the BMP Mehtods.
You’ll excuse the terrible implementation, but this is how I called it to be able to remove stock from PCIDs so they can be put into nonconformance:
/Remove From PCIDs/
/This will ALL items from the selected PCIDs and enter the details of what was removed from each PCID into UD03 table to be processed later/using(var UD03svc = Ice.Assemblies.ServiceRenderer.GetService(Db))
{
//PCID
// tableset for the stock we are moving out of PCIDs
UD03Tableset dsUD03Records = new UD03Tableset();
int UD03Count = 0;foreach (var ttResults_Row in (
from row in ttResults
where row.RowMod == “U”
&& row.Calculated_Selected == true
&& !row.Calculated_IsUnpacked
select row))
{
if (ttResults_Row.PkgControlItem_PCIDItemSeq == -1)
{
this.PublishInfoMessage(“Please refresh the dashboard before reprocessing previously returned part.”, Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, “”, “”);
return;
}
//this.PublishInfoMessage("Removing PCID: "+PCID, Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, “”, “”);using (var PkgControlIDBuildSplitMergeBO = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.PkgControlIDBuildSplitMergeSvcContract>(this.Db,true)) { // SOURCE DATASET // Get the Source dataset. Easy way to create a row. We will null ou the PCID so that source is inventory PkgControlIDBuildSplitMergeBO.GetSourcePCID(ttResults_Row.PkgControlHeader_PCID, false, ref this.dsSourcePCID); // DEST DATASET // Get the Dest Dataset PkgControlIDBuildSplitMergeBO.GetDestPCID(ttResults_Row.PkgControlHeader_PCID, true, ref this.dsDestPCID); // Null out the PCID we are moving from Dest to source so the source is just inventory dsSourcePCID.PCIDBuildSplitMergeSource.FirstOrDefault().PCID = ""; //if ((from dbQuery in ( from rowUD03 in this.Db.UD03 where ((rowUD03.Company == and rowUD03.Key1 ==)) select 1).Take(2).Count() >= (1)) // Process the PCID Items, including creating the NonConformance Record foreach (var DestItemRow in (from row in dsDestPCID.PCIDBuildSplitMergeDestItem where row.PCIDItemSeq == ttResults_Row.PkgControlItem_PCIDItemSeq select row)) { // Set the Item in the PCID for processing (removal) DestItemRow.SelectedForAction = true; DestItemRow.RowMod = "U"; // Create the record as to what is being removed into UD03 so we can later put it on NCR using(var txscope = Erp.ErpContext.CreateDefaultTransactionScope()) //IceContext and IceDataContext rather than Erp.ErpContext also tested here { UD03svc.GetaNewUD03(ref dsUD03Records); dsUD03Records.UD03[UD03Count].Key1 = DestItemRow.PCID; dsUD03Records.UD03[UD03Count].Key2 = DestItemRow.PCIDItemSeq.ToString(); dsUD03Records.UD03[UD03Count].Key3 = DestItemRow.ItemPartNum; dsUD03Records.UD03[UD03Count].Key4 = ""; // Reserving this for Part Revision in case it is used in the future dsUD03Records.UD03[UD03Count].Key5 = "ToNCR"; //Destination ToPCID is going from NCR to PCID. ToNCR is going from PCID to NCR. dsUD03Records.UD03[UD03Count].ShortChar01 = dsDestPCID.PCIDBuildSplitMergeDest.FirstOrDefault().WarehouseCode; dsUD03Records.UD03[UD03Count].ShortChar02 = dsDestPCID.PCIDBuildSplitMergeDest.FirstOrDefault().BinNum; dsUD03Records.UD03[UD03Count].ShortChar03 = callContextBpmData.Character01; dsUD03Records.UD03[UD03Count].Character01 = DestItemRow.ItemLotNum; dsUD03Records.UD03[UD03Count].Number01 = DestItemRow.ItemQuantity; UD03svc.Update(ref dsUD03Records); Db.Validate(); txscope.Complete(); UD03Count++; } PkgControlIDBuildSplitMergeBO.RemoveFromDestPCID(ref this.dsDestPCID, ref this.dsSourcePCID); } } ttResults_Row.Calculated_IsUnpacked = true; ttResults_Row.PkgControlHeader_PkgControlStatus = ""; ttResults_Row.Reason1_ReasonCode = callContextBpmData.Character01; ttResults_Row.Reason1_Description = ""; ttResults_Row["Calculated_Selected"] = false;
} //foreach (var ttResults_Row
this.PublishInfoMessage(UD03Count.ToString()+" item lines removed from PCIDs. Please run Actions->Update All to process to nonconformance.", Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual, “”, “”);
} // UD03svc
Note: This needs to be properly reviewed as I was going round in circles to make it work… putting RemoveFromDestPCID in transaction scope (as it should be) means it fails to commit. If you find out how to do it properly, please let me know!
One other thing to note is that I tried using the Remove from source methods (in my mind, I’d rather have source as what you’re getting something from and dest as where you’re putting it always), but couldn’t get them to work.
Oh, please ignore the above… you’re trying to have a BPM ON the PCID methods, not call them in a BPM?
Can you do it as a Data Directive instead?
If SingatureStatus is -2 then BPM does not support such a method. There a many reasons for that:
- Unsupported types in the signature
- Conflicting names of tables in tableset arguments (a few arguments of the same tableset type or tableset types with identical table names)
- Too long method name
- something else
@AndrewM , that’s right, I’m trying to call the BPM. I actually have some custom code working to move things around, and in that section, I can do what I need to do. However in the stock parts of the PCID Build / split / merge screen, I wanted to be able to do some things (print PCID labels with some part info on it) when the parts are moved into the PCID. So in order to do this, I would have to completely re-write the stock parts of the screen so that I have access to the “source code” (aka my custom code) so that I can be able to trigger some things (label printing) when parts are moved into a PCID.
**and yes I know that we should just print the PCID label without any part information on it, but there’s already an abundance of change management going on, so we are trying to upset the apple cart as little as possible here.
Also we are looking at the data directive, and that’s probably the way we will have to go, it’s just harder to get the control that we want.
We’re also hoping to have the PCID label printed with the contents, just haven’t got that far yet.
For not, I’m just generating dashboards to fulfil the basic functions required. As in the code I pasted earlier, I’ve a dashboard where you can select a pallet to move the contents to NCR and the reverse. Another dashboard that splits a quantity in stock onto pallets with a set qty per pallet.
I’ll keep an eye on how you go with the method directive. Out of curiosity, I did try as an experiment (don’t tell epicor) adding the missing argument into BpArgument and changing BpMethod.signaturestatus to 1 which worked in terms of being able to call them from a UBAQ BPM without custom code, but when I try to create a method directive on the method, it errors out with key constraint issues.