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

Creating Custom Field in Standard Object
I am working with the Metadata API, and am having trouble figuring out how to programmatically create a custom field to a standard object. The only documentation that I have been able to find is:
http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/meta_listview.htm
The sample here is Java only and it has been a struggle to work with since the objects that I am working with are so different than the ones used in sample. I want to add a custom field to the Lead standard object, but I'm not sure how to.
Based on the sample above, I believe I need to pass a complete object to the create function to get this to work, since if I pass just a custom field there is no property to associate the type that the field belongs to. Therefore, I think that create will only work if I pass the standard object with the Custom Field. Also, I'm not sure how to create an instance of a standard object with all of the properties populated.
Any help would be great.
http://www.salesforce.com/us/developer/docs/api_meta/index_Left.htm#StartTopic=Content/meta_listview.htm
The sample here is Java only and it has been a struggle to work with since the objects that I am working with are so different than the ones used in sample. I want to add a custom field to the Lead standard object, but I'm not sure how to.
Based on the sample above, I believe I need to pass a complete object to the create function to get this to work, since if I pass just a custom field there is no property to associate the type that the field belongs to. Therefore, I think that create will only work if I pass the standard object with the Custom Field. Also, I'm not sure how to create an instance of a standard object with all of the properties populated.
Any help would be great.
http://www.pocketsoap.com/weblog/2008/05/1811.html
You can create a custom field in a standard object like this:
Go to setup->Select Object Manager->Choose Object Name->Click field and relationships->New->choose type->Enter Name of field->Save.
If you find your Solution then mark this as the best answer.
Thank you!
Regards,
Suraj Tripathi