Display method for the dimension

Dear all,

I wrote a display method for the dimensions to be displayed from the master table.

Display Dimension CaeDimension()
{

Return caeTeleMaster::find(this.TeleNo).Dimension;
}

Master table is caeTeleMaster and the child table is caeTeledetails.For the form caeTeledetails its joining with the tele no.So when i select the telephone number from the child table it has to display the coresponding projid,emplid,dimensions from the master table.So i worte display method for projectid,emplid,dimensions.Here projid,empl id is displaying properly but dimensions is not displaying.Since we have dimension[1],dimension[2] etc…Dimension6.Buit when i write the display method it takes only dimension and the display method doesnt works here.Please let me know how to sort the above issue.

Hi,

You should try the following code:

Display Dimension CaeDimension()

{

Return caeTeleMaster::find(this.TeleNo).Dimension[Dimensions::code2ArrayIdx(SysDimension::TheDimensionYouWant)];

}

Regards,

Thomas

Hi,

Thanks for the response.I wrote the above code

Display Dimension CaeDimension()
{

Return caeTeleMaster::find(this.TeleNo).Dimension[Dimension::code2ArrayIdx(SysDimension::Analysis)];
}

But got an issue saying that The operand is not compatible with the type of the function.

Hi,

Thanks for the response.I wrote the above code

Display Dimension CaeDimension()
{

Return caeTeleMaster::find(this.TeleNo).Dimension[Dimension::code2ArrayIdx(SysDimension::Analysis)];
}

But got an issue saying that The operand is not compatible with the type of the function.

Hi,

The method must returns the type as declared in header: Dimension[Dimension::code2ArrayIdx(SysDimension::Analysis)] has not the same type as Display Dimension CaeDimension(), I don’t have the caeteleMaster table and I only have 4 dimensions in my AX, so check the extended dataType of the dimension field in caeTeleMaster Table and declare the same in the method header.

Regards,

Thomas

With the above code instead Dimension ,i worte as Dimensions since the table name is Dimensions.For that it threw the below error

Dimension is not a class.

Return caeTeleMaster::find(this.TeleNo).Dimension[Dimensions::code2ArrayIdx(SysDimension::Analysis)];

What is the extended data type of the field you want to return with your method?

EDT is Dimensions.i need to return dimensions[1] but whereas in the table it can be viewed as dimensions only.

Both the header table and child table has the same edt called dimensions

The code I show you is what I use to get dimension values, I don’t understand why It doesn’t work for, it works for me…

I’ll try to find out another solution

regards,

Thomas

Thanks Thomas for thr response.

Hi All,

Is there any solution for the above issue?Please let me know if you could get some solution.