For a Custom SN Application, how to include reference contributions for a field in Incident form.

akadu
Tera Contributor

Hi, I have created a UI Macro Icon say custom-icon , which will basically open a form that belongs to our Custom application, in a new pop-up window.

I have added the UI Macro custom-icon beside a caller [caller_id] field in the Incident[task] table by adding ref_contributions=custom-icon in the attributes section of the caller field.

Requirment: whenever our custom application is installed in a new ServiceNow Instance the custom-icon UI Macro should appear beside the caller field in the Incident Table.

Problem: I have created an application file [The class type is Metadata Snapshots] in our custom Application for the ref_contribution Atribute. But I have noticed that the sys_id of the caller field changes from Instance to Instance. And the Application file that I have created refers to the sys_id of the caller field from the previous Instance. Hence, when the Application is installed in a new ServiceNow Instance the UI Macro is not displayed beside the Caller field.

Question: Is there any other way by which I can include the ref_contribution attribute in our custom application? Or is there a way to change the sys_id of the caller field in the Metadata Snapshots Application file before Installing the Application on a new Instance?

1 REPLY 1

Mark Manders
Mega Patron

Make it dynamic. Add a script to your application to first find the sys_id of the field and do your logic from there. Or create a system property that you fill with the sys_id, so you don't have to create a dynamic script.


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