Hello,
I have added a security expression in record-level security to handle complex filter criteria that include the logged-in user as one of the filters.
I am exporting the record information using related actions and a scheduled job.
Export from the related action is fetching the expected output; however, export using the scheduled job is not returning the correct results because the record-level security condition is failing due to the logged-in user check.
To get the correct results, do I need to explicitly pass the filters defined in record-level security when querying the record from the scheduled job? Or is there a better way to achieve the same results?
Please advise.
Discussion posts and replies are publicly visible
What do you mean by not returning correct results? What is the result you are expecting and what is being fetched?If its a scheduled job and if you are trying to query data from record inside the job, the record level security will take the process model designer name. So if the designer does not have access to the record type data, it will not fetch any data. And loggedinuser does not have any meaning inside the process model because its running in the backend which is not visible to the user.