Keyser_Soze
2 years agoContributor
Get Account Type as Integer From String
 Hello There, 
 Is there a way to get the 'Integer' behind each Account Type based on a 'String' ?    Context: I am trying to create new Account Members with pre-defined properties, all properties wer...
- 2 years agoOff the top of my head: Function GetAccountTypeByName(ByRef accTypeName as String) try: return AccountType.GetItem(accTypeName) catch ex as Exception: throw ErrorHandler.LogWrite(si, new XFException(si, ex)) end try end functionThat gives you back an AccountType object, which is a bit more flexible. Then in your main code you can use it like this: AccProperties.AccountType.SetStoredValue( GetAccountTypeByName("Flow").Id )