You need to sign in to do that
Don't have an account?
ashok dadali 3
DML opearion
hi can anybody write one apex class for DML operation insert a record into the object and and copy past programme here
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
{
sObject rec;
boolean result = false;
public boolean addRecord(string objName)
{
if(objName == 'Account')
{
rec = new Account(name='test');
insert rec;
result = true;
}
return result;
}
public void ClickMe()
{
boolean res = addRecord('Account');
}
}
Here you can call method ClickMe from visualforce page to create account record. Below will be example VF page:
<apex:page controller="InsertRecord">
<apex:form>
<apex:commandButton action="{!clickme}" value="Create Account"/>
</apex:form>
</apex:page>