How to get list of all generated smartobjects from a K2 service instance?

  • 22 October 2020
  • 4 replies
  • 20 views

Hi,

This is more of a developer question who has worked on custom broker libraries using c#.

I am trying to get list of all generated smartobjects and their properties for a service instance.

Is there an api in K2 Five Developer Ref library, that can return list of reference for all smartobjects given a service instance name? 

I found this 

public SmartObjectInfo GetGeneratedSmartObject(     Guid serviceInstanceGuid,    string serviceObjectName )

but it needs a serviceinstance GUID as well along with the name.

A front end user will not have the guid , he will just have the name of service instance.

Does anyone know of any other api or can guide me how to achieve this?

 

Thanks


4 replies

Badge +6

Have you try to to get GUID from SmartBroker.ServiceInstance Table ? or

create an advanced smartobject to get guid from that table ?

@YUDI2 , No I haven’t . How to create advanced smartobject to get the guid?

Badge +6

Please check this out, Hope it helps.  

 

K2 Database : SmartBroker Schema

 

K2 Database > SmartBroker Schema : SmartBroker.SmartObject Table

Thanks @YUDI2 . Actually I found the exact method. 

This takes a serviceType as input (in my case I know this) and gives back the list of serviceinstances with GUID.

Reply