Hi everybody,
I'm quite new in using K2 and so excuse me if this is a simple question.
I have an sql table that has a key of type Uniqueidentifier (Guid)
I've created a SmartObject that wraps that table, using the "SQL Server Service" as the ServiceObject.
Now there is a moment in my process where I need to invoke the Create method of this SmartObject and so I need to generate a new Guid and assign it to the corresponding property.
I've already tried:
1) Creating a custom inline function that simply returns Guid.NewGuid() from .Net:
Gives an error: Object must implement IConvertible
2) Creating a custom inline function that returns Guid.NewGuid().ToString:
Can't continue designing because it states that the data types do not match
3) Create an sp that simply executes SELECT newid():
Also can't continue designing because of the data types.
I'm pretty sure there must be a simple solution, however I have not figured it out.
Can anybody please explain how do I generate a new Guid in my process when I need it?
Thanks in advance
Eduardo