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
Balázs DormánBalázs Dormán 

Visualforce page does not show input fields in active org

I created a Visualforce Page in sandbox which works fine. It is about mapping Salesforce Campaigns with Mailchimp Campaigns. Then I deployed it to the active organization, and the Salesforce Campaign lookup fields just does not show up. I watched the logs, and figured out the reason, but I did not know what to do now:

VARIABLE_ASSIGNMENT [EXTERNAL]|value|{"s":1,"v":"List of size 27 too large to display"}

Image to show what's happening: first, what is the expected functionality:
User-added image
In the right column I could select a Salesforce Campaign to map, but in the active org, that is not shown:
User-added image

Can anyone help me with this? Thanks!

Visualforce page:

<apex:page controller="ACampaignMappingController"
           title="Mapping Campaigns">
    <apex:pageMessages id="messages" />

    <apex:form >
        <apex:pageBlock title="Mapping Campaigns">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value="Save" />
                <apex:commandButton action="{!cancel}" value="Cancel" />
            </apex:pageBlockButtons>
            
            <apex:pageBlockSection title="MailChimp campaigns" columns="1">
                <apex:pageBlockTable value="{!mailChimpCampaigns}" var="p">
                    <apex:column value="{!p.Name}"/>
                    <apex:column headerValue="Salesforce Campaign" >                  
                        <apex:inputField value="{!p.A_Salesforce_Campaign__c}"/>
                    </apex:column>       
                </apex:pageBlockTable>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    
</apex:page>
 

Controller

public class ACampaignMappingController {
  public List<MC4SF__MC_Campaign__c> mailChimpCampaigns {get; set;}

    public ACampaignMappingController(){
        mailChimpCampaigns = [SELECT name, A_Salesforce_Campaign__c FROM MC4SF__MC_Campaign__c];
    }
    
    public PageReference save(){
        try{
            update mailChimpCampaigns;
        }catch(DMLException e){
            //Report DML exceptions to the Apex Page messages element in Visualforce
            ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error,e.getMessage()));
        }
        
        return null;
    }
    
    public PageReference cancel(){
        //Return a link to the parent record perhaps or do something else besides return null here
        return null;
    }
}
Best Answer chosen by Balázs Dormán
Pankaj MehraPankaj Mehra
Hi

In case you have deployed the field "A_Salesforce_Campaign__c" to new organisation make sure to update the Field level Security for the field in active org and make is visible for the System admin profile or the profile that you are using.

Thanks


If you're satisfied with the answers provided, please don't forget to select a Best Answer.

All Answers

Pankaj MehraPankaj Mehra
Hi

In case you have deployed the field "A_Salesforce_Campaign__c" to new organisation make sure to update the Field level Security for the field in active org and make is visible for the System admin profile or the profile that you are using.

Thanks


If you're satisfied with the answers provided, please don't forget to select a Best Answer.
This was selected as the best answer
Balázs DormánBalázs Dormán
Wow, it works! Thank you, very much! I struggled for hours to solve this problem.