Skip to main content

Hi 

I have to set up email alerts for every appover based on approval steps 

Event STEP_READY_FOR_APPROVAL is not firing for initial step when we apply approval template

It works when approved first step.

 

Any ideas to fire initial/first step I mean when we apply approval template initial approvers should get an email alert?

 

Thanks,

Narsi.

Are you starting the approval process?  Adding the Approval Template doesn’t start the approval process, when you RMB from the Document Revision header > Status > Start Approval, that should fire for the first step to send the email to the first group.


hi Narsi,

Are you using approvals against a document or some other LU?

 


Hi @paul harland  @ShawnBerk 

I’m using LU: InvetoryPart, a user adds an Approval Template manually in the Approval Process block against an Inventory Part.

So I have created an event action on event STEP_READY_FOR_APPROVAL to get an email alert for the next approver. It works from when the first step has been approved(Next Approver is getting an email alert)

For Example,

Let’s assume there are three steps against an Inventory Part

When we add an Approval Template

Step 1(Not approved yet, approvers need to get an email alert to approve to this step, but not getting) - Here I need to make an email alert for approvers approve this step

Step 2(Waiting for Step 1) 

Step 3(Waiting for Step 2)

When approved the first step

Step 1(Approved )

Step 2(approvers are getting an email alert) 

Step 3(Waiting for Step 2)

When approved the second step

Step 1(Approved )

Step 2(Approved) 

Step 3(approvers are getting an email alert)

 

I think it makes sense 

 

Thanks,

Narsi.


Hi @Narsi 

yep it makes sense, but STEPREADYFORAPPROVAL does not get triggered in that scenario (for the first step).

You will need to define a custom event on the ApprovalRouting LU. You can set it to be triggered on New records

Then you need some logic that means it only sends the email to the person in the first step. I believe there’s a field in the LU called something like IS_NEXT_STEP that you can use for this…

EDIT

ok, checked and the field is CURRENT_STEP_NO:

So what you really need to do is - in the custom event - send the email if Step_No = Current_Step_No.

I hope that makes sense.

To be honest an easier solution - if you can get away with it - is to decide that “step 10” will always be the first step, in all your approval templates.  That way you know that the step is immediately due if the Step No = 10.


@Narsi

@paul harland

This works fine for me in V9 UD13.

We have this approval template:

Custom Product Signoff

Then this event action:

Event Action

The engineer starts this process by attaching the approval template and then starting the approval from the Document Revision header.  The email for the above approval gets fired three times for us.  I went back to the last time I tested this and still had the emails for it.

 

Email list

 

I’ll go back and verify with the users, but I’m sure if it wasn’t working with all three approval groups, including the first one, then I would be getting complaints about it.  Also, I have no custom event tied to the step, just the singular out of the box STEP_READY_FOR_APPROVAL event action.


Hi @ShawnBerk 

your example is in document management - and you’re right it works “fully” there.

The issue described is when you attach approval routings to other LU objects


@paul harland 

Thanks for clarifying, I missed the point that they would function differently against a different object than against docman.


Hi @paul harland 

It tried where current_step_no = step_no on new records, it doesn’t work because current_step_no becomes blank on new records.

then I tried on objects are changed 

 

And put if statment as 

if '&OLD:CURRENT_STEP_NO' = '' and '&NEW:CURRENT_STEP_NO' = '&NEW:STEP_NO' then

in Event Action. It works now.

Thank you.

 

Thanks,

Narsi.


I have the same issue with Business Opportunity instead of Inventory Part.

May I ask how did you retrieve the email address of the approvals to be able to specify them as ‘Sender’? did you create a custom attribute in your custom event ?  

Couldn’t even find a function to retrieve the list of users inside a person group to be able to create a custom attribute

 

Much appreciate any help

Thanks 


Reply