Get customer credit card number based on Expiry date validation
public static
RefRecId getCreditCardOCP(CustAccount
_custAccount)
{
CreditCardCust custCreditCard;
select
firstOnly RecId,ExpiryDate from custCreditCard
where
custCreditCard.CustAccount == _custAccount;
if(custCreditCard.ExpiryDate
&& CreditCard::checkExpireDate(custCreditCard.ExpiryDate))
{
return
custCreditCard.RecId;
}
return
0;
}