Refresh a section on client using JavaScript
Just execute the following JavaScript function:
pega.api.ui.actions.refreshSection({section: "MySection"})
Of course, we can set a parameter to run a data transform or call an activity. Keep reading!
Just execute the following JavaScript function:
pega.api.ui.actions.refreshSection({section: "MySection"})
Of course, we can set a parameter to run a data transform or call an activity. Keep reading!
I tried to embed an image into a PDF using the apache POI and iText libraries but none of them worked to me. So I tried with the pdfbox library and it worked!
In this post I will show a Java function that pastes an image into a brand new PDF. The input and output of this function will be Base64 encoded.
Why did I need it? The client requested that the images attached to the case be converted to PDF in order to be sent to a service that only accepts PDF documents.
Here is an example where we invoke the pyUtilityStub
activity using the POST method by sending GET and POST parameters at the same time:
var oSafeURL = new SafeURL("@baseclass.pyUtilityStub");
oSafeURL.put("pzPrimaryPageName", "pyWorkPage");
oSafeURL.put("parameterGet1", "valueGet1");
oSafeURL.put("parameterGet2", "valueGet2");
var postData = new SafeURL();
postData.put("parameterPost1", "valuePost1");
postData.put("parameterPost2", "valuePost2");
pega.u.d.asyncRequest("POST", oSafeURL, null, postData);
Yesterday, I ruined my Dev Studio access because I private-edited an OOTB rule (pzpega_ui_invoke.js
). So I needed to discard it urgently or I would lose my operator and all my work. Unfortunately I no longer had access to the Dev Studio using my operator so I needed to do it from another operator. Here's how I accomplished it.
First, we need to mark every object to be removed by setting their property .pyDeletedObject
to true.
Then, apply the following function:
@Utilities.RemoveDeletedObjects(TopPage.MyPageList)
After applying this function, the marked elements will be removed from the page list.
Sometimes the Accept and Clear action links of the Signature control are very limited for us because we need to add some custom styling or perhaps add our own logic to them. In this post we are going to create buttons that perform the same actions as the standard Accept and Clear links.