How to pass complex model to SurfaceAction

Hi

Umbraco 13 and in a view I have a hyperlink. I’m trying to pass in some data from this view to a controller (surface controller)

The model is

Public Customer MCustomer
{
   public string FreeText {get; set;}
   public CustomModel Custom {get; set;}
}

In my view I add

<a href="@Url.SurfaceAction("myMethod", "CustomSurface", new MCustomer{CustomModel = new CustomModel {propOne="hello"}, FreeText= "this is free text"})"> Test</a>

In this scenario the free text content comes through but the custom model doesn’t? Why and how can I resolve this?

Thanks


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/114002-how-to-pass-complex-model-to-surfaceaction