Hi all,
I am trying to save a records in support incident attachment using XMLAPI.
I tried this code:
String strAttachment = Convert.ToBase64String(FileUpload1.FileBytes);
string sXMLstart = "<?xml version=\"1.0\"?>" +
"<command xmlns=\"urn:schemas-pivotal-com/LifecycleServer50\">" +
"<systemName>HelpDesk</systemName>" +
"<userName>prs</userName>" +
"<loginType>Active Client</loginType>" +
"<saveFormData>" +
"<formUpdate>" +
"<formName>CF SI Add Attachment</formName>";
string sXML = "<segmentUpdate>" +
"<segmentName>Attachment</segmentName>" +
"<primaryUpdate>" +
"<fieldUpdate>" +
"<fieldName>Attachment</fieldName>" +
"<value>" + strAttachment + "</value>" +
"</fieldUpdate>" +
"<fieldUpdate>" +
"<fieldName>Support_Incident_Id</fieldName>" +
"<value>" + supportIncidentId + "</value>" +
"</fieldUpdate>";
string sXMLend = "</primaryUpdate>" +
"</segmentUpdate>" +
"</formUpdate>" +
"</saveFormData>" +
"</command>";
sXML = sXMLstart + sXML + sXMLend;
string res = PivotalAPI(sXML);//update the crm
and I got this error:
<?xml version ="1.0"?><commandResult xmlns = "urn:schemas-pivotal-com/LifecycleServer50">
<error>
<errorNumber>80070005</errorNumber>
<errorText></errorText>
<errorDetails>
HRESULT = 0x80070005 -- Access is denied.
Function = CRXMLformUpdate::Update
Occurred in .\RXSaveFormData.cpp on line 608.
Compiled on Nov 30 2009, modified on Thu Apr 12 15:10:52 2007.
====================
HRESULT = 0x80070005 -- Access is denied.
Function = CRSaveFormData::Execute
Occurred in .\RXSaveFormData.cpp on line 838.
Compiled on Nov 30 2009, modified on Thu Apr 12 15:10:52 2007.</errorDetails>
</error>
</commandResult>
Any ideas?
Thanks