Posted: 22 May 2020 6:00 EDT Last activity: 26 May 2020 5:51 EDT
How to get name of Work Page
Its a best practise to avoid hardcoding of pyWorkPage when developing rules in Pega. @getStepPageName() will return the name of the step page that may not always be the work page. How do we get the name of the current work page when we are in a context other than the work page itself. For example: When we have an embedded data class and we are calling a Data Transform on the data class.
***Edited by Moderator Kayla to update Platform Capability tags****
Thanks for your inputs. Top does help to get the work page in the context that is mentioned above. However, lets say we have a data page that's used in a section of a work page. If I need to get the name of the work page from the Data Transform that sources this data page, using Top, Primary, getStepPageName, getTopevelPage will not return the data page and not work page. Any idea on how we can get the work page in this case?