function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nimbusprojectnimbusproject 

Opportunities dependencies in the Customer Portal Profile for Sites

I want to expose a custom object with fields that depend on opportunities, accounts, etc. in my salesforce.com account via sites.

 

Since my end users have a "Customer Portal Management" license, I need to add this object to this profile. However, when I go to enable "Read, Write, Delete, Edit" under this profile I get dependency errors since this profile doesn't have permission to edit opportunities, accounts, etc.

 

Where do I set permissions to allow users to see the "accounts", "opportunities", etc. so they can edit these as they exist in my salesforce account or does this go against the principle of what I can expose via sites beyond the one's I'm seeing with properties under "Field Level Security"

 

Any clarification please ask!

 

Thanks!

Pradeep_NavatarPradeep_Navatar

Customer portal profile has only read permissions for Accounts, Contacts, Assets, Documents and Read/Create/Edit Permision for the Cases. You can not change these permissions as customer portal does not allow this. Customer portal allows you to set the permissons on the custom objects hence the solution is to create a clone of the standard object(create a custom objects having same fields as in the standard object) and use it as per your requirement.

 

Did this answer your question? if not, let me know what didn't work, or if so, please mark it solved.

 

 

 

nimbusprojectnimbusproject

Thanks Pradeep--

 

Almost. If I'm understand correctly the Apex "clone" command for sObjects creates them in memory dynamically at run-time.

 

If so, I will need to clone all the sObjects that are Opportunities if I want to give functionality to select the opportunity fields that are opportunities -- Ill need to create a clone of all opportunties and these fields at run time correct.

 

Here is some APEX code I found that selects a specific field from a specific opp. and clones it, but I need to change it to select all these fields from all opportunities (how does this solve the depedency permissions at run time?

 

Thanks!

Opportunity opp=[select Id,Name from opportunity where id='XXXX000003Relo']; Opportunity newOpp = opp.clone(false, true); newOpp.Name=opp.Name + ' CLONE'; insert newOpp;

My custom object has "opportunities" set as a "master object". I don't think this necessary means all fields are dependents of "opportunity"? Since it's only complaining about two fields when I attempt to expose this object to the Customer Portal profile for my site.