Date filter in extension
Summary:
Fetch data when the EffectiveTo is null or EffectiveTo is greater that todays date
Content (please ensure you mask any confidential information):
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):
Object getTaxRegistrationInfo(Long taxProfileId, String countryCode) {
def taxPVO = context.getViewObject("oracle.apps.financials.tax.configuration.party.publicView.TaxRegistrationPVO");
def vc = taxPVO.createViewCriteria();
def vcrow = vc.createViewCriteriaRow();
vcrow.setAttribute("PartyTaxProfileId", taxProfileId);
vcrow.setAttribute("TaxRegimeCode", countryCode);
vcrow.setAttribute("EffectiveTo", null);
//How to filter EffectiveTo is greater that todays date?
def rowset = taxPVO.findByViewCriteria(vc, -1);
def taxRegistrationInfo = rowset.first();