Configure EVAM to only return producers and items available for the logged in user?

Aaron Dalton
Tera Expert

Hello! I'm working on a portal in UI Builder and have been trying to set up an EVAM to basically get a service catalog going. Right now it's only got record producers in it, but I was wondering if there's a way to have the EVAM respect the "Available for" user criteria when returning the cat items and producers?

I can't seem to get anywhere beyond the basic EVAM config documentation that's out there and I didn't see any specific catalog oriented component available in UIB. Has anyone set up a catalog in a UIB portal and run into this before?

1 ACCEPTED SOLUTION

Muralidharan BS
Mega Sage
Mega Sage

Hi Aaron, 

I haven't tried this but I believe this should work,

1. configure EVAM to fetch records "dynamic me".

2. create a transform and get input from EVAM to check the criteria, you can infuse this API in the script section of the transform to check the access. 

GlideappCatalogItem.get('catalog item sys_id').canView();

collect the items and return the transformed object. 

Thanks

Thanks

View solution in original post

5 REPLIES 5

Maik Skoddow
Tera Patron
Tera Patron

Hi

please watch the following video with an example for catalog items: https://www.youtube.com/watch?v=12xlZAMrjt0

Maik

Hey Maik! This video doesn't really go over specifically limiting an EVAM data source to only return items that are available for the logged in user. I've got my EVAM connected and working, but it shows items that aren't supposed to be available to the user who's logged in.

The user still can't access the item, so when it loads on the catalog item component they get the "You are either unauthorized or the record is invalid" error, but I'd much prefer they not even see the card if they aren't allowed to submit that particular item.

Okay, I understand.

I'm not that deep in that topic but in such cases my last recommendation is creating a "before" Business Rule for the EVAM records which does the filtering. Maybe that helps.

Maik

Muralidharan BS
Mega Sage
Mega Sage

Hi Aaron, 

I haven't tried this but I believe this should work,

1. configure EVAM to fetch records "dynamic me".

2. create a transform and get input from EVAM to check the criteria, you can infuse this API in the script section of the transform to check the access. 

GlideappCatalogItem.get('catalog item sys_id').canView();

collect the items and return the transformed object. 

Thanks

Thanks