Call ImportSet API internally in a script

thisisauniqueus
Giga Expert

Hi,

I have a script creating/updating records and i have to manually take care of the coalesce. Is there a way i can use the ImportSet API internally in a script include?

Like the postRecordStagingTable

find_real_file.png

Regards

7 REPLIES 7

As long as you insert the records in import set table, Transformation process will be taken care of by platform itself.


To answer your second question on sys_id, the response will be target record sys_id once you insert record in import set table. Sample script



var gr = new GlideRecord('PASS IMPORT SET TABLE');


var sys_id = gr.insert(); // I think this will return target table record sys_id.



I think line var sys_id = gr.insert(); will return target table record sys_id. Can you please test this once. Thank you.


Let me know if that answered your question. If so, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list. Thank you


How To Mark Answers Correct From Community Inbox


Hi Pradeep,



i can confirm that inserting record in the import set table automatically takes care of the transforming it. But it does not return any info about the newly created record.



Regards