Wonder if anyone has an example they can share of using GetDataSetForTree in a Job form customization? I recently ran into the same issue referenced in the old post.
Hi Bruce, I have a question for you on a whole different issue. I made a post into your chain regarding recursive BOM structures in BAQ. I cannot get the revision subqueries to come out correctly. Would you be able to give me some pointers?
Thanks for the reply Jose.
The example doesn’t seem to like this line so far:
Error ‘MethodTree’ could not be found (missing a using,assembly ref?)
Will keep digging…
FYI… here is the existing code… (kind of working except only parses assembly 0)
try {
// Note that Epicor assigns a different GUID each time the form loads
Ice.Lib.Framework.JobLib.MethodTree mt = default(Ice.Lib.Framework.JobLib.MethodTree);
FieldInfo fi = default(FieldInfo);
Ice.Lib.Framework.JobLib.MethodTreePanel tvp = default(Ice.Lib.Framework.JobLib.MethodTreePanel);
fi = typeof(Erp.UI.App.JobTracker.JobTrackerForm).GetField(“jobTreeViewPanel”, BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Instance);
tvp = (Ice.Lib.Framework.JobLib.MethodTreePanel) fi.GetValue(JobTrackerForm);
mt = tvp.MethodTree;
// ExpandAll is only parsing assebmly zero… how do I call GetDataSetForTree first?
mt.ExpandAll();
}
catch (Exception ex)
{
MessageBox.Show("Expand Tree Error: " + ex.Message);
}
}