If a query contains DynaLink then calling Query.pack(true) will throw the error: Attempting to pack a query that contains one or more dynamic links.
If a query contains DynaLink then calling Query.pack(false) will succeed and DynaLink will not be stored in the package - it will not appear on a new query created from the package.
Does anybody have more information on this parameter?
Example:
public static void testQueryPack()
{
InventItemGroup itemGroup;
Query q1 = new Query();
Query q2;
QueryBuildDataSource qbds;
qbds = q1.addDataSource(tablenum(InventTable));
qbds.addDynalink(fieldnum(InventTable, ItemGroupId), itemGroup, fieldnum(InventItemGroup, ItemGroupId));
info(qbds.toString());
q2 = new Query(q1.pack(false));
qbds = q2.dataSourceTable(tablenum(InventTable));
info(qbds.toString());
}
Result:

Like
Report
*This post is locked for comments