I am creating a Journal Entry integration that needs the account number modified slightly based on what the incoming account number is. In a nutshell if the incoming account number has 2 "-" it gets changed to a hardcoded account number, otherwise the account number in the file is used. When I try to run the below script I'm getting this error even those I can use MsgBox to see sAccountNumber is being populated correctly:
DOC 1 ERROR: Error Executing Script 'Entries.Account Number' Line 6: - Object required: 'sAccountNumber'
Dim sAccountNumber
sAccountNumber = CStr(SourceFields("AccountNumber"))
Dim count
count = 0
count = sAccountNumber.ToString.Split("-").Length - 1 'this line is throwing the error********
If count = 2 Then
CurrentField.Value = "02-10-1111-2410-00"
Else
CurrentField.Value = sAccountNumber
End If
Any ideas why that would cause an issue?
*This post is locked for comments