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
Reuben Reynoso 3Reuben Reynoso 3 

Campaign member status values not appearing in Visualforce page

Over the course of years of creating campaigns with different member status, we have about 80+ status in the "Status" standard field on the Campaign Member object. I have created a simple custom visualforce page that uses a pageblock table to list member from a campaign and I have enable inline editing so users can double click on the fields to edit.  

When users click on the Status field only about 50% of the available status appear.  Any new status that is created will simply not appear in the dropdownlist
<apex:column style="width:8%;height:30px">
                    <apex:outputField value="{!record.Status}">
                         <apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton"/>
                    </apex:outputField>          
                    <apex:facet name="header">Status</apex:facet>
                </apex:column>

 
Best Answer chosen by Reuben Reynoso 3
Reuben Reynoso 3Reuben Reynoso 3
Shashikata,  With the help of Salesforce I have determined the problem.  It had to do with having multiple record types on CampaingMembers and no ability to update status values to those record types.  When it comes to what values appear in the CampaignMember.Status field in visualforce, it is based on the default record type of your profile.  All status values automaticaly get assigned to the Master layout.  Since new Record Types, at the time of creation, are copied based on the “Master”, the new record type inherit that status values available to the master at the time of creation. There is no way to add more to the custom record types going forward.  

One option to make all the status appear was to deactivate the custom record types and use only the Master.  Since this was not a path we could take, we had to build a custom apex method / custom picklist for the visualforce page.

 

All Answers

Shashikant SharmaShashikant Sharma
Hi Reuben,

I would suggest make sure your are querying the Status field in your Query.

Could you please share the full VFP and it's controller code.

Thanks
Shashikant
Reuben Reynoso 3Reuben Reynoso 3
cm = [SELECT Name,Campaign_Name__c,CampaignID, Account_name__c, Status, Phone, Title, Email, member_owner__c, Auto_Opportunity__c, Call_Description_Notes__c, Campaign_Status__c, My_Campaign_Member__c, Campaign_Type__c  FROM CampaignMember
Its really a simple SOQL statement. 
 
Shashikant SharmaShashikant Sharma
At this moment I could suggest to check Field Level Security for Status field for your user. Just make sure you could view it from standard page layout.

Thanks
Shashikant
Reuben Reynoso 3Reuben Reynoso 3
Shashikata,  With the help of Salesforce I have determined the problem.  It had to do with having multiple record types on CampaingMembers and no ability to update status values to those record types.  When it comes to what values appear in the CampaignMember.Status field in visualforce, it is based on the default record type of your profile.  All status values automaticaly get assigned to the Master layout.  Since new Record Types, at the time of creation, are copied based on the “Master”, the new record type inherit that status values available to the master at the time of creation. There is no way to add more to the custom record types going forward.  

One option to make all the status appear was to deactivate the custom record types and use only the Master.  Since this was not a path we could take, we had to build a custom apex method / custom picklist for the visualforce page.

 
This was selected as the best answer