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

How do I add a new custom link in Accounts
Is there a way I can add a new custom link to my accounts page?
Any help would be greatly appreciated.
Ananth Chellathurai
You need to sign in to do that
Don't have an account?
Is there a way I can add a new custom link to my accounts page?
Any help would be greatly appreciated.
Ananth Chellathurai
Please refer Metadata documentation - http://www.salesforce.com/us/developer/docs/api_meta/index.htm
After implementing the metadata WSDL at your end you can create custom component through the API calls.
You need to create a weblink component for the custom link and you can set properties like 'displayType', fullname, open type and other related properties for the same. In java you can use following code
Weblink weblink = new Weblink();
weblink.setFullName("googleButton");
weblink.setUrl("http://www.google.com");
weblink.setAvailability(WebLinkAvailability.online);
weblink.setLinktype(WebLinkType.url);
weblink.setOpentype(WebLinkWindowType.newWindow);
weblink.setHeight(600);
weblink.setWidth(600);
weblink.setShowsLocation(false);
weblink.setHasScrollbars(true);
weblink.setHasToolbar(false);
weblink.setHasMenubar(false);
weblink.setShowsStatus(false);
weblink.setIsResizable(true);
weblink.setPosition(WebLinkPosition.none);
weblink.setMasterLabel("google");
weblink.setDisplayType(WebLinkDisplayType.link);
weblink.setRequireRowSelection(true);
Then you have to associate this newly created link with the account page layout.
cheers
Hi Manoj
http://community.salesforce.com/sforce/board/message?board.id=JAVA_development&message.id=2580&query.id=8869#M2580 says weblinks can not be associated with page layouts, I have tried the code from the metadata api documentation.
But it is an old message, by this time there may be options to add weblinks to page layout. I am trying this http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_weblink.htm
Will get back if I succeed.
Ananth
http://ananthchellathurai.blogspot.com/