- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-10-2022 10:27 PM
How to import core_company table data which is in global application into customer_account data which is in customer service application
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-10-2022 10:40 PM
hi @Elin25 ,
I have two ways :-
1) Goto core_company table and from list view change the class of company as 'Account' and Customer as 'true'.
Record will automatically create in account table.
2) Export Data from core company table in excel formate and then import the data into customer_account table using transform map.
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-10-2022 11:06 PM - edited ā11-10-2022 11:09 PM
Thanks for quick response
The first way is really great option we have to do for more than 90000 records so it is bit of complexity
And 2nd way Here we don't want to export data from instance so please suggest any alternate way thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-10-2022 11:34 PM
Hi @Elin25 ,
You can goto the fixed script from application navigator and then writedown script as below :-
Then click on run script- Before that apply your own encoded query for which you wanted to update the data. Copy query from list view filter. First try to update only 2-3 records for testing.
var gr=new GlideRecord('core_company');
gr.addEncodedQuery("city=Shanghai"); //Apply query as per your requirement
gr.query();
while(gr.next()){
gr.sys_class_name='customer_account';
gr.customer='true';
gr.update();
}
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-11-2022 12:58 AM
Thank you so much appreciated
We have so many records if possible can we update records in batch wise if yes how can we do using script and it shouldn't create duplicate please suggest
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā11-13-2022 11:22 PM
Hello gunjan
I tried above changing class name but records(data) is not showing for different module
I mean record is not showing in core_company table and it is visible for customer_account table