We're currently trying the integrate the WFFM Save Actions provided in the Dynamics CRM Campaign Integration (2.2) to create a contact, then create an CRM Entity and assign it to the contact. The module appears to provide this option, allowing us to select "Previous Save Action" as the "Use value from" and then selecting the previous save action.

However even though the create contact action executes successfully, the create entity step fails with

64724 10:28:56 WARN  [WFFM] 'Sitecore.CrmCampaignIntegration.Submit.CreateCrmEntity' does not contain a definition for 'Context'
Exception: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException
Message: 'Sitecore.CrmCampaignIntegration.Submit.CreateCrmEntity' does not contain a definition for 'Context'
Source: Anonymously Hosted DynamicMethods Assembly
at CallSite.Target(Closure , CallSite , Object )
at Sitecore.CrmCampaignIntegration.Submit.CreateCrmEntity.GetValue(XCrmField field, AdaptedResultList list)
at Sitecore.CrmCampaignIntegration.Submit.CreateCrmEntity.SetProperties(ICrmEntity entity, AdaptedResultList fields)
at Sitecore.CrmCampaignIntegration.Submit.CreateCrmEntity.Execute(ID formId, AdaptedResultList adaptedFields, ActionCallContext actionCallContext, Object[] data)
at Sitecore.Forms.Core.Dependencies.DefaultImplActionExecutor.ExecuteSaving(ID formID, ControlResult[] fields, IActionDefinition[] actionDefinitions, Boolean simpleAdapt, ID sessionID)

64724 10:28:56 WARN  [WFFM] The 'Create CRM Entity[id={2232D4D2-7A72-44AA-A3C2-65F018A9E2B2}]' save action failed: We experienced a technical difficulty while processing your request. Your data may not have been correctly saved.

This issue doesn't occur when I use "CRM" as the field source and select an existing contact. So it seems like the pass through of the previous action doesn't happen, i.e. the Form Context doesn't exist.

Any thoughts on how to solve this one or work around it?

1 Answer 1


It looks like there is an issue with the CreateCrmEntity save action. I logged a ticket with Sitecore Support but in the meantime I was able to resolve the issue by adding the Context property to the save action as follows:

public class CreateCrmEntity : Sitecore.CrmCampaignIntegration.Submit.CreateCrmEntity
    public ActionCallContext Context { get; set; }

    public override void Execute(ID formId, AdaptedResultList adaptedFields, ActionCallContext actionCallContext = null,
        params object[] data)
        Context = actionCallContext;
        base.Execute(formId, adaptedFields, actionCallContext);

You can then update the Assembly and Class fields in the Save Action definition here: /sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions/Create CRM Entity

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.