However, I am receiving the error (Invalid cast from 'System.String' to 'Person').
Is there a way to get around this?
Code: Select all
// Set Contact to main person
If ( CountOf({{.BillTo.People}})>=1 ) Then
Iterate {{.BillTo.People}} From 1 To #{{.BillTo.People}}
If ( @.IsMainPerson = True ) Then
Value = @.Name
Break
EndIf
Loop
EndIf