Where is StdChgProposalDiffViewer coming from?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello all,
I am trying to use the out of box StdChgProposalDiffViewer functionality, but I have no idea where it is located. I have tried UI Pages, Script Includes, and Processors. I even searched in the app studio to try and find it there, but no luck. is this one of those items that we are intentionally blocked from seeing at all?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @lonesoac01 ,
The StdChgProposalDiffViewer component in ServiceNow is indeed part of the platform’s Standard Change Management (StdChg) subsystem — but it is not a standard Script Include, UI Page, or Processor that administrators can view or modify through the normal application navigation. This is intentional.
What StdChgProposalDiffViewer Is
It’s an internal system UI component, implemented as part of the Standard Change Proposal comparison screen.
This component powers the side-by-side view that displays differences between the proposed Standard Change template and existing template values when someone is reviewing a proposal for approval.
It’s part of the protected logic used by ServiceNow’s std_change_proposal module, under the related-table view called “Compare proposed template”.
Why You Can’t Find It
ServiceNow hides certain low-level classes and components in the protected server package, especially those tied to out-of-box process automation UIs.
That includes:
StdChgProposalDiffViewer
StdChgProposalUtils
Several StdChg processors (e.g., StdChgProposalProcessor)
Protected UI scripts that handle the “View Differences” flyout in the Standard Change Proposal form
These artifacts live in the protected system app (com.snc.std_change_proposal), which uses minified ES5 modules stored in the platform’s internal UI framework — not as visible sys_ui_page or sys_script_include records.
This design prevents alteration of the core visualization logic and keeps upgrade integrity intact.
How to Leverage It
While you can’t modify or view StdChgProposalDiffViewer source directly, you can interact with it or extend its behaviors safely:
Use the StdChg “Compare” button
The button on the Standard Change Proposal form launches the viewer directly. You can mimic this by referencing its action std_change_proposal_compare.do?sys_id=<proposal_sys_id>.Extend via UI Action or Script Include
If your use case requires automated comparison, invoke StdChangeUtils().compareProposals() (available for extension). This method leverages the same backend class that StdChgProposalDiffViewer uses.Custom Diff Viewer Option
For customization or debugging, you may create your own comparison utility by querying the two std_change_template records (existing + proposed) and rendering a diff using GlideRecordDiff.
This approach replicates what the hidden OOB viewer does under the hood:
var oldTmpl = new GlideRecord('std_change_template');
oldTmpl.get('<existing_template_sys_id>');
var newTmpl = new GlideRecord('std_change_template');
newTmpl.get('<proposal_template_sys_id>');
var diff = new GlideRecordDiff(oldTmpl, newTmpl);
gs.info(diff.getXML());
In short, the StdChgProposalDiffViewer exists and is actively used by the Standard Change Proposal UI, but it is intentionally hidden and not administrator-editable. The best practice is to consume its results through existing extension points (like StdChangeUtils) rather than attempting direct code inspection.
you may find below thread helpful:
- https://www.servicenow.com/community/sysadmin-forum/question-about-std-change-proposal-and-std-chang...
- https://www.servicenow.com/community/developer-forum/difference-between-standard-change-and-standard...
- https://www.servicenow.com/community/itsm-forum/change-management-gt-standard-change-vs-pre-approved...
- https://www.servicenow.com/community/itsm-forum/std-change-proposal/td-p/433426
If it is helpful, please hit the thumbs button and accept the correct solution by referring to this solution in the future it will be helpful to them.
Thanks & Regards,
Mohammed Mustaq Shaik - ServiceNow Consultant
Lets connect on-- Linkedin:https://www.linkedin.com/in/shaik-mohammed-mustaq-43ab63238/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I looked into: "
Extend via UI Action or Script Include
If your use case requires automated comparison, invoke StdChangeUtils().compareProposals() (available for extension). This method leverages the same backend class that StdChgProposalDiffViewer uses."
I found that StdChangeUtils just extends the StdChangeUtilsSNC class. I went into the
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @lonesoac01 ,
As per of my knowledge you will not find it, GlideURL is a ServiceNow client-side API that helps you construct URLs dynamically — instead of concatenating strings manually.
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Short answer: you’re not crazy—StdChgProposalDiffViewer is OOB and (in most builds) it’s a protected UI asset installed by the Standard Change Catalog plugin, so you won’t see its source under UI Pages / Script Includes / Processors. You can use it, but you generally can’t open/edit the code.
Here’s how to confirm and what you can do:
What it is & where it lives
It’s part of Change Management – Standard Change Catalog (com.snc.change_management.standard_change).
Implemented as a protected UI asset (typically a UI Macro / NG template) referenced by the Standard Change proposal UI (the “compare/diff” viewer).
Because it’s protected, Studio and the classic lists won’t show you the script body. That’s by design for some OOB components.
How to locate it (to prove it’s there)
Make sure the plugin above is installed/active.
Open this list to search across metadata:
/sys_metadata_list.do?sysparm_query=nameLIKEStdChgProposalDiffViewer
You’ll see a record with Protection policy = Protected and an owning app scope (Change Management). You can reference it but not view source.
How it shows up in the UI
You’ll see the diff viewer when working with Standard Change Proposals (e.g., “Compare with template / View differences”).
In classic UI, it’s referenced by the proposal form via a formatter/related link that opens the viewer; in Workspaces it appears via the OOB component.
Customization options (supported patterns)
Since the OOB viewer is protected, you have two supported paths:
Clone the behavior into your own component
Create your own UI Macro / UI Page (or Service Portal/Now Experience widget) to render a diff.
On the server, compute differences using server APIs (e.g., compare field-by-field between the proposal and the template) and pass a structured diff to the client.
Replace the OOB related link/formatter with your custom one (UI Action or form formatter) in your scope.
Wrap the OOB flow, not the code
Keep the OOB viewer as-is, and add UI Actions / Business Rules / Flows around the proposal lifecycle for your custom behavior (e.g., pre-validation, additional fields, policy checks), but don’t attempt to modify the StdChgProposalDiffViewer itself.
Troubleshooting tips
If you don’t see the viewer at runtime, check:
Roles/ACLs for Change and Standard Change objects.
Whether the record is a Standard Change Proposal (not a normal change).
The plugin is installed and your UI Actions / related links weren’t removed by customization.
Bottom line
Yes, it’s intentionally hidden (protected) OOB content.
You can use it; you generally can’t view/edit the internals.
If you need to customize, build your own viewer and wire it into the proposal UI via your own macro/page/widget or action.
