Email Communication for Purchase Requisition (PR) in Specific States

Ayushi Saxena
Tera Contributor

Out-of-the-box (OOB) functionality in the Source to Pay scoped application restricts email communication when a Purchase Requisition (PR) is in any of the following states:
• Closed - Rejected
• Closed - Complete
• Closed - Canceled
• Pending Submission
To overcome this limitation, what could be the approach?

We should create a custom UI action for this or can someone please suggest. 

6 REPLIES 6

@Ayushi Saxena 

If user doesn't pass table level WRITE then Email option cannot be seen

You can do this but there is 1 risk (User can edit the record from list view)

1) create a table.None WRITE ACL and allow write even in closed states (give your states in ACL condition)

2) then create onLoad client script on INC and check state, if state is one of those closed ones then make all fields readonly

function onLoad() {
	// give your values to compare
    if (g_form.getValue('state') == '3' || g_form.getValue('state') == '7') {
        var fields = g_form.getEditableFields();
        for (var x = 0; x < fields.length; x++) {
            g_form.setReadOnly(fields[x], true);
        }
    }
}

With this you can utilize the Email option on Closed INCs and still make the fields read-only on form

I believe I have provided answer to your question.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Ayushi Saxena 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader