'Secure query included inaccessible field' on Related Jira Issues
Problem
The message - Insufficient permissions: secure query included inaccessible field - appears in the following scenarios:
- When viewing the Related Jira Issues Visualforce page or Lightning Web Component
- When creating Jira Issue from Salesforce (on Create Issue page)
- When viewing Jira Issue details in Salesforce
- When linking Jira Issue from Salesforce
For example:
Diagnosis
Please check and confirm the following configurations.
1. [All scenarios] Check if the Salesforce User has assigned the "zAgileConnect Subscription User" permission set in Salesforce Setup → Permission Sets.
2. [Scenarios 1, 2 and 4] If you had created custom fields on ZIssue__c Object when installing zAgileConnect, then check if the relevant Salesforce Profiles have Field Level Security set to Read and Edit access for those fields.
3. [Scenario 2] Check if fields mapped to Jira Issue in package configuration Step 6 are accessible to the user experiencing this error.
4. [Scenario 3] Check if the user has read/write permissions on the junction object that represents the relationship between Salesforce object and ZIssue. For Case, it would be ZIssue_Case__c.
5. [Scenario 2 and 4] Check if the fields to send to Jira in package configuration Step 4 are accessible to the user experiencing this error.
Cause
Related Jira Issues page is enforcing CRUD and FLS permission on the package objects and so if the current user can't read these objects or field in these objects then Salesforce returns the described error message.
Resolution
- Assign the "zAgileConnect Subscription User" permission set to all your zAgileConnect Users.
- Grant Read and Edit Access to any custom field you may have defined in ZIssue__c object. This can be done updating the Salesforce Profiles or by creating a new Permission Set for these additional fields and assign it to all your zAgileConnect Users.
- Grant view permissions for all fields mapped in Step 6 of the package configuration.
- Grant View/Edit permissions on the junction object that represents the relationship between Salesforce object and ZIssue.
- Grant view permissions for all fields configured in Step 4 of the package configuration.