...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public class AccountTerminationException extends CRMValidationException { /** * You are not allowed to terminate the Accounts Receivable %1. This is only allowed for Active or Suspended accounts. * * @param crmSession - the session object * @param value - the exception value * @throws Exception */ public AccountTerminationException(CRMSession crmSession, String value) throws Exception { super(); ArrayList<String> parameters = new ArrayList<String>(); parameters.add(value); try { setMessage(this.getClass().getName().toUpperCase(), crmSession, parameters); } catch (Exception e) { e.printStackTrace(); } } } |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<messages> <message> <code>COM.CRM.EXCEPTION.ACCOUNTS.ACCOUNTTERMINATIONEXCEPTION</code> <expression>key_com_crm_exception_accounts_accountterminationexception</expression> <description>You are not allowed to terminate the accounts receivable. This is only allowed for Active or Suspended accounts.</description> </message> . . . </messages> |
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<properties> <entry key="key_com_crm_exception_accounts_accountterminationexception">You are not allowed to terminate the accounts receivable %1. This is only allowed for Active or Suspended accounts.</entry> . . . </properties> |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
public void validateTermination(CRMDOAccountReceivable account) throws Exception, AccountTerminationException{ if (account.getLifeCycleState()==null || (!account.getLifeCycleState().equals(AccountReceivableLifeCycleState.ACTIVE) && !account.getLifeCycleState().equals(AccountReceivableLifeCycleState.SUSPENDED))) { throw new AccountTerminationException(getCRMSession(), account.getNumber()); } ... } |
Question Messages
...
Expand | ||
---|---|---|
| ||
...