You need to sign in to do that
Don't have an account?
how to create a custom field from apex ..?
Hi,
I want to create a custom field for OpportunityLineItem from apex.
How is it Possible?
Please can any one guide me.
You need to sign in to do that
Don't have an account?
Hi,
I want to create a custom field for OpportunityLineItem from apex.
How is it Possible?
Please can any one guide me.
You can't create a new custom field from Apex. That would require the Metadata API. You can populate custom fields in Apex.
Hi vasu,
Taking an example of add custom field "Address(Address__c)" of LongTextArea of 32768 character for OpportunityLineItem.
You can easily create Custom Field if you are using Force.com IDE or Eclipse by Putting below xml between <CustomObject> </CustomObject> tags of OpportunityLineItem.
<fields>
<fullName>Address__c</fullName>
<externalId>false</externalId>
<label>Address</label>
<length>32768</length>
<type>LongTextArea</type>
<visibleLines>3</visibleLines>
</fields>
Thanks & Regards
Tejpal
We can not create custom objects & custom fields from Apex. even we have some other option to create to create these meta Data from Eclipse using xml.
Please give me KUDOS and mark it as solution if it was helpful
using metadata api you create field any object in salesforce.find belo URL
http://andyinthecloud.com/category/metadata-api/