I am implementing Case Feed and want to add an object specific Publisher Action "New Contact". I understand that this should be with a Visualforce page but am not sure how . . . Also, the newly created Contact should be linked to the Case.
Fields: -Account Name (prepopulated - either with default value or via lookup to a custom field on the user object {! $User.Default_Account__c} ) -First name -Last Name -Email Address -Phone number
Here is my very first attempt at a Visualforce page . . . which works in the Visualforce preview window, but fails when launched from the Publisher Action. Can anyone offer any pointers . . . ?
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection columns="1">
<apex:inputField value="{!contact.AccountID}" />
<apex:inputField value="{!contact.FirstName}" />
<apex:inputField value="{!contact.LastName}" />
<apex:inputField value="{!contact.email}" />
<apex:inputField value="{!contact.phone}" />
</apex:pageBlockSection>
var contact.AccountId = "{! $User.Default_SARMS_Account__c }";
<apex:pageBlockButtons >
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>