Options

How can I tell if a form is opened?

kaotikkaotik Member Posts: 14
edited 2004-02-16 in Dynamics AX
I have 2 forms, Form1 and Form2. Now here is the complex part: When Form1 is opened, it calls Form2. Data is passed by clicking a button on Form2 to Form1. That is, Form2 is called from Form1. What is if I have Form2 opened alone and I still want to pass data to Form1? How can I tell if the user calls Form2 from Form1 or just plainly calls Form2?

Confusing isn't it?

Comments

  • Options
    andraeandrae Member Posts: 2
    element.args().caller() gives you a handle to the calling form (or anything else). So if this value is NULL the form was opened directly.
    Sometimes the caller is not set automatically - in this case you have to do this by code.
    Have fun, Tobias
Sign In or Register to comment.