Question

History log event App9

  • 14 December 2021
  • 3 replies
  • 97 views

Userlevel 4
Badge +6

Im trying to set up an event i IFS App9 to send an email to the person whom added the resource to a work order. I can trigger the event when a new resource has been added in the table RESOURCE_BOOKING_INFO_TAB. But im also trying to get the person whom added the resource. I can activate the history log to get the correct person but is it possible to include the history log so I can send the email to that person?


This topic has been closed for comments

3 replies

Userlevel 7
Badge +31

Hi @TRCEISFELT,

For this, you can use a custom attribute in your event to fetch the current user.

In your Event, under Custom attributes section, add an attribute like this:

ifsapp.Fnd_Session_API.Get_Fnd_User

Make sure to change the App Owner in above SQL expression, if your App Owner is not IFSAPP.

Now the above attribute will appear under available substitution fields in the Event Action. So you can use the attribute in the To field like this:

 

Hope this helps!

Userlevel 4
Badge +6

Hi! Thanks! But that doesnt help me unfortunately :(

The case is:

Person no 1 creates a work line in the work order, what the need is

Person no 2  adds a resource (Person no 3) to the work line

What I want is that Person no 1 gets notified when Person no 2 has assigned Person no 3 as a resource.

So it is not the current user who wants to be notified. 

I thought about the history log to see who Person no 1 is but Im having trouble combining the event with the history log 

Userlevel 5
Badge +12

Hi @TRCEISFELT , I’m not so familiar with apps9, but Please check if you have the user id in this table RESOURCE_BOOKING_INFO_TAB, if not, another option is to check in journal table, as the user creates a workorder, maybe you have in journal tab in the work order.

Once haveing the user id, write this in the attribute server method:

&AO.fnd_user_property_api.Get_Value('userid', 'SMTP_MAIL_ADDRESS')

if you only have the user id in journal tab, you can use the function get to fetch the user id.

Hope it helps

Br.

Lopes