You need to sign in to do that
Don't have an account?
Admin Part
create a field no. of location on account object (data type in number). write a trigger that will create as much no. of contact object as value in no. of locations when account object is cretaed.
trigger locationAcc on Account(before insert)
{
List<Account> listAcc= new List<Account>();
List<Contact> listCon= new List<Contact>();
for(Account a: trigger.new)
{
listAcc.add(a.Location__c);
for(Contact c: listAcc )
{
// please give any idea.
}
}
{
List<Account> listAcc= new List<Account>();
List<Contact> listCon= new List<Contact>();
for(Account a: trigger.new)
{
listAcc.add(a.Location__c);
for(Contact c: listAcc )
{
// please give any idea.
}
}
I hope its work well for you,please select my answer as best
Thanlks,
Varun