I need to delete a file from sharepoint by a D365FO x++ runbase job. I get the proxy succesfully by the method SharePointHelper::CreateProxy but when I use it to delete the file the method DeleteFile doesn't work. I think the problem is the uri. I build the uri in this way:
uri = new System.Uri("https://" + host + "/_api/Web/GetFileByServerRelativePath(decodedurl='/" + site + "/" + folderPath + "/" + fileName + "')"); myProxy.DeleteFile(uri);
Could please anyone help me with this?