You need to sign in to do that
Don't have an account?
Callum Whitehouse
Help with SOQL query needed
For communities, I'm trying to show certain elements based on their profile. To get the profile of a logged in user I was planning on using a contact ID field. Here is the code:
The left operand field in the where expression for outer query should be an id field, cannot use: 'Contact_ID__c'
Can anyone help me resolve this issue please?
SELECT BiRetix_Toolkit__c, AesthetiCare_Cleansers_Toolkit__c, EDS_Toolkit__c, Endocare_CELLPRO_Toolkit__c, Endocare_Concentrates_Toolkit__c,Endocare_Growth_Factor_Facials__c, Endocare_Tensage_Toolkit__c, Endocare_C_Ferulic_Toolkit__c, ENDYMED_Toolkit__c, G_T_Peels_Toolkit__c, Heliocare_360_Toolkit__c, NeoRettin_Toolkit__c, NeoRetin_Rejuvemax_Toolkit__c, Retriderm_Toolkit__c FROM Contact WHERE Contact_ID__c IN (SELECT ContactId FROM User WHERE username=:UserInfo.getUsername())However this gives an error:
The left operand field in the where expression for outer query should be an id field, cannot use: 'Contact_ID__c'
Can anyone help me resolve this issue please?
Another suggestion is to consider using sharing rules and profiles if possible.
All Answers
Another suggestion is to consider using sharing rules and profiles if possible.