UI Action Complete button pop up not working in problem task

Venkatapuram Ga
Tera Contributor

Hello 

 

I Need some help I am getting some issue in problem task  when ever  I am going to complete problem task  it was show some error  please look on into screenshots Easily you can understand 

 

In my company instance popup showing only three fields  in PDI it was showing all fields  I cross checked UI Action everting same on Instance And PDI where we can achieve this please let me know PDI Iamge .pngInstance When i click Complete.pngdev when i click ok button.png 

 

Please let me know any one have any idea regarding this one 

2 REPLIES 2

Mark Manders
Mega Patron

Can you share your UI action code as well? That will show what is expected. If you are calling a form to popup, maybe that form isn't complete on your client instance.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

HI  Mark Manders

 

I cross checked Both Complete UI Actions Everything is good 

UI ACTION code in  MY  instance 

function moveToClosedComplete() {
    if (g_form && g_form.mandatoryCheck()) {
        ScriptLoader.getScripts("ProblemModalUIHelpers.jsdbx", function() {
            ProblemModalUIHelpers.ProblemTask_MoveToClosedComplete();
        });
    }
}
 
 
UI scripting 
 
ProblemModalUIHelpers.ProblemTask_MoveToClosedComplete = function() {
    if (!g_form.hasField('state') || !g_form.hasField('close_code')) {
        getMessage('Cannot Complete the Problem task as \'State\' or \'Close code\' is not visible', function(msg) {
            g_form.addErrorMessage(msg);
        });
        return false;
    }

    var sysId = g_form.getUniqueValue();
    g_form.setValue('state', g_scratchpad.PRBTASK_STATES.CLOSED);
    g_form.setValue("close_code", "completed");
    if (g_form.mandatoryCheck()) {
        g_form.save();
        return;
    }
    g_form.clearMessages();
    var width = 850;
    var modalName = "ptask_complete_dialog_view_1";

    if (g_form.getValue("problem_task_type") != "rca") {
        width = 900;
        modalName = "ptask_complete_dialog_view_2";
    }
    var formValues = {
        state: g_scratchpad.PRBTASK_STATES.CLOSED,
        close_code: 'completed'
    };
    var ob = new ProblemModalUIHelpers();
    ob.openModal(modalName, getMessage("Complete"), width, formValues, "state_to_closed_completed");
};
 
 
 
Please look on this code some where something missing  those codes are OOB Code