You need to sign in to do that
Don't have an account?
Raj_S
How to create a Custom Field (Text Area ) in Accounts using Web service call.
Hi,
Right now I am using Developer edition (trial) and i want to create custom field (Text Area) in Accounts section using a web service call. Can anyone help me in this. Thanks
Raj S
Right now I am using Developer edition (trial) and i want to create custom field (Text Area) in Accounts section using a web service call. Can anyone help me in this. Thanks
Raj S
http://www.salesforce.com/us/developer/docs/api_metapre/index.htm
Actually i have created custom field in my Account page using web service API call and i am able to see that newly added custom field in
Account Custom Fields & Relationships but not in my Account Page.
So can You please tell me why i am not able to see that newly added field on my existing accounts and new account page.Thanks again!
Raj S
Thanks! for your reply but how can i add it to my page layout by using web service call. Since i don't want my clients to add it manually i want to do it by using web service call.
Raj S
Actually i gone through metadata API but i am unable to find any way of showing the custom field from Accounts custom field and relationship to my Account layout Page using web service call. Lastly, i was trying to do something like this
MetaDataWebReference.LayoutItem layitem_obj = new Test_ExpocadProject.MetaDataWebReference.LayoutItem( ) layitem_obj.field = "Notice__c";
layitem_obj.behavior = Test_ExpocadProject.MetaDataWebReference.UiBehavior.Edit;
layitem_obj.page = "Account";
MetaDataWebReference.AsyncResult ar1 = metadatabinding.create(new MetaDataWebReference.Metadata[] { layitem_obj }]
Here Notice__c is my custom field, which is already there in my Accounts custom field and Relationship Page.
But these code is not working...
Your help is needed.
Thanks!
Raj S
#region This is an unsuccessful try to create custom field in the Accounts Page layout.
MetaDataWebReference.CustomObject co = new Test_ExpocadProject.MetaDataWebReference.CustomObject();
co.fullName = "Account__c";
co.deploymentStatus = Test_ExpocadProject.MetaDataWebReference.DeploymentStatus.Deployed;
co.deploymentStatusSpecified = true;
co.enableActivities = true;
co.sharingModel = Test_ExpocadProject.MetaDataWebReference.SharingModel.ReadWrite; //**null: Must specify a sharing model value for the Custom Object
co.sharingModelSpecified = true;
co.label = "Account Object";
co.pluralLabel = "Account Objects";
MetaDataWebReference.CustomField cus_field1 = new Test_ExpocadProject.MetaDataWebReference.CustomField();
cus_field1.label = "Auto Number";
cus_field1.fullName = "Account.Auto_Number__c";
cus_field1.description = "This is the Auto generated field";
cus_field1.displayFormat = "{0}";
cus_field1.externalId = true; //Set this field as the unique record identifier from an external system.
cus_field1.externalIdSpecified = true;
cus_field1.startingNumber = 10;
cus_field1.populateExistingRows = true;
cus_field1.populateExistingRowsSpecified = true;
cus_field1.startingNumberSpecified = true;
cus_field1.type = Test_ExpocadProject.MetaDataWebReference.FieldType.AutoNumber;
co.nameField = cus_field1;
MetaDataWebReference.UpdateMetadata updatemetadata = new Test_ExpocadProject.MetaDataWebReference.UpdateMetadata();
updatemetadata.metadata = co;
updatemetadata.currentName = "Account__c";
MetaDataWebReference.AsyncResult[] ar = metadatabinding.update(new Test_ExpocadProject.MetaDataWebReference.UpdateMetadata[] { updatemetadata });
#endregion
But Again failed to do so......
Actually i am able to add my custom field to my Accounts custom field and Relationship by using web service call but i am not able to add that custom field from my Accounts custom field and Relationship to Accounts Page Layout by using web service call.
Can you please help me out in this. It's really Urgent!
Thanks!
Raj S
Hi Raj,
Where you able to resolve your issue?
If so, would you mind adding a sample bit of code that does this. As I am in the same boat, with not much of an idea of how to continue on this path.
Any help would be great thanks.
Adrian