Finish assignment from JavaScript

How can I do finish assignment from a java script function (say from a java script function in userworkform rule) ?

Hi @Byshu_Ayyappaswamy,

Pega strongly suggests using OOTB actions in order to execute activities. However, if the requirement cannot be achieved using the OOTB configuration, you can refer to the below article where a sample JS code is added for activity execution.

Let me know if it helps!

Thanks

Dipti Aggarwal

Hi @Byshu_Ayyappaswamy

I re-used “pega.u.d.submit(‘pyActivity=FinishAssignment’, null, ‘’, event);” OOTB js method from my test js like steps below.

Image 1: Introduce new js file or reuse existing from your environment.

Image 2: Import js to respective Harness

Image 3: Call your function from button’s click event.

Let me know the result whether works or not.

Regards.

Mert.