I need to enable crosscompany functionality for the credit check. I have extended the SalesTotalsBuildQueryRunTrans class and overridden the createSalesLineQueryRun() method. In this method I get the queryRun object from super() and set allowCrossCompany property to true. In the debugger, I can see the property has been set to true however the query doesn't change and the results of the query are also unchanged. I've done this hundreds of times in 2009. I have tried setting both the queryrun object as well as the query object. I don't understand what is wrong? Any help would be appreciated.
class SalesTotalsBuildQueryRunTrans_Global extends SalesTotalsBuildQueryRunTrans
{
protected QueryRun createSalesLineQueryRun()
{
QueryRun qr;
Query q;
qr = super();
q = qr.query();
q.allowCrossCompany(true);
q.addCompanyRange('USMF');
q.addCompanyRange('USPI');
qr.query(q);
return qr;
}
*This post is locked for comments
I have the same question (0)

Report
All responses (
Answers (