Our client is asking for some help with form fields that are submitting to Salesforce via the connector. Everything seems to be passed as a string. "5" instead of 5 for a number and no way to pass a choice as true instead of "true".
Am I missing something obvious?
I was able to adapt Quan Tran's code from https://world.episerver.com/forum/developer-forum/episerver-forms/thread-container/2019/1/customize-multiple-choice-form-field-value-separator-/ and switch the string to boolean. Still waiting for the client to confirm that Salesforce looks correct but this seems to do what they want.
// get the selected value from submission data
var selectedValue = marketingActor.SubmissionData.Data[fieldName]?.ToString();
//replace string with boolean
if (selectedValue.ToLower() == "true")
marketingActor.SubmissionData.Data[fieldName] = true;
if (selectedValue.ToLower() == "false")
marketingActor.SubmissionData.Data[fieldName] = false;