Ales
Novice

SmartObject generated from SP list (attachement), how to extend methods

I would like to add one column to attachement SmartObject, which was generated from SharePoint List. I alredy Add new Column in Properties with SmartObject Designer, but methods doesn't include it. How i can add new Column to following methods (Get Attachments List and Add Attachement). Logicaly it should be done on SharePoint list, but I can't find any Attachment properties there to add additional column for Attachements.

 

 

 

0 Kudos
Reply
4 Replies
Andrew_Blinco
Novice

Re: SmartObject generated from SP list (attachement), how to extend methods

Ales

 

I will assume you are using SP 2013.

 

To add another property to a SharePoint list/library smartobject you should add the new column to the list and then regenerate the smartobject from within SharePoint - have a look at the K2 for SharePoint User Guide

 

The attachments smartoject that is generated with a List smartobject cannot be changed, as this smartobject represents the ability to add attachments to a list item (this a feature of lists you can enable/disable with SharePoint). You can't modify the columns that are associated with attachments - so therefore you cant modify the attachments smartobject. 

 

In a more general sense, if you add a new property to a smartobject you will need to edit each method you want to use the property in and map the service object property to the new smartobject property.

0 Kudos
Reply
Ales
Novice

Re: SmartObject generated from SP list (attachement), how to extend methods

Thank you for answer.

 

Ok, so if I can't change attachments parts of list on SP 2013 is it ok if I add additional column only in smartobject? Probably this additional column (created only in SmartObject with Designer) will be lost if I will start regenerating SmartObjects or not? Is there any tutorial which exactly shows how to manualy add new column to exiting methods? My SmartObject is advance type.

 

Please find enclosed screens of my Smart Object. I have tried with adding new Method, but obviously there are SP definition, therefore new Column is not shown in fields (what is logical, since I created new Column only in SO Designer). Is there any way to add this Column in methods?


properties_(so_designer)_2342.png
methods_(so_designer)_2343.png
edit_method_get_att_list_2344.png
add_new_moethod_1_2345.png
add_new_moethod_2_2346.png
add_new_moethod_3_2347.png
0 Kudos
Reply
Ales
Novice

Re: SmartObject generated from SP list (attachement), how to extend methods

Just for information. I have solved mentioned problem wit creating new SmartObject in SO Designer. This way was fastest and simpliest. Thank you Andrew for hints.

0 Kudos
Reply
IPO
Novice

Re: SmartObject generated from SP list (attachement), how to extend methods

In SharePoint List or Document Library , if you add or modify anything, you need to sync with the existing smartobject . All you need to do is run K2 App for sharepoint and sync the smartobject.

0 Kudos
Reply