Home > Forum > Actions > SDK CustomAction return data to ItemsList

SDK CustomAction return data to ItemsList
0

Hello Gurus
I'm trying to do such action:
In my VS solution, I have made CustomAction that gets data from an external system as a list. I would like to return that list to ItemsList in my workflow. I have code like this:

[ConfigEditableFormFieldID(DisplayName = "Pozycje nagłówka ", FormFieldTypes = WorkFlow.SDK.Objects.Enums.FormFieldTypes.ItemsList)]
public List<Nagl_OT> Lista_Poz { get; set; }

public class Nagl_OT
{
[ConfigEditableFormFieldID(DisplayName = "Numer SAT", FormFieldTypes = WorkFlow.SDK.Objects.Enums.FormFieldTypes.TextSingleLine)]
public string Sat_ID { get; set; }
[ConfigEditableFormFieldID(DisplayName = "Podnumer SAT", FormFieldTypes = WorkFlow.SDK.Objects.Enums.FormFieldTypes.TextSingleLine)]
public string Podnr_ID { get; set; }
[ConfigEditableFormFieldID(DisplayName = "Data dokumentu", FormFieldTypes = WorkFlow.SDK.Objects.Enums.FormFieldTypes.TextSingleLine)]
public string DataDok { get; set; }
[ConfigEditableFormFieldID(DisplayName = "Data odniesienia", FormFieldTypes = WorkFlow.SDK.Objects.Enums.FormFieldTypes.TextSingleLine)]
public string DataOdn { get; set; }

}

In Run() I put records from an external system to Lista_Poz. In Designer Studio I have created Items List with columns like in Nagl_OT.

When I call my action in the workflow I get an error:Invalid cast from 'System.String' to 'WebCon.SAP.CustomActions.NaglowekOT+Nagl_OT

How should I implement Items List in my solution that I could be able to return data in workflow?
Please help!!! :)

Greetings Kate.