Skip to main content

Hi all


I have created a SmartObject for a SharePoint list. I have a simple InfoPath form  using which I want to create / edit and view list items. So, I integrated the Infopath form with SmartObject. 


Can I use the Create method of the Smartobject to create more than one list item at once. What I want to do is to have a repeating table in the form to add new list items and submit them all at once to the list using Create method.


Thanks


KB


 


 

Yes.  You can create N number of methods in any single smartobject method.  Hence you can create a method in your create method that creates additional list items in other lists within SharePoint.  You will first need to create a service broker instance to each of the sites so that you can add them as service broker methods in your smartobject.  The other option is to create a small workflow that updates al of your lists and simply call the launchprocess  method from that smartobject after the creat.


Thanks for answering.


I guess I should have added this. Basically I am creating SmartObject for a SharePoint list in the "K2 Settings" page of the SharePoint site. I am using the same SmartObject that k2 generates. I am not creating a new one from scratch. After I have generated SmartObject for a list, I integrated an Infopath form with that smartobject. 


I created a repeating table that acts as the data entry for new list items. Every row of the repeating should become a new list item. I mapped the repeating table to the input properties of the Create method. 


The above process works fine except that it just adds a single list item instead of one for each repeating table row. My question is can add all the rows of the repeating table to list?


 


 


 


 


 


 


Reply