Solved

Application Defined Custom Event Variables

  • 10 January 2020
  • 4 replies
  • 688 views

Userlevel 5
Badge +10

Hi

Using the custom event STEP_READY_FOR_APPROVAL  as part of the document management approval routing to send an email.

Email subject is using the variable &MESSAGE_TEXT which as an example contains the following: 

“Document Class 3015, No 1678422, Sheet 1 , Rev REV00 is ready for your immediate approval”

My questions is there a way to amend the content of this variable somewhere in IFS?

We are using Apps 8.

Thanks in advance

Shaun

icon

Best answer by CallumW 10 January 2020, 17:51

View original

4 replies

Userlevel 6
Badge +15

Hi,

 

There is no way to change what &MESSAGE_TEXT holds as such as it is hardcoded in APPROVAL_ROUTING_API but if your only requirement is to change the subject, there is nothing stopping you from creating your own subject.

For example using &MESSAGE_TEXT is the same as having Document Class &KEY01, No &KEY02, Sheet &KEY03, Rev &KEY04 is ready for your immediate approval.

 

 

You could create your own subject using the attributes provided such as:

Document Approval required for document no: &KEY02 (&KEY01 Class)

 

Or just text in the subject: New IFS Document Requires Your Approval!

 

Regards, Callum

Userlevel 5
Badge +10

Thanks @CallumW much appreciated 

Userlevel 7
Badge +30

Like @CallumW says, you cannot modify the predefined attributes in a standard event. However, there might be an ugly workaround: use an event action of the type “Online SQL” (I might misremember the name, but you will find it). In that one, write a small block of PL/SQL code that will, again, execute the same event. When doing this you can provide the values you need.

This is indeed a bit of a hack, and you also need to introduce some value or attribute that you can check in your event action to make sure things continuing forever.

I don’t have the time to produce a recipe for this, so someone else might need to step in here, or you need to experiment with this yourself. Have a look at how the standard events in IFS are coded and you will understand how it is done.

Good luck!

 

Userlevel 7
Badge +30

PS. You will need the following methods to do the job: Message_SYS.Construct, Message_SYS.Add_Attribute and Event_SYS.Event_Execute.

Reply