Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Page-Change-Class method

Updated on August 10, 2022

Use this method to change the class of the top-level page or embedded page identified in the Step Page column. (To change the class of an embedded page, see How to Change the Class of a Page.)

Before changing the class of a page, be sure that all properties referenced on the page are also defined in the target class (the destination class).

Parameters

This method has three parameters:

ParameterDescription
ObjClassNewIdentify the target or destination class of the page.
Data TransformOptional. Identify a data transform (in the target class or a superclass of that class) to apply to the page.
Keep Optional. Enter 0, 1 or 2 to control the how properties are added to the page. If not specified, 0 is the default.
  • 0 causes the value of a property already present on the step page to be retained — not overwritten — by the data transform .
  • 1 causes a property value on the data transform to overwrite a value already present on the step page.
  • 2 retains the values of properties already on the step page (as with 0), but with special treatment for Page List, Value List and Value Group properties, as described in the table.

ModeResults with Keep 2
Page List First, all data transform Page List elements are merged to the step page Page List. (This is the same behavior as keep 0).

Then, if the step page Page List property contains more elements than the data transform Page List property, the first element of the data transform list is used as the value for all the remaining target list elements. This differs from processing with Keep 0, which ignores the target pages beyond the size of the data transform list.

Value List and Value Group If the step page contains the property but it is empty (contains no elements), the data transform property is copied — including all its elements — into the destination. This differs from the Keep 0 behavior, as existing destination properties may be altered.
(other modes) Same as Keep 0.

Results

The system creates a new page of the target class identified in the ObjClassNew parameter.

If a data transform is specified in the Data Transform parameter, the system uses rule resolution to find the rule, and uses it as described above.

The system copies properties from the existing step page to the new page, in accord with the Keep parameter.

The previous step page (with the previous class) is destroyed.

This method does not validate property values. The page name is unaltered. This method does update the pxMethodStatus property. See How to test method results using a transition.

Restrictions

This method cannot be used in a step that involves iteration.

Have a question? Get answers now.

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

Did you find this content helpful?

Want to help us improve this content?

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

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us