Issue with Universal Request Transfer.

kummara _siva
Tera Expert

Hi I'm currently working on universal request .

When I createad a Universal request and by using create idea ui actio I was able to create idea.

Now when I want to transfer through departments it is not working.

I created a ur and then incident now i wht to transfer it to  idea department .whether it 's possible or not.

I have configured accoding to docs i'm getting loading only when i transfer.

kummara_siva_0-1785238615153.pngkummara_siva_1-1785238650098.png

 

kummara_siva_2-1785238737283.png

kummara_siva_3-1785238788344.pngkummara_siva_4-1785238839829.png

i created all service sets,service configurations and scripted extensions as well .please help on these also the error is 

kummara_siva_5-1785238958186.png

 

1 ACCEPTED SOLUTION

Vikram Reddy
Tera Guru

Hi @kummara _siva,

 

Your transfer is failing server-side, not in the UI action. Look at the IdeaDepartmentTicket implementation of the CreateDepartmentTicket extension point in your screenshot: the createTicket function builds the record as ideaGr, but then writes to and returns a variable called incGr that is never declared anywhere in that class.

createTicket: function(urGr, serviceSetId, serviceId) {
    var ideaGr = new GlideRecord("idea");
    ideaGr.initialize();
    var copyFields = gs.getProperty("com.snc.universal_request.copy.attributes");
    var copyFieldsList = copyFields.trim().split(",");
    for (var i = 0; i < copyFieldsList.length; i++) {
        var fields = copyFieldsList[i].split("=");
        ideaGr.setValue(fields[0], urGr.getValue(fields[1]));
    }
    ideaGr.insert();
    return ideaGr.getUniqueValue();
},

That looks like a leftover from copying the Incident version of this extension (which legitimately uses incGr) without renaming every reference to ideaGr. Since incGr is undefined, the script throws before the idea record is ever inserted, which is exactly why the routing call to /api/sn_uni_req/ur/routePrimaryTicket comes back as a 500 in your last screenshot and the Transfer Ticket dialog just spins forever.

Fix the variable name in the extension instance script and try the transfer again. If it still fails after that, paste the actual server-side error from the system log for that same transaction and I can dig further.

 

Thank you,
Vikram Karety
Octigo Solutions INC

View solution in original post

1 REPLY 1

Vikram Reddy
Tera Guru

Hi @kummara _siva,

 

Your transfer is failing server-side, not in the UI action. Look at the IdeaDepartmentTicket implementation of the CreateDepartmentTicket extension point in your screenshot: the createTicket function builds the record as ideaGr, but then writes to and returns a variable called incGr that is never declared anywhere in that class.

createTicket: function(urGr, serviceSetId, serviceId) {
    var ideaGr = new GlideRecord("idea");
    ideaGr.initialize();
    var copyFields = gs.getProperty("com.snc.universal_request.copy.attributes");
    var copyFieldsList = copyFields.trim().split(",");
    for (var i = 0; i < copyFieldsList.length; i++) {
        var fields = copyFieldsList[i].split("=");
        ideaGr.setValue(fields[0], urGr.getValue(fields[1]));
    }
    ideaGr.insert();
    return ideaGr.getUniqueValue();
},

That looks like a leftover from copying the Incident version of this extension (which legitimately uses incGr) without renaming every reference to ideaGr. Since incGr is undefined, the script throws before the idea record is ever inserted, which is exactly why the routing call to /api/sn_uni_req/ur/routePrimaryTicket comes back as a 500 in your last screenshot and the Transfer Ticket dialog just spins forever.

Fix the variable name in the extension instance script and try the transfer again. If it still fails after that, paste the actual server-side error from the system log for that same transaction and I can dig further.

 

Thank you,
Vikram Karety
Octigo Solutions INC