I need to create a link on a Web Page that will launch a new InfoPath form.
When I try to do it using a default HTML link, the users get an Insufficient
Security Privilege error. I remember reading somewhere that you have to set
the default URL to the forms library, or something to that effect, through
JavaScript?
Can someone provide me a link to the instructions on how to do this?
Thanks!
Hello CycleFitness,
try the following javascript. It should solve your problem.
Just replace the path information
Example-Script.
<html>
<body>
</script>
<!-- The following line opens a link to the infopath form. //-->
<a href="javascript:WPQ1test();">Insert the link name here</a>
<script language="JavaScript">
function WPQ1test()
{
//var path = ' ' + window.location;
// var processedPath = path.substr(0,path.lastIndexOf('/'));
// alert(processedPath);
// Define location where the template should be opened from
// var strTemplate = processedPath +
"/MembershipRequests/Forms/template.xsn";
var strTemplate =
"https://workspace1.siemensvdo.com/content/00002047//IOCRM_SL/test/VacationReques
t2012/Forms/template.xsn";
// Define a specific Save Location (if needed)
// var strSaveLocation = processedPath + "/MembershipRequests";
var strSaveLocation =
"https://workspace1.siemensvdo.com/content/00002047//IOCRM_SL/test/VacationRequest2012";
var strProgID = "SharePoint.OpenXMLDocuments";
createNewDocumentWithProgID(escapeProperlyCore(strTemplate, true),
makeAbsUrl(strSaveLocation), strProgID, true);
}
</SCRIPT>
</body>
</html>
Kind regards!
> I need to create a link on a Web Page that will launch a new InfoPath form.
> When I try to do it using a default HTML link, the users get an Insufficient
[quoted text clipped - 5 lines]
>
> Thanks!