web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Sandboxed CRM Plugin File Handling

(0) ShareShare
ReportReport
Posted on by 10

Hello All

I have a plugin that creates an XML file based on some fetchxml results. However since this is a plugin for CRM Online, it is sandboxed and obviously I am getting an error when I attempt a save on local drive through the code. One of the options I have come to know is to write a web service that consumes the InnerXML and creates a file in the server. Is there any other neat way to do this which is less prone to a number of points of failure? 

string _fetchXmlOutput = _xml.OuterXml;
StringReader _xmlst = new StringReader(_fetchXmlOutput);
XmlDocument _xDoc = new XmlDocument();
_xDoc.LoadXml(_fetchXmlOutput.ToString());
_xDoc.Save(@"C:\outputxml\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xml"); //--To be replaced.



Cheers,

Kush

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Andre Margono Profile Picture
    2,602 on at

    AFAIK nope, CRM Online sandboxed plugin won't give you any access to save to server.

    I can only think of 2 options here:

    1. Save it as an attachment to a record in CRM

    2. Go with external API

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans