Transform Map Scripts
Transform Map Scripts Go to Transform Map – Click on New. We can write script in the transform map by checking the run Script checkbox. And another way to write a script is in the Field Map to Check the Use Source Script Or another way is Click on Transform Script- new These are the Three ways in Transform mapping where we can write the Script n Load Data Transfer seven types of scripting is present they are as follows: 1.onStart:- Executes at the beginning of the transformation process. Or It Runs only once, before any row is processed. It is used for File validation, initialize variables, Stop entire transform Use Case: – Abort transform if the wrong source table is used. 2.onAfter:-Executes after each record is inserted or updated. or it runs for every row After mappings are complete. It is Used for Update target record, add work notes, Create related records. Use case: – Add work note after incident creation. 3.onBefore:-Executes before each record is inserted or updated. or it will run for every row and Before field mappings. It is Used for Modify source data, set default values, Skip individual rows. Use Case: – Set default priority if empty. onChoiceCreate:-Executes when a choice value needs to be created during the transformation. or it runs When a new choice value is created during transform. It is used for Modify choice labels, Control Dynamic Choice Creation. Use Case: – Convert imported priority value into proper label. onComplete:- Executes at the end of the transformation process. Or it runs Once and After all rows are processed. It is used for Logging, Notifications, Cleanup. Use Case: – Log transform completion. onForeignInsert:- Executes when a related record is inserted. Or it runs when a new reference (foreign) record is created. It is used for Modify referenced records, Set default values for reference tables. Use Case: – Create new caller in sys_user during Incident import 7.onReject: – Executes when a record is rejected during the transformation. or It runs When a record is rejected and ignore = true or transform error occurs It is used for Error handling, Logging rejected records. Use Case: – Log skipped records.
