Hi,
I m using dynamic crm 2015 and i want to create new note in sales order
here is my code
var note = new Annotation()
{
Subject = "Note subject...",
NoteText = "Note Details....",
// DocumentBody = Convert.ToBase64String(data),
// FileName = Path.GetFileName(attachment.Name),
MimeType = "text/plain",
Id = Guid.NewGuid(),
// Associate the note to the contact.
ObjectId = newsalesorder.ToEntityReference(),
ObjectTypeCode = SalesOrder.EntityLogicalName
};
_orgContext.AddObject(note);
_orgContext.AddLink(newsalesorder, new Relationship("SalesOrder_Annotation"), note);
In this i am getting all the vlalue in note but still it gives me error of null reference in
_orgContext.AddObject(note);
How can i achieve this?
*This post is locked for comments