Error on Dialog object

Hi All,

Certain things I still don’t like ? Please tell me if anybody knows in the forms?

when I put debugger ? Rec id becomes Zero ? even you pass inside the loop ? why?

Dialog Field,QueryBuildData sourece object not initialized.

Query Run Object not Initialized. But Query Run is there? how to find? where it exactly present ??

Rec Id becomes zero…

While doing debugging !! Changes in Red Color and watch windows becomes empty for certain values.

All your help for a good purpose !! Thanks

Do you really believe that anybody can understand that?

If you want ever get any answer, you’ll have to slow down and start again by explaining what you’re doing and what kind of problem you have with it.

Also, even if you’re not very strong in English, even you may be aware of that something like “Certain things I still don’t like?” and “when I put debugger ?” aren’t meaningful sentences. Try harder to formulate sentences; ask somebody to help you if needed.

Hi Martin ,

Its is "Certain things I don’t understand. that is right?

When I use debugger to check to whether It is fetching the value or not?

When I check on Rec Id its Shows < RecId = 0> and becomes Null. I have a query like this…

I have given a datasource added and it look like this ,

boolean ret;

Query q = new Query();

QueryRun qr = new QueryRun(this);

QueryBuildDataSource qbds1 ,qbds2,qbds3;

QueryBuildRange qbr1,qbr2,qbr3;

SysTableLookup sysTableLookup;

;

qbds1 = q.addDataSource(tablenum(ITTI_ElectricalMeterTypeMaster));

qbds2 = qbds1.addDataSource(tablenum(ITTI_ElectricalMeterMaster));

qbds3 = qbds2.addDataSource(tablenum(ITTI_ElectricalReadingOtherPlant));

qbds1.addLink(fieldnum(ITTI_ElectricalMeterTypeMaster,TypeIdentification),fieldnum(ITTI_ElectricalMeterMaster,TypeIdentification));

qbds1.relations(true);

qbds1.joinMode(joinmode::InnerJoin);

qbds1.fetchMode(queryFetchMode::One2Many);

qbds2.addLink(fieldnum(ITTI_ElectricalMeterMaster,MeterNumber),fieldnum(ITTI_ElectricalReadingOtherPlant,MeterNumber));

qbds2.relations(true);

qbds2.joinMode(joinmode::InnerJoin);

qbds2.fetchMode(queryFetchMode::One2Many);

qbds3.relations(true);

qbds3.joinMode(joinmode::InnerJoin);

qbds3.fetchMode(queryFetchMode::One2Many);

Now its shows the parent datasource is not connected

The data source is not embedded within a (parent) data source.

Please Kindly guide us.

How is adjustQueryRun() (in your picture) related to the code above and how are these two things related to “When I check on Rec Id its Shows < RecId = 0> and becomes Null”?

You really should explain what you’re doing, instead of just showing some random pieces of code.

Hi Martin,

Here I am calling a diolog class. When I call the Dialog class.It will show 4 values…From Date and To Date to select.

After I select the date values…

When I select Type of Identification …it has 1…10 values

In that table…Type identification is unique value …but another field is called…Select Type …

Its a base enum…it shows Plant & Other Plant…

when I select value 1, it should select the corresponding meter number and it should show values from the period to to date values.

But when I select the Type Identification… it should take what type of select type? it can be Plant / Other plant…

Say example…I have selected Type Identification no as 1…its select type is plant…it should select the meter number for the corresponding value…

when I click,It must show From Date to To date for that plant and corresponding meter number…

I am working on AX 2009.

it should show a report.