Notify Engineer for the First Job of a New Part

Yep, you would need to change to method and invoke BO with the widget.

Okay, I have been trying the method directive way all day yesterday and only got part of it to work.
So maybe you can help me with a couple of questions I have.
For the Method Directive,
Question 1.) Would I still want to create it on the JobEntry Method such as JobEntry.ChangeJobHeadJobReleased?
(Right now this is where I have tried to build it)

Question 2.) Would I want a Pre-Process that checks that the Job Release is True and sends the email, then have a Post-Process that sets the Part.Analysis Code back to blank?
(I have tried putting it all on Pre -Process and had no luck. Then I tried to split it up to have the Check/Email on the pre with the Field setting on the post and I still cannot seem to get it to update the Part.Analysis code to blank.)

Question 3.) When trying to change the Part.Analysis Code back to blank, what would be the best BO to use and do I need multiple ones to accomplish this?
(I have tried just Part.Update and Part.GetByID/Part.GetRows with Part.Update. Every time I get an Error regarding the object)

Here is the second attempted I tried:
*Which does produce the Message, but I cannot figure out how to Changing the Part.Analysis code to blank.

Q1: I think that’s a great method for this BPM.

Q2: Since you won’t be updating anything until after the job is updated to released, I think everything could go in 1 post-processing directive. The analysis code update can definitely work here.

Q3: The Part.Update should be the BO Method you want to invoke (probably after the email is actually sent). It looks like it uses the same table set (PartTableSet) as the one that is returned by the Part.GetByID method (PartDetails). You should be able to update the PartDetails.AnalysisCode in a set field widget, then pass it in the parameters of the Part.Update BO widget. Can you post the error message you are getting when you try to do the Part.Update?

Here is the Error it gives me.
What I did:
1.) I place the Invoke BO Method
2.) Select to invoke Erp.Part.GetByID
3.) Set the configured parameters I set to PartNum in Va.PartNum and out to PartDetails
4.) Select ok
5.) I get this Error…

Hmm ok. I thought you said the BPM was working up until the message box (which included the GetByID widget)? Either way, you’re going to need 2 widgets I’m pretty sure. The Part.GetByID will get you the info about the part you want to update, then you can pass that info to another widget that calls Part.Update. I tested this a little, I think you’ll actually want to use Part.UpdateExt

It did work all the way through when I had it on Pre-Process. I moved it to Post-Process and then got the error. I will give that a try. By the way, thank you so much for helping me and for all the quick replies. I really appreciate it.

No problem!

Here’s something I set up that JUST updates a field on the part table when a job is released (I didn’t have analysis codes set up, so I just updated a UDChar field):

The ds parameter for the UpdateExt is a UpdExtPartTableset type variable, so the PartTableset that is returned by the GetByID method won’t work. Instead, I made a new UpdExtPartTableset variable that I fill with the PartTableset.Part in the “Fill Table by Query” widget:

I think you just need the key fields here, but I went ahead and brought everything over (including the updated UDChar field)

This updated the Part.UDChar01 field to “NEWCODE” for a job’s part when the job is released. I used UpdateExt because I couldn’t get Update to work.

1 Like

Oh My Goodness!! You are absolutely wonderful! That worked. That 100% worked. Thank you SOO much for all of your help with this! I appreciate it so much. You are 100% correct, it was the last two widgets that I was missing. Thank you Adam! :smiley: You Rock!

1 Like

Good deal! Now that I think about it, the BPM probably doesn’t need the GetByID widget. Could have filled the UpdateExtTableset just with the standard part table (then update your field), and pass that to the UpdateExt widget. But either way, glad you got it working!