We are under construction!
You may experience downtime, errors or visual oddities, but we anticipate all will be resolved by the end of the day.
You may experience downtime, errors or visual oddities, but we anticipate all will be resolved by the end of the day.
Alternatively, you could use this below:
If api.Account.GetAccountType(api.Pov.Account.MemberId) = AccountType.Revenue OrElse api.Account.GetAccountType(api.Pov.Account.MemberId) = AccountType.Expense Then
Hi BabuJayaraman ,
You are close. Try this:
Dim acctTypePov As AccountType = api.Account.GetAccountType(api.pov.account.memberid)
Dim isIncStmtAcct As Boolean =
acctTypePov.Equals(AccountType.Expense) OrElse
acctTypePov.Equals(AccountType.Revenue)
If isIncStmtAcct Then
Return 1
End If
In your call you are getting the account type object, and you need to use the name property of that object to check for account type name.
This should work
If api.Account.GetAccountType(api.pov.account.memberid).Name.XFEqualsIgnoreCase("expense") Or
api.Account.GetAccountType(api.pov.account.memberid).Name.XFEqualsIgnoreCase("Revenue") Then
End If