Create new table records on clicking ui action button from another table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-13-2024 11:57 PM
So I have a requirement ,when I select list of records in list view in table A and click ui action button (Approve) those records should be transferred and create new record in Table B, Also those records in table A should updated status as approved. How to achieve this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2024 12:44 AM
Hi @Sharath807 ,
I tried your problem in my PDI and it works for me
For example your Table A = Case Table (sn_customerservice_case) and Table B - Incident table(incident)
Create UI Action on Case table i.e, Table A and add below code
var gr = new GlideRecord('incident');
gr.initialize();
gr.sys_id = -1;
gr.u_case = current.sys_id;
gr.insert();
action.setRedirectURL('incident.do?sys_id='+gr.sys_id)
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
ā06-14-2024 12:59 AM
Why do you set the sys_id = -1?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2024 03:37 AM
I thought before like @Sharath807 want to navigate to new record i.e., I gave sys_id as -1 there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-14-2024 01:47 AM
@Community Alums Hi , actually i need the Ui action button list banner, and when i select list of records from the list,and click button that selected list should create record in other table.( eg. 5 records selected, 5 record should create in other table)