Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
I think the list needs to contain at least one item.
var mediaLinks = new MediaReferenceList<MediaReference>(); mediaLinks.Add(new MediaReference { Id = 1 }); if (mediaLinks.Any()) { product.Images = mediaLinks; }
Hi
I am creating pages programmatically that has Image Vault MediaReferenceList property like this:
[BackingType(typeof(PropertyMediaList))] public virtual MediaReferenceList Images { get; set; }
Creating product:
var product = (Product)contentRep.GetDefault(ContentReference.StartPage).CreateWritableClone();
product.Images = new MediaReferenceList();
product.Images is always null no matter what.
Thanks
/ Johan