You need to sign in to do that
Don't have an account?

Sharing Button on Vf page
hi
i have a vf page for my contract object and how do i get sharing button on to this vf page , i have tried the way how i gave edit and save but it does not work . And one more thinng i can see sharing button on my standard page
You can use the below markup to create a commandbutton which displays a Share button and performs the same action as a share button does on the standard view page. You can use contract instead of Account. The below markup assumes you are using the VF page with standard controller.
<apex:commandButton action="{!URLFOR($Action.Account.Share,Account.Id)}" value="Share"/>
HI thanks for replying , i am using the tag but i am getting an error saying
Error: Field $Action.contract.Share does not exist. Check spelling
this is the way i am using
<apex:pageBlockButtons >
<apex:commandButton value="edit" action="{!edit}" />
<apex:commandButton value="delete" action="{!delete}" />
<apex:commandButton value="Clone" action="{!clone}"/>
<apex:commandButton action="{!URLFOR($Action.contract.Share,contract.Id)}" value="Share"/>
</apex:pageBlockButtons>
Contract sharing object is not available as per my knowledge.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_contract.htm#topic-title
Thanks,
Rahul
am trying sharing for contact object am get error like
Unknown property 'Contact.id' referenced in sharing
my vf page
<apex:page>
<apex:form>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton value="Share" action="{!URLFOR($Action.Contact.Share, Contact.id)}"/>
</apex:pageBlockButtons>/>
</apex:pageBlock>
</apex:form>
</apex:page>