Home > Forum > Actions > How to build and access a ConfigEditableItemList with SDK?

How to build and access a ConfigEditableItemList with SDK?
1

I try to implement a ConfigEditableItemList in a custom action in C#-code.
When I go over the ConfigEditableItemList I get the message: "The class with the item list configuration must implement: IConfigEditableItemList".
I implemented an example but when I upload the SDK into Webcon I get an error that there is the implementations missing and I can see nothing from the SDK.
Has someone experience with the ConfigEditableItemList and can give me a better example?

Photos from the case are in the attachment.

Thank you very much for your help and answers.

MVP

Hi Maiximilian,

this looks could, I think. The only difference to my case is that my columns are of type int.

[ConfigEditableItemListColumnID(DisplayName = "A", Description = "A", IsRequired = true)]
public int A { get; set; }

But I don't think this is related to the error message. My guess is that you are referencing another SDK version in Visual Studio than the version where you are executing the code. Maybe you are using a SDK for 2020 and deploying the solution to an 2021 environment?

Best regards,
Daniel

In reply to: Daniel Krüger (Cosmo Consult)

Hi Maiximilian,

damn, this is going to be somehow difficult to guess. :)
Can you check whether the .zip file used for publishing contains any Webcon* assemblies? In this case remove them and try again.

If it doesn't work, can you upload the .zip file somewhere so that I can check it in our environment?


Best regards,
Daniel

Hi Daniel,

thank you again for the quick answer.
I checked it but I found no additional file in the zip-folder. There was only the .dll and the .json file.
I uploaded the project for you under the following address:
https://drive.google.com/drive/folders/1K39W_aC2VdV2ReTjYlRRp3HoKHSfQeFH?usp=sharing

Thank you very much for your help.
Best regards Maximilian

MVP
In reply to: Maximilian H.

Hi Daniel,

thank you again for the quick answer.
I checked it but I found no additional file in the zip-folder. There was only the .dll and the .json file.
I uploaded the project for you under the following address:
https://drive.google.com/drive/folders/1K39W_aC2VdV2ReTjYlRRp3HoKHSfQeFH?usp=sharing

Thank you very much for your help.
Best regards Maximilian

Hi Maiximilian,

my bad, I overlooked something.
[ConfigEditableItemList(DisplayName = "Test listfield ID")]
public List<ChangeListItemIndex> ChangeListItems { get; set; }

Needs to be changed to:

[ConfigEditableItemList(DisplayName = "Test listfield ID")]
public ChangeListItemIndex ChangeListItems { get; set; }

Afterwards I could load the configuration just fine. :)

Best regards,
Daniel