• Balázs Dormán
  • NEWBIE
  • 15 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

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;
    }
}

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;
    }
}