onRetrieve Script Example

Hello

I am creating some new attributes in IDM to an object and need to be able to query / filter the attribute based on another. Essentially, this is an Organization update, which I need to filter / return only existing orgIDs if they match a certain attribute assigned to those attributes. So, this is a virtual attribute based on filter of orgIDs on the object when they meet certain criteria / calculated. Was going to use an onRetrieve script to filter those but trying to find an example of an onretrieve script to run the filter or other query syntax (e.g. orgattribute = true) for the virtual attribute.

Thanks
Nick

Hi @nick.hunt,

So basically, if I understand well, the onRetrieve hook produces a value based on some context, which I am not sure I have captured well… does it depend upon the content of the request being made (including filter), or the actual target object(s) state? Anyway, the bindings for the onRetrieve trigger is provided here: Script triggers defined in the managed object configuration :: ForgeRock Identity Cloud Docs

Also, wouldn’t creating a custom endpoint more appropriate for this use case?

Regards
Patrick