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
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156