List Controls i.e. Edit button is not working properly in change record.

Hritik1
Tera Contributor

Hii Community,

I have a customized List Control in change record. As shown below, in release tab there are two buttons New and Edit.

 

 

New button when clicked is working as expected but whenever I click Edit button it says "Action not Authorized".

Kindly help me with this issue. It is effecting business operations as it's on production environment.

1 ACCEPTED SOLUTION

Hritik1
Tera Contributor

Requirement achieved. Thanks community

View solution in original post

3 REPLIES 3

Hritik1
Tera Contributor

This is my script in list control for Omit edit condition :

 

if(parent.state == 3 || current.u_change_release.correlation_display == "standalone"){
    answer = true;
}


answer=true;
var gr = new GlideRecord("change_task");
gr.addQuery("change_request", parent.sys_id);
gr.query();
while (gr.next()) {
    var wf_display = gr.getDisplayValue('wf_activity');
if(wf_display == 'Link Change to the Release')
    {
        if(gv.state=='4')
            {
                answer=true;
            }
        else
            {
        answer = false;
    }

You can try this

if(current.parent.state == 3 || current.u_change_release.correlation_display == "standalone"){
    answer = true;
}

var gr = new GlideRecord("change_task");
gr.addQuery("change_request", current.parent.sys_id);
gr.query();
while (gr.next()) {
    var wf_display = gr.getDisplayValue('wf_activity');
if(wf_display == 'Link Change to the Release')
    {
        if(gr.state=='4')
            {
                answer=true;
            }
        else
            {
        answer = false;
    }

Hritik1
Tera Contributor

Requirement achieved. Thanks community