You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Why the following object function doesn't work when called in a trigger?

in Sales 1 comment

Hi,

When I am fetching deal records to update status:

166 count of records fetched when -> object function script is pasted inside trigger

0 count of records fetched when -> function is called inside trigger, ex. ObjFunction()

***************************************************************************************************************

Script:
def vo = newView('DealVO')
def criteria = vo.createViewCriteria();
def criteriaRow = criteria.createRow();

def criteriaItem1 =criteriaRow.ensureCriteriaItem('StatusCode');
criteriaItem1.setOperator('=');
criteriaItem1.setValue('ORA_DRAFT');

criteria.insertRow(criteriaRow);
vo.appendViewCriteria(criteria);

vo.executeQuery();
def count= vo.getEstimatedRowCount()

println("count: " + count)

***************************************************************************************************************

Thanks,

Anuj

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!