Yes, this is for Helix Remedyforce Service Desk. A web service using a site guest license is calling APEX classes to get to this point of updating a Change Request object. It only fails with this error when the "Secure guest user record access" has been enabled in Salesforce.
I have deactivated all Approval Processes, Process Build flows, Workflow Rules, Validation Rules, and Apex Triggers related to the Change Request object and I am still getting the template error. I do not know where this other reference to a Template is coming from.
I had this issue with inserting into Change Request and it had something to do with the BMCServiceDesk__FKCategory__c field. It produced this same error. I am now calling a new APEX class to update just this field for the newly inserted record, and it works for some reason. I have declared the classes "without sharing", but it hasn't made a difference.
I was able to get a meeting with BMC Support and a BMC developer this morning, but I do not have a resolution yet.
Ok thanks for the details, you are in the right group now then, I hope your problem will be fixed...
1 of 1 people found this helpful
Is this a custom class, your webservice? If yes, I guess you have query to get an user with a limit 1. Is this the case?
Else make sure you guest user has access to the change and related fields. Via profile or sharing rule.
Paul, yes it is a custom web service. The issue has been resolved by added a Sharing Rule to the Category object for guest user profile. I had added it just before I saw your comment.
I do not quite understand why the error happening when the data has already been read from the object earlier in the APEX class, but I assume it has to do with the overall execution order and what is checked on insert/update.
But it seems to be fixed and just in time for the Winter '21 update.