Relationship table query.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 04:53 AM
Hi All,
I have created a relationship table as per attached and it is showing only 1 record even though i am creating multiple records(thru UI Action) from same form. Can you please check and advise what query should i write to achieve this functionality.
I also created m2m table but there we need to add it manually the records and i don't want to do it manually.
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 05:02 AM
Hi Alok,
Can you update the query as follows and try once:
current.addQuery('u_incident', parent.sys_id);
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2018 05:17 AM
Hi Ankur,
I have tried this code and it is showing all the records from relocation table and i don't want that.
I only wants to show the records that are created through UI action(Create Incident) from this particular form.
Can you please assist how this can be achieved?
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 01:55 AM
Hi Ankur,
Did you manage to find a script that would meet by functionality?
Or am i looking for some functionality that cannot be achieved in service-now?
Would appreciate your update on this.
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2018 02:11 AM
Hi Alok,
Just wanted to understand below
Is there any field on incident which stores relocation request?
if no then this query should run
current.addQuery('u_incident', parent.sys_id);
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader