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
EmanuelaEmanuela 

insert custom object into 'contact' related list.

Hi,
I've created a custom object with the metadata library and I need to add it into Contact's related list.
I' ve looked for some example into di metadata api user guide and force.com api user guide but without success.
Can anyone help me?

Cheers
Emanuela
werewolfwerewolf
I don't know that you can do that with the metadata API -- you probably need to go to the Contact page layout in setup and add your related list there.
EmanuelaEmanuela
I've to do it with API.
In enterprise library there is a 'RelatedList' class but I don't understand how I could use it.
werewolfwerewolf
I don't think you can do it with the API.  Otherwise partners could mess with their customers' layouts without their express consent.  You can package custom object layouts, but not standard object layouts to my knowledge.
EmanuelaEmanuela
Thank you warewolf.
Do you know if is possible add a custom field to a standard object?

cheers
Emanuela
werewolfwerewolf
It is possible to add a custom field to a standard object, but I'm not sure you can do that with the metadata API yet.  You can package those custom fields though.
SuperfellSuperfell
Yes, you can add custom fields to standard objects with the metadata API, you've been able to since the first version of the metadata API shipped. see http://www.pocketsoap.com/weblog/2008/05/1811.html for an example.