Question
Virtusa
IN
Last activity: 10 Jun 2023 19:51 EDT
Get class name by Case ID
Hello Guys,
Is it possible to get class name by passing case ID as a parameter? Ideally I should want a function or data page that accept case ID as parameter and returns the class of the case ID.
Thanks in advance :)
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Updated: 6 Apr 2023 7:55 EDT
NCS Pte. Ltd
SG
Hi @BATTINIRAMESH: I don't see a technical limitation to achieve this using data page. If this is specific to any case type, you can create data page in specific case layer with source as Report definition. Pass parameter to to Data page and Report definition to fetch the class based on case ID. You can use the data page as list and use the first result (or) can have it as type page and define a response data transform to set required properties to the data page.
If you are planning to have this as a common feature, you can create the data page and RD in Work-. Please note that there are chances multiple case types can have same prefix which you need to handle.
Alternatively check if lookup helps.
Thanks.
Virtusa
IN
@ArulDevan Hello, Thank you
I have two case types with same prefix :)
Coforge
IN
Can you check if the classes of both case type are pointing to a common class group or not?
If yes then you can write a RD at that class group and pass case ID to fetch the obj-class.
NCS Pte. Ltd
SG
Hi @BATTINIRAMESH: In such case there are chances of common pyID value in both class. What is the expected output here?
Rather can you check if you can make use of pzInsKey / any other parameter to determine the class?
Thanks.
Virtusa
IN
@ArulDevan Hello,
Actually Pega is handling not to create cases with common pyID value in both classes.
The expected output is, I should have a data page or function which will accept case id as a parameter and returns the class name of that case id. So that I can get rid off hardcoding class names every time.
Updated: 17 Apr 2023 7:50 EDT
NCS Pte. Ltd
SG
HI @BATTINIRAMESH: Thanks for enlightening me. In this case, have you tried to create a report on your class group or in Work-?
Thanks.
Updated: 6 Apr 2023 13:08 EDT
Bentego
TR
Hi @BATTINIRAMESH
Case type rule instance should include case ID prefix and work class mapping. Kindly follow points below.
1. Introduce an activity with caseID prefix parameter. Try to find all case types belong to application. (Obj-Browse) then after filter caseID prefix and work class mapping result page (it should be stored in some page in case type rule instance - try to find it) by caseID prefix parameter value.
2. Let me know the result.
Regards.
Mert.
Bits In Glass
GB
Where do you want to refer class name?
Virtusa
IN
Hello @KC-Abburi
For suppose when we are using Obj-Browse method, We don't want to hardcode class name because as per our requirement we don't know which class we need to browse, it depends on case.
So I am thinking of a Data Page which will give class name by accepting case ID as a parameter.
Bits In Glass
GB
You can follow the below steps
- Create D_AppExtention Data Page with source as Data Transform (AppExtention)
- In AppExtention Data Transform set your case type class value to .Workclass(CaseType Name) value list property
Example:
Assume your case type class is MyOrg-Demo-Work-ABC then set MyOrg-Demo-Work-ABC to .Workclass(ABC) property in AppExtention Data Transform.
You can refer to this property wherever you want with the D_AppExtention.Workclass(ABC)