Can't refresh SmartObject Integration with InfoPath

  • 30 October 2009
  • 4 replies
  • 0 views

Badge +5

Hi all,


I have several SmartObject integrated with my InfoPath form. They were initially integrated via Windows Explorer, then after I integrated the form with a wofkrlow I've been adding them via visual studio. I now have 2 problems...


1. I have changed and redeployed the SmartObject definitions. I cannot refresh my InfoPath form because it tells me that a field doesn't exist (which is correct - I have deleted it, but it's not refreshing the SmartObject so it doesn't pick that up). However, I think this is caused by point 2:


2. The list of SmartObject methods shown to me from Visual Studio is different to the list shown when I right-click the file from Windows Explorer.


How can I get these to sync up? Anyone else had this problem?


4 replies

Badge +10

Whenever the underlying SmartObject has changed I've always had to remove the SmartObject from the InfoPath form and then re-add it to get the changed SmartObject properties.  Its a bit of a pain but easy to do.  After the IP form has been integrated into the process its probably best to do remove the existing SmartObjects and add the changed one from the InfoPath Integration button inside of K2 Studio to ensure you're changing the IP form that's been brought into the K2 Project.


I'm not aware of any way to automatically sync the smartObject in the InfoPath form to the latest version.  If this is a way I'd be happy to hear about it but I don't think its a curently a feature. 


I hope this helps.


Tim


 

Badge +5

Actually, if you run the InfoPath integration wizard, select your form and click 'refresh' it will update all your SmartObject datasources to the latest deployed version. That said, I know that works for SmartBox SmartObjects, but I'm not sure about other custom ones.


The issue I'm having is that from Windows Explorer I see that my form has integrated with MySmartObject.Method1. If I open my form in design mode, MySmartObject.Method1is there. If I open the SmartObject integration via Visual Studio, it's not there...

Badge +10

Ha, well you're absolutely right about the Refresh updating the SmartObject in the IP form to use the latest version.  Thanks you've saved me a tonne of work from what I used to do :).  Serves me right for making assumptions but in my defense, I looked in the K2 Help about InfoPath Form Template Refresh button and its actually incorrect or at the very least not complete so you have to make assumptions about what that button refreshes.


Back to your problem.  When you open the form in Windows Explorer to view the SmartObject integration what is the location you're opening the form from?  Is it in the "InfoPath Form Templates" folder of your K2 Project Solution?  This is where K2 stores the InfoPath form after its been integrated into a process so any modifications should be done to the form in that location.

Badge +5

He he...


Location of file - good suggestion, but I'm definitely opening the correct one. I've hacked the file up a bit to work around the issue since I'm flying out the country in a couple of hours, but I'll jump back onto the problem when I get back?


Isn't there an Insider's conference going on at the moment? If there is, and you are there, please tell Gabriel Malherbe his best looking coworker says hi :)


Thanks for the help!

Reply