Hi,
I need to create xml file and then need to upload into drive location.
Below code for creating xml file and download into local machine.
 #region Actions
     public PXAction<POOrder> MyAction;
     ÂPXUIField(DisplayName = "Export XML", MapEnableRights = PXCacheRights.Select, MapViewRights = PXCacheRights.Select)]
     ePXButton(CommitChanges = true)]
     public virtual IEnumerable myAction(PXAdapter adapter){
     Â
      XmlDocument xmlDoc = new XmlDocument();
      XmlDeclaration xmldecl;
      xmldecl=xmlDoc.CreateXmlDeclaration("1.0", null, null);
     // Create root node of XML file
     XmlNode rootNode = xmlDoc.CreateElement("GridData");
      foreach (InventoryItem dacRecord in dataview.Select())
       {   Â
         // Create an XML Element to represent the DAC row
         XmlNode xmlDACRecord = xmlDoc.CreateElement("DACRecord");
     Â
         // Add desired DAC fields as child XML Elements of the DAC row XML element
         XmlNode xmlDACField1 = xmlDoc.CreateElement("ItemType");
         xmlDACField1.AppendChild(xmlDoc.CreateTextNode(dacRecord.ItemType.ToString()));
         xmlDACRecord.AppendChild(xmlDACField1);
       Â
        XmlNode xmlDACField2 = xmlDoc.CreateElement("Item");
        xmlDACField2.AppendChild(xmlDoc.CreateTextNode(dacRecord.InventoryCD.ToString()));
        xmlDACRecord.AppendChild(xmlDACField2);
     Â
         // Adding XML DAC Record to XML root node
         rootNode.AppendChild(xmlDACRecord);
       }
       Â
        // Adding XML root node to XML document
  xmlDoc.AppendChild(rootNode);
  // Redirect browser to XML file created in memory on server
  throw new PXRedirectToFileException(new PX.SM.FileInfo(Guid.NewGuid(),
                              "filename.xml",
                              null,
                              System.Text.Encoding.UTF8.GetBytes(xmlDoc.OuterXml)),
                    true);
     return adapter.Get();
       }
 #endregion
Â
Can you please help for me to upload this file into drive location using acumatica.
Â