Skip to main content
Nintex Community Menu Bar

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

  • October 21, 2020
  • 4 replies
  • 86 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

Forum|alt.badge.img+6
  • Novice
  • October 22, 2020

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

create an advanced smartobject to get guid from that table ?


  • Author
  • October 29, 2020

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


Forum|alt.badge.img+6
  • Novice
  • October 30, 2020

Please check this out, Hope it helps.  

 

K2 Database : SmartBroker Schema

 

K2 Database > SmartBroker Schema : SmartBroker.SmartObject Table

  • Author
  • October 30, 2020

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.