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
When is this code being executed? Try calling your block of code when the content is being created.
context.Locate.ContentEvents().CreatingContent += CreatingContent;
This is what my test code looks like:
var formIdentity = input as FormIdentity; var formContainerBlock = formIdentity.GetFormBlock(); var webhookActorModels = formContainerBlock.Content.Property.GetPropertyValue<IEnumerable<WebhookActorModel>>("CallWebhookAfterSubmissionActor").ToList(); if (webhookActorModels == null || webhookActorModels.Count() > 0) { webhookActorModels[0].BaseUrl = "google.com"; } formContainerBlock.Content.SetPropertyValue("CallWebhookAfterSubmissionActor", webhookActorModels);
And the error I get: