Skip to main content

Hi all,

 

I am trying to include a SmartObject created from a list in Sharepoint 2013. I get that to work, but I need to get the SmartObject into a workflow using Visual Studio 2013 and then email me the results (jst to see that I am getting the ). I also created a List View from the same list in SharePoint but it does not display on any of the objects in visual studio. Are there any PDF guides I can use to help me or can somebody please point me in the right direction? I did the Blackpearl and SmartForms training but nothing geared towards visual studio.

The first step is to get familiar with the K2 Object Browser. I say this with the huge assumption that you have successfully installed the K2 for Visual Studio bits and K2 functionality is showing up in VS. The best quick test for this is to just do a new project and see if a K2 category is listed. If that is there chances are that it is good.

 

So your question is deceptively simple, but there are some gotchas that may be getting in your way. In Visual Studio, any of the wizards you should see a black box with with three dots s ... ] next to the text boxes. These indicate that you can populate those wizard fields with data from the K2 Object Browser. 

 

In the object browser, you will see five? (I'm working from memory here so don't panic if there are six.) tabs that make up the object browser. If you mouse over the tabs you will see a small tool tip pop up. you will want to find the one that says Environment. It is usually the one towards the top if not the first one (again working from memory).

 

Once you find the environment tab, look down the list and locate the SmartObject Server node. Click on that, click on the second entry (don't click on local) and drill down through that node of the tree until you locate your smart object. Once you find the smart object, drill into it and pick the method you want to use and the property that is in that method. Click on that and click add. This should now pop up another window that lets you configure all sorts of things about the smart object call.

 

That was the easy part. What may get a little confusing is entirely dependent on how your environment is configured and where those gotchas I talked about come into play.  I'll skip digging into that for now. See if you can find the object browser and the Smart Object Server node.  That is the first place to start when using smart objects in your workflows.

 

Hope this helped.

 

S.


Thanks ScottPCaliber, I see the Environment tab in the Object Browser ad my SmartObject pops up. I will give it a bash and see how far I get.


Great!

 

Also, if you don't like the black box approach, on the right side of the wizard there is a narrow black strip with a white arrow in it. If you click on that black strip, an object browser will slide out from the right side of the wizard screen. Pretty handy if you are more of the drag and drop sort. 

 

Something to note, there was a quirk in the UI at one point that click on an item in the drawer and dragging it to the left wouldn't drag the item. You had to click on the item, drag it slightly toward the top of the drawer then drag it over to the left. I don't know if that was ever patched, but worth knowing about it should you want to go that route.

 

Keep in mind that for most of your use cases you will want to focus on the single methods of the smart object such as read, load or whatever the labeling is for your method of choice. Those will all usually require some sort of primary key which you can also satisfy by using the object browser to get that bit of info from a process data field for example.

 

Good luck!

 

S.


Reply