You need to sign in to do that
Don't have an account?
vasu takasi
How to create instance for an object based on Sobject type
string typename='account';
Schema.SObjectType targetType = Schema.getGlobalDescribe().get(typeName);
sObject obj=targetType.newSObject();
here i want to create an instance for account dynamically.
How is it possible.
This may give an idea of achieving your requirement,
http://forceguru.blogspot.in/2011/08/inserting-sobject-dynamically-in.html
Regards,
Bharathi
Salesforce For All
Mark this post as solved, if it helps you