You need to sign in to do that
Don't have an account?
Akshata Shah
DML operation
Please help me to solve this!
Create a custom object called as 'Logs'. Create a long text area field called as 'Error'.
Create 100 Lead records using DML operations having a unique name. For all records which were not inserted into Lead object, insert a record in Log object along with the reason why a record was not inserted. Also, execute assignment rules to auto allocate Lead records to correct owner.
Thanks in advance.
Create a custom object called as 'Logs'. Create a long text area field called as 'Error'.
Create 100 Lead records using DML operations having a unique name. For all records which were not inserted into Lead object, insert a record in Log object along with the reason why a record was not inserted. Also, execute assignment rules to auto allocate Lead records to correct owner.
Thanks in advance.
You can use insert(recordToInsert, allOrNone) from https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_database.htm
The return class provides methods to get the error description: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_database_saveresult.htm#apex_methods_system_database_saveresult
With these, try writing apex class and post it here if you face any issues.
Hope this helps.
Thanks,
Neha
http://initaura.com
All Answers
You can use insert(recordToInsert, allOrNone) from https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_database.htm
The return class provides methods to get the error description: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_database_saveresult.htm#apex_methods_system_database_saveresult
With these, try writing apex class and post it here if you face any issues.
Hope this helps.
Thanks,
Neha
http://initaura.com
Once you've found the federal defense lawyer (https://www.severolegal.com/) you want to take your case, the next step is to actually hire them.