+ Start a Discussion
taPhiltaPhil 

Can't get New action to work for Contact

I've seen a lot of posts and articles showing how to invoke an action on an object from a commandButton or an outputLink.  Trying to do this for a new contact using contact standard controller, as I've seen suggested is possible, but keep getting Contact.New not an action errors.  Same setup works for for new account with Account standard controller or other actions on Contact, but just not the New action.  Trying to mimic New Contact button on Contact related list.

 

Is the New method not supported for Contact for some reason?

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler

This is the syntax you want: {!URLFOR($Action.Contact.NewContact)}

 

If you're having problems figuring out the name of an action go to Setup -> Customize -> Contacts -> Buttons and Links and look in the "Name" column for the action you want.

 

No, I don't know why contact is different from all of the other objects :)  Looks like a mistake. 

All Answers

jwetzlerjwetzler

This is the syntax you want: {!URLFOR($Action.Contact.NewContact)}

 

If you're having problems figuring out the name of an action go to Setup -> Customize -> Contacts -> Buttons and Links and look in the "Name" column for the action you want.

 

No, I don't know why contact is different from all of the other objects :)  Looks like a mistake. 

This was selected as the best answer
taPhiltaPhil

Sweet!  Thanks.

 

I'm new to Force.com.  Some parts impressive, others lackluster.  It troubles me that several searches I did on this topic prior to my post did not turn up any clear or detailed explanation in product documentation.  Documentation is coming up very short for me.  Would be different if this were free, but my company is paying a lot of money for this software.  This should have been quick and easy.  After hours of wasting my time, in the end it was thanks to your reply.

OrynThornwallOrynThornwall
Hi Jill, don't mean to hijack this thread, but I have the same problem for changing the owner on a case.  I looked at the customize buttons and links page as you mentioned, but there is not any listing there for changing case owner.  Do you or anyone else happen to know the action name for that?