0

I have created a managed package and added 2 custom objects to it, then I installed the package in another org but unable to access those custom objects came from the managed package, how to give them the permission to do the same.

What am I missing?

VF Page

<apex:page controller="Object1Controller">
    <apex:form >
        <apex:pageBlock title="Object1 List" id="object1_list">
            <apex:pageBlockTable value="{! list }" var="v">
                <apex:column value="{! v.Name }"/>
                <apex:column value="{! v.np1__Object1_Number__c }"/>
                <apex:column value="{! v.np1__Object1_Text__c }"/>
            </apex:pageBlockTable>

            <apex:pageBlockTable value="{! cases }" var="o">
                <apex:column value="{! o.Subject }"/>
            </apex:pageBlockTable>
        </apex:pageBlock>
    </apex:form>
</apex:page>

Apex Controller

public class Object1Controller {
    public List<np1__Object1__c> getList() {
        return [select Name, np1__Object1_Number__c, np1__Object1_Text__c from np1__Object1__c];
    }

    public List<Case> getCases() {
        return [select Subject from Case limit 5 offset 5];
    }

    public List<Object3__c> getLists() {
        return [select ID, Name from Object3__c limit 5];
    }
}

When I am logging in as Admin, all the records are being shown, but when I am logging in as Customer Portal User, the records are not showing for np1__Object1__c, although no Exception is there.

4
  • Can you provide more details of what you mean by "unable to access those custom objects"? How did you try to access them? In code or through the UI? If code, please include code samples. Oct 9, 2015 at 13:28
  • @JasonLantz: I am trying it through Code, added that to the question. Oct 9, 2015 at 13:48
  • 1
    Does the Customer Portal user have access to these objects? Please check the Object and Field-Level Security for the profile. Oct 9, 2015 at 15:50
  • @VishalShah: I updated the package again with an another custom object and gave the permissions to allow this in customer portal, and I assigned the user with a custom profile cloned with the Customer Portal profile (High Volume Customer Portal). And I can access that object in Portal now, but can't login the user with this profile in Portal, I need to login with the original profile, then change the profile to the cloned one and able to access. Oct 12, 2015 at 5:29

1 Answer 1

0

I have succeeded to do the same, here is the points to consider-

  1. Need to give the permission to allow the customer object for customer portal while creating the object. You need to install the package for Customer Portal Profile. (while installing the package, there are options for this). Not sure if other general permissions should also be given in the target org.
  2. Need to create a custom profile by cloning the Portal Profile (High Volume Customer Portal) and assign the portal user to this profile.
  3. Need to give the login permission for Customer Portal to this cloned profile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .