You need to sign in to do that
Don't have an account?
Simrin
Adding data to custom object
Hello,
I want to add sample data to a custom object.
This data will be inserted to around 300 uers and 100 data each so I want to insert 300 users * 100 rows.
For (All users){
custom__C c = custom__C();
c.user = user;
c.column1 = 'XYZ';
c.column2 = 2;
c.column3 = 'PQR';
insert c;
}
i assume that the saleforce has limitation for number of SQl queries.
How can i achieve it ?
I want to add sample data to a custom object.
This data will be inserted to around 300 uers and 100 data each so I want to insert 300 users * 100 rows.
For (All users){
custom__C c = custom__C();
c.user = user;
c.column1 = 'XYZ';
c.column2 = 2;
c.column3 = 'PQR';
insert c;
}
i assume that the saleforce has limitation for number of SQl queries.
How can i achieve it ?
and here is the way to call this
Thanks,
Himanshu
All Answers
Here is the correct way to do that.
Thanks,
Himanshu
I have below errror.
how can i tackle this one.
Can i export the output to some excel file and import it using dataloader
1. add Limit to your SOQL.
2. use batch to update records.
"Time limit exceeded
Your request exceeded the time limit for processing. "
How can i do batch to insert records
and here is the way to call this
Thanks,
Himanshu
For others i want to jot down some problems i faced
- CPU limit exceeeded
- time out as query taking long times
- maximum view state reached.
Thank you Himanshu for your inputs
Your welcome!.
Yes, It is always advised to use batch while you are working on millions of records to avoid all those limit which you have got.