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.
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! You Rock!
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!