I have a script on our website that shows the details of an object by putting his primary key in a text field. It works fine when I open the website from salesforce as a preview : enter image description here

When I go on a live version of the portal it filters out some information as such:

enter image description here

I was wondering if anyone has any solutions to this, I went to this profile and put every object related as read all except I couldn't find the opportunity object.The fields that are missing are :

  • Opportunity__r.Name
  • Service_Start_Date__c
  • Opportunity__r.Works_CSP__c
  • Opportunity__r.Name
  • Local_Service__r.name

enter image description here

  • That screenshot is the Public portal profile? – Ray Dehler Aug 7 '16 at 5:11
  • Yes that's a public portal profile. – Greg Aug 8 '16 at 7:33
  • Are you just asking how to make those fields visible? – Adrian Larson Aug 9 '16 at 10:45
  • Well, Yes how to display those fields when executing this script as a Community/Portal User – Greg Aug 9 '16 at 10:47
  • Did you check the Sharing Settings in the Setup? – Subhash Aug 9 '16 at 13:18

The Opportunity Object isn't available to customer community users for create, edit, read or delete. See Communities User Licenses for more on what objects are exposed depending on which license you choose. The only way you could expose the specific fields would be to mirror them to a custom object and share the custom object. In doing so, I need to caution you that you might be violating your TOS with Salesforce.

  • Service Instance is a custom object and that's where the Opportunity Name is mirrored, unless I cant use Master-detail relationship for mirroring .Do you know what could be the reason for the Service Start date or Local Service to not show ? – Greg Aug 9 '16 at 14:21
  • You're correct that you don't want to use a M-D relationship for mirroring. Security on a child object is controlled by the parent. – crmprogdev Aug 9 '16 at 15:36
  • i've set up those 3 custom fields created 3 workflows to populate and used them in the SOQL inside of apex. IT works great now thank you – Greg Aug 10 '16 at 12:33
  • You can also map the field values to Wrapper class variables and render the wrapper class instance.
  • But as mentioned in other answers, in doing so, I am not sure if you might be violating your TOS with Salesforce.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.