Dispaly TabPage

RyuRyu Member Posts: 26
edited 2006-03-08 in Dynamics AX
Hi!

I want to display some tabPage when i open a form. criteria is a stringeditControl who is on ParentForm.
i've used init methods on my ds but it don't work. when i used initValue (for create a new recording) it work.

public void init()
{
MSM_ServiceObjectTable MSM_ServiceObjectTable;
;


super();



select MSM_ServiceObjectTable
join MSM_ActiveConfigChoice
where MSM_ServiceObjectTable.ServiceObjectId == MSM_ActiveConfigchoice.ServiceObjectId;
switch (MSM_ActiveConfigChoice.EUR_machineType)
{

case "EXT":
Extincteur.visible(true);
Bloc.visible(false);
RIA.visible(false);
Colonne.visible(false);
Poteau.visible(false);
PCF.visible(false);
Desenfumage.visible(false);
break;

i 've don't write all my method because it's to long...

is somebody could help me?

sorry for my english

Comments

  • kgauravkgaurav Member Posts: 32
    Hello

    What ever criteria is there at the parent form pass it as parameter to the child form and in the init of the child form you catch the earleir parameter and than use it accordingly. Before doing it plase check in debuger that in your current method you area ble to find the parameter value or not.

    This is the standard procedure and hope it will work for you also.

    Bye

    Kgaurav =;
  • RyuRyu Member Posts: 26
    hi,

    thank you kgaurav.
    I put this code to you while hope that that can help someone

    public void init()//in my children form
    { MSM_ServiceObjectTable ServiceObject;//ParentForm
    Args Args;

    ;

    super();
    // CUS-Modification on 08 Mar 2006 by ODRT - Begin
    ServiceObject = element.args().record();//check it
    switch ( ServiceObject.MachineTypeId)//pass my parameters
    {
    //display or not my form's children's tabPage
    case "EXT":
    Extincteur.visible(true);
    Bloc.visible(false);
    RIA.visible(false);
    Colonne.visible(false);
    Poteau.visible(false);
    PCF.visible(false);
    Desenfumage.visible(false);
    Online.visible(false);
    ARI.visible(false);
    Detection.visible(false);
    Extinction.visible(false);
    Alarme.visible(false);
    break;

    ...

    Bye
Sign In or Register to comment.