Hello...I am trying to modify code that was written for 4.0 into 2011.
The problem I am having is with the CrmNumber() function and using it to attach a pdf report in a plugin.
Here is the line of code. It is from this blog:
http://ekoncis.blogspot.com/2012/01/crm-2011-custom-email-with-pdf-report.html
// Attaching Pdf report
//LINE BELOW NEEDS TO BE RE-WRITTEN
CrmNumber crmNextActorID = new CrmNumber();
RetrieveEntityRequest request = new RetrieveEntityRequest();
request.LogicalName = "email";
RetrieveEntityResponse response = (RetrieveEntityResponse)service.Execute(request);
int objecttypecode = response.EntityMetadata.ObjectTypeCode.Value;
Entity attachment = new Entity("activitymimeattachment");
attachment.Attributes.Add("subject", "Report");
attachment.Attributes.Add("filename", "Report.pdf");
attachment.Attributes.Add("body", Convert.ToBase64String(result));
//LINE BELOW NEEDS TO BE RE-WRITTEN
attachment.Attributes.Add("filesize", new CrmNumber(Convert.ToInt32(result.Length.ToString())));
Mike Karls