You need to sign in to do that
Don't have an account?
Daniel Rudman 7
LastViewedDate in Summer '20
Hi,
Seeing a problem this week where the users of our managed package have started seeing an error related to permission access for the LastViewedDate on an object in our managed package.
when users open our editor page in their org, our apex control queries for the underlying customer object records which make up the model for the editor. the custom objects from our managed package. We perform a global apex describe. The LastViewedDate and other such hidden fields have started to be returned by the apex describe calls.
Schema.DescribeSObjectResult objectDescribe = globalSchema.get(objectName).getDescribe();
Map<String,Schema.SObjectField> objectFields = objectDescribe.fields.getMap();
But then when we perform isAccessible check, it returns false. The isAccessible check is required by Salesforce security review.
If you run the global describe from a dev console within the subscriber org, the LastViewedDate field is not returned.
We are seeing this on sandboxes CS105 and CS93, which are on Summer '20 Patch 13. Seems like a bug was introduced in Salesforce. These fields should not be returned by describe or if they are they should be accessible. On other sandboxes on Summer '20 we are not seeing this issue. Patch 12.6 does not seem to have this issue.
I know that adding tabs for these objects solves the issue, but the question is why this problem is showing up now.
Seeing a problem this week where the users of our managed package have started seeing an error related to permission access for the LastViewedDate on an object in our managed package.
when users open our editor page in their org, our apex control queries for the underlying customer object records which make up the model for the editor. the custom objects from our managed package. We perform a global apex describe. The LastViewedDate and other such hidden fields have started to be returned by the apex describe calls.
Schema.DescribeSObjectResult objectDescribe = globalSchema.get(objectName).getDescribe();
Map<String,Schema.SObjectField> objectFields = objectDescribe.fields.getMap();
But then when we perform isAccessible check, it returns false. The isAccessible check is required by Salesforce security review.
If you run the global describe from a dev console within the subscriber org, the LastViewedDate field is not returned.
We are seeing this on sandboxes CS105 and CS93, which are on Summer '20 Patch 13. Seems like a bug was introduced in Salesforce. These fields should not be returned by describe or if they are they should be accessible. On other sandboxes on Summer '20 we are not seeing this issue. Patch 12.6 does not seem to have this issue.
I know that adding tabs for these objects solves the issue, but the question is why this problem is showing up now.
Greetings!
I would suggest you to reach out to the Salesforce.com support since you are experiencing this issue after the release.Also,I would request you to keep the details of the Orgs which are on previous release in handy to prove that the issue was occuring after release only.
Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.
Warm Regards,
Shirisha Pathuri
Did you get a resolution/Response?
anyways we easily patched and worked around it in our package, so was not worth the time going back and forth with support.
what was your workaround?