You need to sign in to do that
Don't have an account?
Anjana Sharma 9
I have a cusom object of name Error log and Field name of auto-number i.e (EL-{0000}-1) & Custom Fields: 1. Parent Record Id: Type: Text 2. Error Details: Type: Long Text 3. Parent Record Name: Type: Text and i have to apply database dml on it
I have a method with two arguments List<Account>, List<Contact> with return type void and in the list<Account > i have to do that some records in this list will have Id field populated and some of the records will not have Id field populated .and then Update the records where Id is populated and insert the records where Id is not populated. (Use Database.upsert for this) .Check the Database.upsert result and if there is any error with any of the record then create a new record of Error Log(in my custom object) for each error. Now how can i cause error in this and how i hold that error in database.saveresult .
And in second argument of contact i have to hold only the new Contact Records. and like i have 2 contact then these 2 contacts were add to each account details which give success not error
And in second argument of contact i have to hold only the new Contact Records. and like i have 2 contact then these 2 contacts were add to each account details which give success not error
Please post the code snippet in the description and then elaborate the concern to make it more understandable, so that community could provide specific suggestion for the issue you are facing.
Thanks.
Now i have to pass two arguments in my method one is list<Account > and other is list<contact> ..now what i am doing in my account list i am populated some record but what i need that like i am populating 10 records then some them are populated with id but some of them not..so as we know that every record has id then how can i poluatated record without id .....then after poplating theste records i have to Update that records where Id is populated and insert the records where Id is not populated. (Use Database.upsert ) ... now at last i have to Check the Database.upsert result and if there is any error with any of the record then it create a new record of Error Log (custom object) for each error.
and in my list of contact i have to hold the new contact records and these contact i have to add to those account which are success...like i have 2 contact in my list<contact> then these 2 contact add to all account record like i have 4 succes account record after database.upsert the 2 contact add to each and at last they became 8....then how can i polate record and cause error by which i save these error to my custom object ..for every new error a new record is added ..
xem ngay https://alonhatro.com/