Posted on 09/09/2019 13:29:21
Hi Karsten,
I found the same problem in Rapido 3.1 too, where State field on the JSON template is showing as null when the State field is populated in the Customer Center.
I used the template you passed me and there's two issues I found - after correcting those it worked like a charm:
1. stateObject.id is getting the wrong tag to populate the JSON template
stateObject.id = state.GetString("Ecom:DeliveryRegion.Value")
stateObject.id = state.GetString("Ecom:DeliveryRegion.RegionCode");
2. Many times States are passed as the ID/RegionCode, so this should be comparing the Ecom:Order.Delivery.Region to state.GetString("Ecom:DeliveryRegion.RegionCode") as well.
string selected = GetString("Ecom:Order.Delivery.Region").ToLower() == state.GetString("Ecom:DeliveryRegion.Name").ToLower() ? "selected" : "";
Regards