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
Chiyaan AnanthChiyaan Ananth 

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

http://ananthchellathurai.blogspot.com/ 

Message Edited by Chiyaan Ananth on 07-06-2009 02:06 AM
Manoj_79Manoj_79
Need to Define a New Custom link  under Setup-Account-Buttons and Links then go to page Layout and Select that link to dispaly
Chiyaan AnanthChiyaan Ananth
I need to do it through the webservice API.  Is it possible at all to do this?
Manoj_79Manoj_79
It Can be done through Meta data API not from Webservise API
Chiyaan AnanthChiyaan Ananth
Can you give me the steps on how to do it.  I need to create a custom link along with other existing links.  How do I do it through Metadata API?
Manoj_79Manoj_79

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

Chiyaan AnanthChiyaan Ananth

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/