Skip to main content

Table of Contents

Offline data transform API


Only available versions of this content are shown in the dropdown

The offline data transform API consists of a JavaScript method that helps you to run a data transform in offline-enabled mobile apps by using a Run script action or a custom JavaScript function.

Offline validation is possible with the runDataTransform JavaScript method that is available for the pega.offline object.


Runs a data transform with the specified name. You can run the data transform rule in the specified page context.


runDataTransform( datatransformName, className, pageName, callback )


Name Description Type Required
datatransformName Specifies the name of the data transform to run. String
className Specifies the name of the class to which the data transform belongs. String
pageName Specifies the name of page (page context) in which to run the data transform. If you do not specify this parameter or set the parameter to a null value, the data transform runs in the primary page context. String
callback Specifies a JavaScript object that contains success and fail methods. The success method is called when the data transform has been run successfully. The fail method is called when an error occurs after a data transform run. Function

In the following example, JavaScript code runs the SampleDT data transform of the MY-SAMPLE-WORK-DATATRANSFORMS class, in the primary page context, from a custom JavaScript function:

var offlineDTCallback = {        
	success: function() {
		console.log("Data transform ran successfully");
	fail: function() {
		console.log("Failed to run Data transform");
pega.offline.runDataTranform( "SampleDT",
Suggest Edit
Did you find this content helpful?

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Ready to crush complexity?

Experience the benefits of Pega Community when you log in.

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us