Forms passing based on record selection on table

hi all,

I have a table with 2 fields…Type Id and name…

example type & name id 1. plant 2. plant

  1. other

In another table I have Type Id,name,location.

when the form is opened…i click a record from 2nd table…it should navigate to another table called plant .

when the name is plant , it should go the plant form…when name is other it should go to the other form based…

how to do that…

when plant record is selected, it should go to plant form…if not, it should go to the other…

and this is urgent please…

Have a nice day…

In first place, do you have the forms that need to be opened for plant and other…

If so add a button to the main form and based on the selected records name call the relevant form.

Always tag your AX version.

Hi kranthi,

I have a button.On that button only it has select the form? I am getting an error ?

The operand for the function is element.

Thanks

parimal raj viswanathan

Have a nice day.

if(element.args().parmEnum(SelectType::Other))

{

args.name(formstr(electricalReadingOtherPlantForm));

}

if(element.args().parmEnum(SelectType::Plant))

{

args.name(formstr(electricalReadingPlantForm));

}

It shows error? its not navigating…

what if you are trying to create display menuitem for forms and use below code

Args args = new Args();

MenuFunction menuFunction;

;

menuFunction = new menuFunction(menuitemDisplayStr(myFormName),

MenuItemType::Display).run();

super();

is it giving error?

Hi Kunal,

Its giving the error ? The operand for the Function is not an element.

or Operand Types are incompatible with the Operator.

Here it is a button ? when you click the button …from the previous form…the matching records will point to move to either plant form / other form?

In the first table…we select based on the Type Identification and matching records also based on Type Identification.

Have a nice day.