Update Status In Old Cases Using Activity

 Hi All,

In this post we will see how we can use activity to update property in old cases.


Follow below steps


Step 1: Create Activity

ID = UpdateOldCasesTStatus

CL = C-C-Art-Work-T


Step 2: Define Pages & Classes

CaseData       C-C-Art-Work-T

CaseList            Code-Pega-List

CaseList.pxResults        C-C-Art-Work-T


Step 3: Define Steps


1) Obj-Browse                       Step Page = CaseList

PageName = CaseList

ObjClass = C-C-Art-Work-T

MaxRecords = 10000

GetRowKey = checked

RowKey = pzInsKey

UseLightWeightList = checked

Logic = 1 AND 2 AND 3

1  {checked}     .pyID      Contains      "TU-"

2  {checked}    .TStatus          Is Equal   "Not Started"

3 {checked}    .pyStatusWork      Is Equal   "OPEN-Booking"


2) Loop = For each embedded Page

Property-Set            Step Page = CaseList.pxResults

Param.pyID    =  .pyID


2.1)  Obj-Open              Step Page = CaseData

OpenClass = C-C-Art-Work-T

Lock = checked

ReleaseOnCommit = checked

.pyID        =    Param.pyID


Jump

When = StepStatusFail      if true = Jump to Later Step  true param = ERR  if false = Continue Whens


2.2) Property-Set        Step Page = CaseData

.pyStatusWork = "OPEN-NOTSTARTED"


2.3) Obj-Save              Step Page =  CaseData


2.4) call commitWithErrorHandling          Step Page = CaseData


2.5)  History-Add

Message Key = "Updated Work Object Status"


2.6) Label = ERR       Page-Remove         Step Page = CaseData


3)  Page-Remove        Step Page = CaseList


Thank you!! Will see you all in next blog post 😊. 

Comments

Popular posts from this blog

pxSubscript and pxListSubscript Properties In Pega

Frequently Used Date Expressions In Pega

pyForEachCount In Pega