Trying to populate comments in ENG Workbench

bpm
customization
ubaq

(Brandon Anderson) #1

I am trying to populate the comments field within engineering workbench with the material part number and description for select operations. (like steel for laser cutting). Currently we are doing this with DMT, which works fine, but I think I should be able to do this real time as the methods are created/updated.

First I tried a BPM on update. It works fine it I am changing something on the operation. However, if the related material changes, but the operation doesn’t, the update dataset doesn’t populate the EcoOpr table, so there are no TT records to set. I suppose I could trick it by setting something in dataview on update, but that seems hacky. Is there a better way to trigger that?

My second attempt was to do a UBAQ and see if I could run the updates there. Unfortunately the Engineering Workbench Update.Ext locks up immediately, and I have to force close Epicor. So it seems like that might be out of the question. Has anyone been able to use that BO in a UBAQ? It’s probably not that common since the part has to be checked out/unnaproved in order to change, but I was planning on calling it from within the engineering workbench so I didn’t have to mess around with all of the checking out/in BS that you would have to do to change the op comments.

My last option is to just do it in the UI with a customization. That’s looking like the most workable option.

Has anyone done anything like this before? Any tips?


(Jose C Gomez) #2

You may have to use the BO in code Advanced UBAQ only… :frowning:


(Brandon Anderson) #3

yuck!


(Haso Keric) #4

Given that its just the Comment Field… you can always use LINQ and update the ECOOpr.

// Example replace your where stuff
using (var txScope = IceDataContext.CreateDefaultTransactionScope())
{
   var x = (from eop in Db.ECOOpr.With(LockHint.UpdLock) where eop.PartNum == 
   ttPartRow.PartNum && eop.Company == ttPartRow.Company select eop).FirstOrDefault();

   if (x != null)
   {
     x.YourCommentField = "Something";
   }
  Db.Validate(x);
  txScope.Complete();
}

(Brandon Anderson) #5

That would be from within the update BPM right?


(Haso Keric) #6

Within your ECOMtl BPM the one that has no reference to ECOOpr.