- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2017 02:26 AM
hello i need to create a record in a table in an instance using a rest message in an other instance , but i got the code 200 wich is success
this is my post method:
and this is my table:
any idea pls ,
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2017 03:30 AM
Hi Soukayna,
With one endpoint there is only one table associated so that won't be possible.
For inserting into different tables different endpoint will be there.
Mark Correct if this solves your issue and also hit Like and 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
‎08-07-2017 04:09 AM
hey ankur i will do it a just have one more question ,
i nsert sone record in my table using the rest and i want to get the sys_id in of those record in my business rule to i cant insert it in another table , any idea
??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2017 04:13 AM
Hi Soukayna,
Can you explain in more details?
Regards
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
‎08-07-2017 04:18 AM
sure,
well i need to add record in 2 tables using 2 rest messages , the first one works without any problems , but in the second i a field is a list of sys_id from my 1st table and my business rule is an other instance than the tables , so how can i after inserting in the first table get the sys_id of those record to i can make them in the second one ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-07-2017 04:25 AM
Hi Soukayna,
As far as I understood from your details, you are inserting record in table A via REST API.
Now you want to insert record in table B in same instance and while creating record in table B you need to populate the reference of the record just now created via REST API for table A.
If this is correct understanding then have business rule after insert on Table A and create record in table B via script and populating the current.sys_id in the table B field which refers to table A.
Mark Correct if this solves your issue and also hit Like and 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
‎08-07-2017 04:30 AM
hi ankur,
i have a table A in my instance1 wich i use a business rule in it to call the api message to insert some of fields from this table A in a table B in instance 2 and other fields from table A and a list of records from the table B in a table C which is in instance 2 .
i want to get sys_id of element just inserted in table B to populate a list in table C (they are in the same instance)
hope i m clear ?