- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 01:03 AM
Hi,
I have Customer Service Application in my Servicenow instance which consists of contracts and entitlements. Each customer company of ours might have 1 or more than 1 contracts and obviously, 1 contract has multiple entitlements. So, after referring to the documentation, I have decided to create two related lists on Incident form --> one for Contract and the other for Entitlements. And to do this, I got to know that I need to create or specify relationship.
The Customer Company name is one of the fields in my Incident form. When the Company is selected, the Related Contracts should be viewed and based on the Contract, the Entitlements should be shown.
I am unable to understand how to do it as I hardly have any knowledge on Servicenow.
Please help. Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 03:33 AM
Hi Raju,
Where is the contracts and entitlemensts data stored? I will assume on a different table than incidents, and so the first part seems straight forward - create a relationship between the incident table and the contracts table:
System Definition -> Relationships -> New
Name: incident contracts
Applies to table: incident
Queries from table: ast_contract --> or your contracts table
Script:
(function refineQuery(current, parent) {
// Add your code here, such as current.addQuery(field, value);
current.addQuery('company', parent.company); //company is the field name in your contract table and incident. Might be called u_company if you added it manually...
})(current, parent);
harel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 06:32 AM
Hi,
I was able to solve it. Actually, it was not company. It was vendor.
Thanks for the supprot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2017 11:27 AM
Excellent
If my response answered your question, please mark it as correct, so it can be removed from the unanswered list.
Thanks
harel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-22-2022 06:35 AM