Help with tablesets for BO via BPM

I’m trying to create a BPM to create the PCID for every PO receipt done. One of my stumbling blocks is using the correct tableset for the PCID object. How do i search on tablesets? We are in the cloud. thanks!

Still need help ?

Kevin,
I got past finding the tablesets by adding a reference of Erp.Contracts.BO.PkgControlGenPCID to the custom code so thats fine, but if you want to show us how to create the PCID automatically from the PO receipt, go ahead and throw it over.
I find the extra screens for creating the PCID’s to be annoying. thanks!

I can do this part, just did it recently.

Let me see if I have shareable code.

Sorry, I forgot :slight_smile:

//references: Erp.Contracts.BO.PkgControlIDGenerator
//using Ice.Assemblies;

string retString = "";
string nl = Environment.NewLine;

int numToGen = 1;

using( Erp.Contracts.PkgControlIDGeneratorSvcContract pcidGen = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.PkgControlIDGeneratorSvcContract>(Db) )
{
    Erp.Tablesets.PkgControlIDGeneratorTableset ds = pcidGen.GetNewPkgControlIDGenerator(false, "Dynamic");
    
    Erp.Tablesets.PkgControlIDGeneratorRow row = ds.PkgControlIDGenerator.FirstOrDefault();
    
    row.PkgControlIDCode = "PALLET";
    row.PkgCode = "Pallet";
    row.WarehouseCode = "FIN";
    row.NumberToGenerate = numToGen;
    row.PkgCodeDescription = "Pallet";
    row.WarehseDesc = "Finished Goods";
    row.PrintLabels = false;
    row.PkgControlOutboundContainer = true;
    row.DisableScreen = true;
    
    string outS = "";
    
    pcidGen.GenerateButton(ref ds, null, out outS );
   
    retString = ds.PkgControlIDGenerator.FirstOrDefault().PCIDSGenerated;
    
    InfoMessage.Publish(retString);
}

Kevin,

Thanks a bunch.

I have to give it a good look, but at 1st glance, I was missing the Ice.assemblies………

I will be giving this a test drive over the weekend.

Thanks!!!

Mike

1 Like

Kevin,

This is creating the pcid header just fine, BUT it does not create the pcid detail rec and some screens do look for it.

I checked by method directive and I’m passing in the partnum field ok.

Have you had to do anything special to get the pcid detail table created.

Thanks again, this was a big help!

Mike

I think I’ll need some further explanation there. That is either something I’m not using,
or I’m just not connecting in my head.

Kev,
There are 2 tables for the pcid, and when I use your pcid generator script, it generates the header, but not the detail and I’m feeding it the item and warehouse. It leaves the status as empty for the pcid so when I go to use the pcid, it says its empty. I’ve checked all of the options for pcidgenerator and I don’t see a status or create detail true/false.

thx
mc

Yes, that’s what this does, creates an empty PCID.

So I’m guessing you want to put things into the pcid? PkgControlItem, PkgControlStageItem ?

Kev,
Yes, There is a parm for the item so I thought if I passed that in, it would put the item in there but I guess not???
I’ll look at those 2 methods.
thx a bunch!
mc

Very handy, I’ll be giving this a whirl.
I have code to add items to a PCID - I will use this code and that to see if it works out then report back.