I'm trying to write a UI extension for Experience Space, which gets the ID of an image from a third-party service, converts it into an ECL uri and inserts a multimedia link to this (stub) item.
When I call the setValue method with this ECL uri (a string) as a parameter, I'm getting this error when I try to save the component:
Invalid cast from 'System.String' to 'Sdl.Tridion.ContentManager.OpenApi.Dto.Link'
So I guess I need to construct some sort of Link object and pass that as parameter to setValue. But I cannot figure out how to do that.
By the way: I was able to create an extension of the classic UI in the same way. I found out that as long as the UI passes a correct ECL URI as a value, Tridion will create the stub and construct the link. I hope the same is true for Experience Space.
Link
. Unfortunately, my knowledge of the XS frontend it too limited to explain how you can do that.