Skip to main content

I am duplicating an item in the sharepoint at same location. The parent item is being getting created when we submit the infopath form. The copy item action is working fine, but I need to update some field so, when I try to update the duplicated item using update xml in the same workflow, it shows "The remote server returned an error: (401) Unauthorized", even when I have full access.

And then I try to use web request to get xml, then it is giving the "html code", instead of xml.

 

Could you please help me to find out how I can get the XML for the url, and why web request action is giving the html?

 

I have tried to create another workflow to update the duplicated item, it is working but it takes long time to make changes.

@cju 



Can yo help me with this.


@Brar , can you share the HTML you're getting from the web request action?



 



Regarding the update XML action where you get a 404 error: How have you configured it? Have you filled in the credentials part?


@cju Thank you for your reply



When I run the web request for the first time then it give me the output as below:



Response code 302. When I test connection it shows "Request failed with status: Unauthorized.", but when I execute it, it comes up with response code 302





After that I tried to use this url, which is shown in the picture above, then I get the HTML code of web page, instead of form xml.





The XHTML I get is something look like this:



<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
<html lang='en-US'>
<head>
<title>Sample</title>
</head>
<body style='margin: 0px;height:100%;'>
<div style='height:0px'>
<div id='_InfoPath_WaitUI' style='height:0px'>
<div style='position:absolute;width:100%'>
<div style='width:100%;text-align:center;'>
<div style='height:100px;'></div>
<table style='margin:125px auto 75px;height:61px;width:300px;border:1px solid #dbdbdb;background-color:white;z-index:2500;' cellpadding='0' cellspacing='0'>
<tr>
<td style="padding:16px;border:none;">
<img src='/_layouts/15/images/gears_anv4.gif' width='24' height='24' style='border:0px none white' alt='' />
</td>
<td style='padding:16px;'>
<div role='alert' style='font:13px Tahoma;font-weight:normal;color:#676767'>Loading Form...</div>
</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</body>
</html>
<html>
<head>
<script>
</script>
<link>
</link>
<title> </title>
<style>
</style>
</head>
<body>
<form>
</form>
</body>
</html>



 



 



 



Yes I have configured the Update XML action and have provided credentials as below





 



It is not working, and show error of unauthorised, even the same action is working in the other workflow with same credentials, and for same url, where instead of url to xml file, I have used current item.



 



Thankyou for your help



Regards,



 


Reply