I am writing a simple custom code to a Button control in C#. The code is supposed to open a URL in the same window.
public
void CTRL10_5_Clicked(object sender, ClickedEventArgs e)
{
string URL = "www.google.com";
System.Diagnostics.
Process.Start(URL);
}
Note: Typically, I would have a Hyperlink control, Howerver, clicking on a Hyperlink opens the URL in a new Window or Tab. I have a process where a user would be asked to fill up to 10 web-enable InfoPath 2010 forms. I need the code above in order for the user to switch from one form to another seamlessly. I will be replacing 'www.google.com' with a URL that opens an InfoPath form in browser mode. For now, I have ruled out creating a single InfoPath form with 10 views -- since each of the forms has data/SharePoint columns to support and its own unique workflows.
I have set the form Security Level to domain.
I have published it as an Admin-aproved form template; uploaded the template to InfoPath Form Services (SharePoint 2010), activated it to my site collection, applied the InfoPath Content Type to my form library.
When I click on the button I get this error:
Category: Runtime - Business Logic
Message: Business logic failed due to an exception. (User: ******, Form Name: URLTest PL, IP: , Request: <<removed by me for security purposes>>, Type: SecurityException, Exception Message: Request failed.)
I also tried to set the Security Level to Full Trust. After republishing the form when I click on the button, nothing happens.
Any information or help will be greatly appreciated.
P.