This is my 3rd attempt to solve this problem.
I’ve been trying to bring Current User’s email address to OrderAck Routing on the CC field.
I have some work arounds but they aren’t perfect or pretty.
This time I am trying to go the BPM route. It is working OK to a point.
The Post-Processing Method Directive on SalesOrder.GetByID sets call.ContextClient.CurrentUserID in my OrderHed UD field so it’s visible when a Sales Order is opened on a screen. Unfortunately, I can’t save it to the OrderHed Table (I don’t know how).
If I could save it there, then I could get a relationship of OrderHed and UserFile based on this OrderHed.UD_CurrentUserID_c field and get my email into the CC Routing field.
Could anybody help me sleep at night?
Don’t set it post processing that makes the user do something and save it. Pre processing on update set the field and then it is saved. Or on a data directive if the UD is blank set it.
Greg, thank you for replying to my post and I’m sorry it took me so long to get back on this project.
The SalesOrder.GetByID Post-Processing Method Directive is the only one that would display the Current User ID on the screen when the order is opened. Unfortunately, it wouldn’t save it to my UD Field for later use in Breaking/Routing of a Report Style.
I’ve tried SalesOrder.Update pre and post Method Directive, SalesOrder.GetByID pre, Data Directive In-Transaction and Standard on OrderHed and none of them would display the Current User ID in my TextBox bound to the UDField.
It can’t be that difficult!
You don’t want to display the user. you just want to save it. Post processing on getbyid is going from the server to the client so nothing is saved. Preprocessing on update is going from the client to the server, so any field you set there will get saved to the database. I did not have your UD, but the update did work.
I just did this in 10.2.400 order update
set field
What exactly do you want to achieve with this? We have a shared mailbox like orderack@company.com that is used in cc for every order sent. All sales reps have access to that and they can check any orders. We didn’t had to add any BPM’s or customizations for this.
I set it exactly to your example with omitting the condition, because I would like my UD field to be set to a current user each time someone opens an order.
It does NOT save anything to the server (I’ve tried setting it to the changed row and all rows). I know it because I created a simple BAQ with OrderNum and my UD field column. It reminds empty unless I save some change on an order.
I was trying to avoid forcing an end user to do this kind of exercises.
What I’m trying to accomplish is for an end user to be able to open an order, see their userID on the screen and automatically send an SOA by previewing without a need of doing any extra steps.
I would like this email to be copied to this current user and a salesrep. For this to happen, I need the CurrentUserID to be available in either RDD or in a UD Field.
thank you for brainstorming it with me