Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

Error processing request stream. The request should be a valid top-level resource object

$
0
0

Hi,

I'm trying to create email attachment by using REST endpoint. I can successfully create on CRM 2011 online. 
But it's giving me an error when I start to use MS CRM 2011 outlook (not offline).
Is there any different security access between CRM online and CRM outlook for using REST?

I used openStdWin function from "../_common/Global.ashx" to popup window in CRM outlook to prevent appearing log-in screen.


My Code was written in HTML file.

var a = Object();
            a.ObjectTypeCode = "email";
            a.FileName = "CCR.pdf";
            a.Body = pdfBody;
            a.Subject = "Report Attachment";
            a.MimeType = "application/pdf";
            a.ObjectId = new Array();
            a.ObjectId.LogicalName = "activitymimeattachment";
            a.ObjectId.Id = id.ActivityId;var attachId = rest.CreateRecord(a, "ActivityMimeAttachmentSet", null, null);

 

Error as follow
------------------ 

{"error": {"code": "", "message": {"lang": "en-US", "value": "Error processing request stream. The request should be a valid top-level resource object."
}
}
}

Thanks in advance to all. 

 



Viewing all articles
Browse latest Browse all 8223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>