Absent Member.. vnarend Absent Member..
Absent Member..
1596 views

Approval comments to be disabled

Hi All,

 

We have a requirement like, approval comments popup up should be disabled.

 

I am aware this we can do by unchecking the approval comment check in cm3r object, but here we have an integration with the external system, where approval comments will be updated.

 

If we disable approval comment in cm3r object it doesn't capture approval comments provided by external system will not be captured.

 

Now my my requirement is to enable the approver comments in cm3r object, but it shouldn't popup for approval comments while approving the change. but it can popup while denying the change request.

 

Kindly help me on getting this.

 

Thanks,

VND

 

 

 

 

0 Likes
32 Replies
Piku Absent Member.
Absent Member.

Re: Approval comments to be disabled

There was one thread regarding same from Jacob on forum.

excerpt from that,
==
When a user clicks any of the Approve, Deny, or Retract buttons on an Approval record, it calls one of the approval.* Processes.

That Process checks the status of the "approval.comments" field from the Object record to determine whether or not to require approval/denial/retraction comments.

However, the variable it is looking for in the Process record is:
approval.comments in $L.parent.object

o you could change the value of this parameter as it passes to the RAD application approval.approve to determine dynamically whether or not to require approval comments.

For instance, in our implementation of SM7, mandatory Approval comments are only required on Change records only if the date falls within certain periods and is overridden by Change Management.

So, on the Override>Approve One, Override>Approve Current, Override>Approve All buttons, we check to see if the planned start or end of the change is within the specific date range, and if so, pass a variable ($override=true) to the Process.

Then, on the Pre-RAD expression before the system calls approval.approve, we added the following line:
if (current.phase in $L.approval.parent="Change Approval" and $override=true) then (approval.comments in $L.approval.parent.object=true)

So when the RAD runs, it requires approval comments.

So you're not limited to an all or nothing approach.
==

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. John Stagaman Absent Member..
Absent Member..

Re: Approval comments to be disabled

 
----------------------------------------------------
Kudos - what, where, how, and why
Want Good Answers? Ask Good Questions...
0 Likes
Absent Member.. vnarend Absent Member..
Absent Member..

Re: Approval comments to be disabled

Hi All,

Thanks for you reply, I have added following code to the approval.approve process pre RAD Code.

if (current.phase in $L.approval.parent="CR Approval" and $override=true) then (approval.comments in $L.approval.parent.object=fale)

it is still approver comment popup is coming.

Thanks, Narendra

0 Likes
Piku Absent Member.
Absent Member.

Re: Approval comments to be disabled

did you added the variable ($override=true)
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. vnarend Absent Member..
Absent Member..

Re: Approval comments to be disabled

Hi

 

Yes, this is already ther in my condition.

 

Or you want me try with only $override=true conditon.

 

 

Thanks,

VND

0 Likes
Piku Absent Member.
Absent Member.

Re: Approval comments to be disabled

In which display option you have set the override value and how?
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. vnarend Absent Member..
Absent Member..

Re: Approval comments to be disabled

Hi,

 

No i have not added in any display option.

 

 

Thanks,

vnd

0 Likes
Absent Member.. vnarend Absent Member..
Absent Member..

Re: Approval comments to be disabled

I tried by setting in Approval->Approver display option as follows

approval.override in $L.env=true.

but still no luck.

Do I need add in this in both approval process rad and display option. I tried by adding in dsiaply option only.


Thanks in advance for you input.
0 Likes
Piku Absent Member.
Absent Member.

Re: Approval comments to be disabled

You have to set ,
$override=true
in required display option (button)

 

Add the

f (current.phase in $L.approval.parent="Change Approval" and $override=true) then (approval.comments in $L.approval.parent.object=true)

in process capproval.approve in Pre-RAD expression before the system calls approval.approve RAD.

 

hth,

 

____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. vnarend Absent Member..
Absent Member..

Re: Approval comments to be disabled

Hi,

 

 

Thanks for your help, I just need one small clarification on first parameter

In display options where I need to configure $override=true, is it in condition or user condition or rad, etc....

 

 

Thanks in advance,

VND

0 Likes
Piku Absent Member.
Absent Member.

Re: Approval comments to be disabled

in pre-rad expression.
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
0 Likes
Absent Member.. vnarend Absent Member..
Absent Member..

Re: Approval comments to be disabled

Hi,

I have added to the pre rad expression of respective approve button, but still no luck.


Thanks,
VND
0 Likes
Piku Absent Member.
Absent Member.

Re: Approval comments to be disabled

can not say and I never tried but should work.
Just add the expression in post-js to check variable value,

print(vars.$override);

and in process similarly add in post js,

print(approval.comments in system.vars.$L_approval_parent_object)

hth,
____________________________________
Assign Kudo, if found post useful and mark it accepted if solves the issue.
Absent Member.. vnarend Absent Member..
Absent Member..

Re: Approval comments to be disabled

Hi,

 

Thank you so much for you inputs,

 

I have added print statements as per you suggestion.

i am getting following error error after clicking approve button.

 

Process panel run.post.exp in RAD se.call.process encountered error in line 4 (se.call.process,run.post.exp)

Cannot evaluate expression (se.call.process,run.post.exp)

Cannot evaluate expression (se.call.process,run.post.exp)

Script <UNKNOWN>  line 2: ERROR ReferenceError: approval_comments is not defined at char 1

Unrecoverable error in application:  se.call.process on panel run.post.exp

Hello

approve 1

Postpone Flag FC - false

 

I am attaching screen shot of process and button records for your reference.

 

Thanks,

 

vnd

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.