Cloning widget-form in scoped app errors GlideTableDescriptor

lrossy31
Tera Expert

I am running with an error that shows me the message GlideTableDescriptor is not allowed after cloning the form widget in the service portal. Also I cannot see the form but just the record not found. This is when trying to clone the widget from a global scope to a custom app scope. Will appreciate if anyone can point me on how to get this widget to work properly with a scoped app.

The lines I found on the server script are:

lines 130

if (!GlideTableDescriptor.isValis(data.table))

return;

 

later on on lines 146

data.canAttach = hasRecordAccess && gs.hasRole(gs.getProperty('glide.attachment.role')) && !GlideTableDescriptor.get(data.table).getED().getBooleanAttribute("no_attachment");

Will greatly appreciate any assistance.

3 REPLIES 3

Adrian Ubeda
Mega Sage
Mega Sage

Hi lrossy 31,

In which scope is your widget clone? Go to your company applications and inside your applications see if it is one cross access scoped request, if does change it to allowed and then check.

Other possible solution would be: clone the widget into glocal scope, then place it where need it. After that, check if a cross scoped application request appears and if does, allow it.

Here you have some doc: https://docs.servicenow.com/bundle/sandiego-application-development/page/build/applications/task/set-RCA-level.html

If it was helpful, please give positive feedback.
Thanks,

If it was helpful, please give positive feedback! ✔
☆ Community Rising Star 22, 23 & 24 ☆

shloke04
Kilo Patron

Hi,

After going through couple of threads in community, it looks like "GlideTableDescriptor" is only supported in Global Scope and does not work in Scoped Application.

Please go through the below thread where a similar query has been answered:

https://community.servicenow.com/community?id=community_question&sys_id=9ee7d83a1b8373c8ada243f6fe4bcb58

https://community.servicenow.com/community?id=community_question&sys_id=07d95822dbcabf005d782183ca9619fb

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

lrossy31
Tera Expert

Thanks a lot guys. We found the issue. It is in the server script and we removed the line if (!GlideTableDescriptor.isValis(data.table))

then updated line 136 which is data.tableHierarchy = new GlideTableHierarchy(data.table); by commenting out the GlideDBObjectManager..... Also remove the data.canAttach line since it has the GlideTableDescriptor in it.

I had already created the url link correcly and by making these changes the page loaded correctly without any errors.

Thanks guys for the responses. Really appreciate it.