Question

3
Replies
438
Views
adusv Member since 2014 2 posts
PEGA
Posted: November 27, 2017
Last activity: December 4, 2017
Closed

How to subscribe a function on close and open of a document(Harness) for a multi document container

Hi,

I've a requirement to subscribe a function on close and open of a document(Harness) for a mulit-document container across the application.

I achieved for modal dialogs by using below code.

pega.u.d.attachOnload(function(){
pega.u.d.modalDialog.subscribe("show",function(){
f1();
});
pega.u.d.modalDialog.subscribe("hide",function(){
f2();
});
});

Scenario: My work area(multi-document container) has a list of work items. From those, I'm opening a work object, where the assignment's flowaction has "IF AN ASSIGNMENT IS NOT BEING PERFORMED" is configured as Close the work object and also has a custom button to FINISH ASSIGNMENT(inside the flowaction section). So, once after clicking on the button it closes the document and falls back on to the work area, while fallback I want to subscribe a function which calls a custom function (likewise for modal dailog).

Please suggest an approach.

User Interface
Moderation Team has archived post
Share this page LinkedIn