Switch the view in Infopath form using Query string: it raise 5337 Error

  • 6 January 2011
  • 0 replies
  • 2 views

Badge +2

Hi guys,


can you any one help me how to switch the view based upon the query string.


i m creating a one infopath form and k2 process. the infopath form will swich the view based upon the querystring like


i will pass the value in the querystring and get the value in infopath form load function

 


 http://sqlstaging/sites/sitename/_layouts/FormServer.aspx?XsnLocation=http://sqlstaging/sites/sitename/FormServerTemplates/form.xsn&SaveLocation=http%3A%2F%2Fsqlstaging%2Fsites%2FsitenameTest%5Fform&Source=http%3A%2F%2Fsqlstaging%2Fsites%2Fefeedback%2FTest%5Fform%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1?type=view2

 


 


 



public



 



void FormEvents_Loading(object sender, LoadingEventArgs e)

{



// Write your code here.



if(e.InputParameters["type"].ToString() == "view2")



{MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:Name", NamespaceManager).SetValue("View2");}


}


it thru error as 5337 error.above coding is working with k2 process.if i m using k2 process it thro error. please help on this.




0 replies

Be the first to reply!

Reply