Try our conversational search powered by Generative AI!

I get "The property CallWebhookAfterSubmissionActor is read-only" when trying to update the webhook URL in EpiServer 11


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 = "";
formContainerBlock.Content.SetPropertyValue("CallWebhookAfterSubmissionActor", webhookActorModels);

And the error I get:

Apr 06, 2023 18:36

When is this code being executed? Try calling your block of code when the content is being created.

context.Locate.ContentEvents().CreatingContent += CreatingContent;

Apr 10, 2023 1:50
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.