cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Rules for Visibility in SAP C4C

krishna1502
Participant
0 Likes
1,571

Hi,

I have the following requirement.

Requirement:

A rule for a field inside Ticket should be made Visible only if the current logged in user is same as the Agent handling the ticket. i.e User in the "Assigned to" filed.

Rule tested:

The below image shows an example of the rule that was tested.

There's something missed out in the above rule. What exactly should be written in the rule to achieve this requirement?

Any response would be highly appreciated.

Regards,

Krishna

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member226
Employee
Employee

HI,

It is not possible to perform such validation from "Key User Tool" rules because "GETUSERNAME()" function will just give you the login user ID (Like ADMINISTRATION01) whereas Root.ProcessorPartyID will return a Internal Busienss Partner Number(800010101) for logged-in user.

However, you can do this via backend PDI logic as follow:

1. Create a KUT or PDI extention field and enable it for script at backend.

2. Write an ABSL script on Party/Root BeforeSave in respective BO and determine the "Root.ProcessorUUID".

3. Use the processor party UUID from step 2 and query Identity BO based on BusinessPartnerUUID/content field and get ID/content and store it in the field created from Step 1.

4. Finally create a new UI rule where you will compare the value of logged in user (GETUSERNAME()) with field created and updated from step 1 to 3.

This should solve the purpose.

BR
Saurabh

krishna1502
Participant
0 Likes

Hi Saurabh,

Tried following your steps. On passing the Processor Party UUID to query identity BO, no results are displayed. Where am I going wrong? PFB the code for the same.

Thanks,

Krishna