Skip to main content
Nintex Community Menu Bar
Question

Returning List from Endpoints Assembly with Properties

  • December 12, 2022
  • 3 replies
  • 51 views
  • Translate

Forum|alt.badge.img+1

We have an Endpoints assembly method returning List of Objects, however when we try to create a K2 Listview based on it or execute method directly using SmartObjects tester tool then it does not return properties in clear format i.e., properties wise tabular format with columns.

Below is sample defination of the method, is there anything missing here?

 public static List<ERPTasks> GetListOfObjects (string userEmail)         {             List<ERPTasks> listErpTasksObjects=new List<ERPTasks>();              ERPTasks _obj = new ERPTasks();              _obj.AssignmentDate = "1/1/2022";             _obj.TaskTitle = "Tasks 1";              listErpTasksObjects.Add(_obj);              _obj = new ERPTasks();              _obj.AssignmentDate = "2/1/2022";             _obj.TaskTitle = "Tasks 2";              listErpTasksObjects.Add(_obj);               return listErpTasksObjects;         }

 

Did this topic help you find an answer to your question?

Forum|alt.badge.img+13
  • Scholar
  • December 12, 2022

What is the definition of ERPTasks and what do the results look like when you execute the SmartObject?

Translate

Forum|alt.badge.img+1
  • Rookie
  • December 13, 2022

Thanks @tbyrne777 , below is the definition of the ERPTasks as requested.

 public class ERPTasks
    {
        public string TaskTitle;
        public string AssignmentDate;
    }

and below is the result currently when we execute using the tester tool. we can see the data part of result sbut somehow it’s not returned as columns that we want so that we can develop K2 ListView based on it.

ERPTasks (ERPTasks)
{"$type":"MHCMAPICLientLibrary2.ERPTasks, MHCMAPICLientLibrary2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","TaskTitle":"Tasks 2","AssignmentDate":"2/1/2022"}
{"$type":"MHCMAPICLientLibrary2.ERPTasks, MHCMAPICLientLibrary2, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null","TaskTitle":"Tasks 1","AssignmentDate":"1/1/2022"}

 

Translate

Forum|alt.badge.img+13
  • Scholar
  • December 13, 2022

That is strange behavior considering how simple your ERPTasks class is - what version of the K2 Platform are you running? Do you have a WCF endpoint available that you can try to use to call this function instead of the Assembly endpoint? I’ve had a much better experience with WCF Service Instances and it may be easier to troubleshoot if the problem persists

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings