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
chanukya reddychanukya reddy 

How to show the custom publisher action in private chatter groups in salesforce?

I created a custom publisher action in groups but i am not able to see that custom publisher action/global action in private chatter group(I can see in public chatter groups).
Can any one please help me out how to enable the custom publisher action in private chatter group?
Gaurav NirwalGaurav Nirwal
You can download a pdf file on this link which can help you to show the custom action 

https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CCUQFjAB&url=http%3A%2F%2Fhelp.salesforce.com%2Fhelp%2Fpdfs%2Fen%2Factions_impl_guide.pdf&ei=u2EOVNnaK4PnuQSNyoGYCg&usg=AFQjCNG-7D3g3u5zP_2YMUMxeHJ36m68aw&sig2=XNM8LwUtphAZW-56z5BaeQ&bvm=bv.74649129,d.c2E (https://www.google.co.in/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CCUQFjAB&url=http%3A%2F%2Fhelp.salesforce.com%2Fhelp%2Fpdfs%2Fen%2Factions_impl_guide.pdf&ei=u2EOVNnaK4PnuQSNyoGYCg&usg=AFQjCNG-7D3g3u5zP_2YMUMxeHJ36m68aw&sig2=XNM8LwUtphAZW-56z5BaeQ&bvm=bv.74649129,d.c2E)
Gaurav NirwalGaurav Nirwal
Please try this link that helps you 

https://help.salesforce.com/HTViewHelpDoc?id=actions_overview.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=actions_overview.htm&language=en_US)
Gaurav NirwalGaurav Nirwal
Creating Pages for Object-Specific Custom Actions:-

The following code sample shows a page designed to be used as a custom action on the account object, so it uses the standard Account controller. This action lets users create cases from account detail pages, and it has a different user interface from standard create actions.

public with sharing class CreateCaseExtension {
    private final SObject parent;
    public Case theCase {get; set;}
    public String lastError {get; set;}
    
    public CreateCaseExtension2(ApexPages.StandardController controller) {
        parent = controller.getRecord();
        theCase = new Case();
        theCase.accountId = parent.id;
        lastError = '';
    }
      
    public PageReference createCase() {
        createNewCase();
        theCase = new Case();
        theCase.accountId = parent.id;
        return null;
    }
       
     private void createNewCase() {      
        try {
            insert theCase;
            
            FeedItem post = new FeedItem();
            post.ParentId = ApexPages.currentPage().getParameters().get('id');
            post.Body = 'created a case';
            post.type = 'LinkPost'; 
            post.LinkUrl = '/' + theCase.id;
            post.Title = theCase.Subject;
            insert post;
        } catch(System.Exception ex){
           lastError = ex.getMessage();
        }
    }   
}

<apex:page standardcontroller="Account" extensions="CreateCaseExtension" showHeader="false">
    <script type='text/javascript' src='/canvas/sdk/js/publisher.js'/> 
    <style>
        .requiredInput .requiredBlock, .requiredBlock {background-color: white;} 
        .custompubblock div {display: inline-block;} 
        .custompublabel {width:54px;} 
    </style>
    <script> 
        function refreshFeed() { 
            Sfdc.canvas.publisher.publish({name : 'publisher.refresh', payload : {feed:true}}); 
        }
    </script>   
    <div> 
        <apex:form > 
            <apex:actionFunction action="{!createCase}" name="createCase" rerender="out" 
            oncomplete="refreshFeed();"/> 
            <apex:outputPanel id="out" > 
                <div class="custompubblock"> 
                    <div class="custompublabel">Account:</div><apex:inputField value="{!theCase.accountId}" 
                    style="margin-left:0;"/>&nbsp;&nbsp;&nbsp;
                    <div>Contact:&nbsp;</div><apex:inputField value="{!theCase.contactId}" />
                </div>
                <apex:inputField value="{!theCase.description}" style="width:538px;height:92px;margin-top:4px;" />
                <div class="custompubblock" style="margin-top:5px;"> 
                    <div>Status:&nbsp;</div><apex:inputField value="{!theCase.status}" />&nbsp;&nbsp;&nbsp; 
                    <div>Priority:&nbsp;</div><apex:inputField value="{!theCase.priority}" />&nbsp;&nbsp;&nbsp; 
                    <div>Case Origin:&nbsp;</div><apex:inputField value="{!theCase.origin}" /> 
                </div> 
            </apex:outputPanel>
        </apex:form><br/>
        <button type="button" onclick="createCase();" 
        style="position:fixed;bottom:0px;right:0px;padding:5px 10px; 
        font-size:13px; font-weight:bold; line-height: 
        18px;background-color:#0271BF;background-image:-moz-linear-gradient(#2DADDC, #0271BF);background-repeat:repeat-x;border-color:#096EB3;" 
        id="addcasebutton">Create Case</button> 
    </div>  
</apex:page>


Gaurav NirwalGaurav Nirwal
You can try another method 

Pages for Global Custom Actions:-


The following code sample shows a Visualforce page designed to be used as a custom action on any object that supports actions. This action lets users create cases from record detail pages, Chatter, Chatter groups (except customer groups), or the home page, and it has a different user interface from standard create actions. As with all global actions, the records created through this action are not automatically associated with any other records.

<!-- Custom controller -->
public with sharing class CreateCaseController {
    public Case theCase {get; set;}
    public String lastError {get; set;}
    public CreateCaseController() {
        theCase = new Case();
        lastError = '';
    }
      
    public PageReference createCase() {
        createNewCase();
        theCase = new Case();
        return null;
    }
       
     private void createNewCase() {      
        try {
            insert theCase;
            
            FeedItem post = new FeedItem();
            post.ParentId = ApexPages.currentPage().getParameters().get('id');
            post.Body = 'created a case';
            post.type = 'LinkPost'; 
            post.LinkUrl = '/' + theCase.id;
            post.Title = theCase.Subject;
            insert post;
        } catch(System.Exception ex){
           lastError = ex.getMessage();
        }
    }   
}

<apex:page controller="CreateCaseController" showHeader="false">
    <script type='text/javascript' src='/canvas/sdk/js/publisher.js'/>
    <style>
        .requiredInput .requiredBlock, .requiredBlock {background-color: white;}
        .custompubblock div {display: inline-block;}
        .custompublabel {width:54px;}
    </style>
   
     <script>
      function refreshFeed() {
          Sfdc.canvas.publisher.publish({name : 'publisher.refresh',  payload : {feed: true}});
      }
     </script>
   
    
    <div>
        <apex:form >
            <apex:actionFunction action="{!createCase}" name="createCase" rerender="out" oncomplete="refreshFeed();"/> 
            <apex:outputPanel id="out" >
                <div class="custompubblock">
                    <div>Subject:&nbsp;</div><apex:inputField value="{!theCase.subject}" style="width:500px;" />
                </div>
                <div class="custompubblock">
                    <div class="custompublabel">Account:</div><apex:inputField value="{!theCase.accountId}" 
                    style="margin-left:0;"/>&nbsp;&nbsp;&nbsp;
                    <div>Contact:&nbsp;</div><apex:inputField value="{!theCase.contactId}" />
                </div>
                <apex:inputField value="{!theCase.description}" style="width:500px;height:92px;margin-top:4px;" />
                <div class="custompubblock" style="margin-top:5px;">
                    <div>Status:&nbsp;</div><apex:inputField value="{!theCase.status}" />&nbsp;&nbsp;&nbsp;
                    <div>Priority:&nbsp;</div><apex:inputField value="{!theCase.priority}" />&nbsp;&nbsp;&nbsp;
                    <div>Case Origin:&nbsp;</div><apex:inputField value="{!theCase.origin}" />
               </div>
                <div style="color:red;">{!lastError}</div>
            </apex:outputPanel>
        </apex:form><br/>
        <button type="button" onclick="createCase();" style="position:fixed;bottom:0px;right:0px;padding:5px 10px; 
        font-size:13px; font-weight:bold; line-height: 
        18px;background-color:#0271BF;background-image:-moz-linear-gradient(#2DADDC, #0271BF);background-repeat:repeat-x;
        border-color:#096EB3;" id="addcasebutton">Create Case</button>
    </div>            
</apex:page>


Gaurav NirwalGaurav Nirwal
If my answer can help you 
Please select as best answer 

thanks
chanukya reddychanukya reddy
Hi Mathews,

 I am talking about, the custom publisher action which i can't see in private chatter group with customers but i can see in public chatter groups wihout customers.Can you please help me?