Vendor management workspace

Liz Abraham
Tera Contributor

Hello,

 

I installed the Vendor Management plugin in my PDI and was playing around with the functionality when when being on an incident form, you set the state to "On Hold" and reason  to "Awaiting Vendor", it should show vendor related fields on a tab. I am currently getting the error " getReference for cmdb_ci not allowed: missing callback function as parameter". Since this is out of the box, is there a fix? below is a screenshot of the client script. any thoughts? I did not want to change anything since these are out of the box.

 

LizAbraham_0-1689781981450.png

LizAbraham_1-1689782023966.png

 

 

 

 

7 REPLIES 7

Ohh yeah, if this is a scoped application, GlideRecord isn't available on client scripts in Scoped apps.
You would have to make a GlideAjax and move the logic to a script include for server-side stuff.

I can't imagine this is ootb made by SN?
It's to many errors in the script for SN to mess up this bad 😂

Also this script just looks like it's trying to show/hide fields based on different conditions.
You are probably better of by going no-code and configuring this as a UI Policy.

Thank you for the insight ! So the code is looking to show vendor fields based on the selection of the state and reason for hold. But it is also looking to see if there is a CI associated to the incident and if so, looks at the cmdb_ci table to grab the vendor/manufacturer. and that's where i was struggling.

Yeah, so because the data is not directly on the form, the client needs to do a lookup server side for that CI.
I would split this into separate scripts.
The conditions that show/hide fields that don't require a look up on the server  -> UI policy.

The condition that requires a lookup -> Client Script with a GlideAjax to a script include that does what you need.