You need to sign in to do that
Don't have an account?
AlecS
Create a Note under Custom Object
I have a custom object called Invoice.
I want to create a new Task under this object.
I have this code:
Note inv_note = new Note(); inv_note.ID = theInvoice.id; inv_note.Title = theInvoice.Invoice_Name__c+' invoice emailed'; inv_note.body = 'Invoice emailed'; insert inv_note;
This is the error message that I get:
Invalid id value for this SObject type: a07W0000000kJQMIA2
Error is in expression '{!doMyApexLogic}' in component <apex:page> in page apexbuttonpage
Thanks for your help!
Id must be null for inserts. You meant to assign theInvoice.Id to inv_note.ParentId.
All Answers
Id must be null for inserts. You meant to assign theInvoice.Id to inv_note.ParentId.