Solved

Change Order Action Responsible ID

  • 23 October 2020
  • 11 replies
  • 331 views

Userlevel 6
Badge +17

Hello, 

I am attempting to create a Streams notification that is sent to users when they are assigned as the Responsible user on a given CO Action. I have the notification created, however, I’m not sure how to get the Streams notice to push to the responsible user. Currently, the only option is the Responsible ID, which appears to be their employee number and Responsible, which is their name. Neither of these allow the Streams notice to be sent to them. Is there anyway to configure this notification? Any help would be greatly appreciated.

icon

Best answer by Hans Andersen 30 October 2020, 06:07

View original

11 replies

Userlevel 3
Badge +7

How did you create the notification action?

Was it on a System defined Notification or did you create your own?

If you don’t get hold of the data you need you could do SQL Action that either has the code needed directly in the action or create a method that can be called.

You would then need to create the stream notification from code.

Userlevel 6
Badge +17

@tobese I created a custom event, then created an action to notify. I’m not very familiar with SQL actions, was hoping there was something simple I was missing during the creation of the event/notification. 

Userlevel 6
Badge +14

@cjohnson ,

It is a little difficult understand your question when there is screenshoots. But you can do a lot with build in functionality and the APIs. Say you would like to send a stream to the coordinator when a customer order change. You can do it like this:

Note that I also use a custom attribute for the customer name.

Then the action:

 

Hope this helps.

Userlevel 6
Badge +17

Hello @Hans Andersen sorry, I've included screen shots below of what I’m trying to accomplish. I thought I would be able to use a custom column that returned the responsible user’s ID:

However, when I attempt to create my Event/Event Action, the LU now has a CFT table, which is separate from the primary, and that appears to be what is holding the user account name that I would need to add to my Streams notice.

It appears that when creating an event you cannot reference two different tables in an LU. I was not able to find any documentation that confirms this. So, essentially, I have the info I need to create my Streams Event Action, but I cannot set it up, because data elements I need are in two different tables. 

 

Userlevel 6
Badge +14

@cjohnson ,

Your are correct. The action can only work on one table. If you need info from another table, you create a custom attribute the way I show above. 

Userlevel 6
Badge +17

@Hans Andersen Ah! Ok, now I understand! I will work on pulling that info from the custom column I’ve added. Thank you!

Userlevel 6
Badge +17

@Hans Andersen I was attempting to pull the USER ID and I based the syntax off of your screen shots, but I am receiving the following message when I attempt to save the Event:

It appears that the value I need to pull is located in the Person screen in IFS, specifically the USER_ID

I’m uncertain what I am configuring incorrectly in the Custom Attribute to pull that value. 

Userlevel 6
Badge +14

You can only use values from the attribute list. Try with ‘responsible’ 

...get_name(&new:responsible) 

Userlevel 6
Badge +17

@Hans Andersen Ok, I believe that is the issue then. When I used the responsible, it did allow me to save, however, it is returning the wrong value. It is returning the numerical employee ID, which cannot be used to send a Streams notice. The value I’m looking for is not on the EcoAction LU Attribute list. It provides the Responsible Person’s name and their clock number, but no the USER ID, which is what would be needed to send them a Streams message. I had attempted to add the custom column to that form, which does correctly display. However, that custom column is not located on the ECO_ACTION_TAB, which contains the information about the Change Order.

No USER_ID:

Custom field table:

The Action Owner is the custom column I added that correctly pulls the USER_ID needed for the notification, however, it is not available in the ECO_ACTION_TAB:

 

Userlevel 6
Badge +14

If you need the user_id, then you should use person_info_api.get_user_id(&NEW:responsible) and not get_name, but this will only work if the attribute ‘responsible’ contain the responsible_id/persion_id. I cannot tell since we do not have this module.

Userlevel 6
Badge +17

@Hans Andersen Thank you so much!!! That worked perfectly! Much appreciated!

Reply