I'm very new to K2 and still finding my feet.
I have created a SQL database, Service instance and SmartObjects for some of the data. Using the SmartObjects I have build views and forms. Now I relasise I want another field on one of the tables.
Who can I do this?
I tried editing the SQL table from SQL Server Managagment Studio, refreshing the serviceInstance and both; "refresh SmartObject" and "Recreat SmartObject". But neith of these show the new field. If I chose "publish smart object, I must delete the existing SmartObject and lose any relationships created in the views.
Thanks in advance
To achieve this you will need to :
1- Add the field you want to your database table
2- refresh the service instance
3- create smartobject But before publishing you have to change the name to the previous name of your old smartobject
4- there's a button called get existing GUID, when you press it notice that the GUID changed
5- Publish smartobject, it will show a popup to OVERWRITE the smartobject, click yes
this way it keeps the old smartobject and add the new fields you've added.
wish it helps
Steve's suggestion will work well, however it will delete any associations you have on the SmartObject.
Another way to achieve this without deleting the associations is to edit the smartobject - although its a bit more time consuming.
I had a similar situation: an MSSQL view that was the source for the SmartObject (obviously meant to be read-only object). However, I also had a handful of MSSQL stored procedures that were table-value returning select statements (with a join here and there and/or a few inline string processing functions on some of the columns) that were mapped as custom SmartObject Methods. While the publishing technique as described in the accepted answer worked, it wiped out the custom method mappings, leaving me with only the default standard List method (a "select * from" the source view).
Is there some way to preserve those custom method mappings? Or is it necessary to re-map all custom methods after such a re-publish?