There is a form which is linked to the display menu item. I was checking the property of the menu item and see two properties have yes value, (1) neededRecord and (2) CopyCallerQuery. I discovered that when copyCallerQuery property is true, jumping to this form from other forms failed with this error :
Cannot apply initial query because no form root data source table matches the query root data source table..
On the other hand, in some situations this form is open by code in a helper class as bellow:
private void openMyForm(MyTable _myTable)
{
MenuFunction _menuFunction;
Args _args;
_args = new Args();
_args.record(_myTable);
_args.caller(this);
_menuFunction = new MenuFunction(menuItemDisplayStr(MyFormDisplayMenu),MenuItemType::Display);
_menuFunction.openMode(OpenMode::Edit);
_menuFunction.run(_args);
}
When I set copyCallerQuery to No the form is open with wrong record but when I set it yes form is open with correct record. So I want to know what is usage of the CopyCallerQuery property? Did I use it correctly?