Hai to all,
I Created aTable and Table fields throw X++.
Now i want to add some of that fields into Field Group.
could u plz tell me the code for that
Thanks & Regards
Hai to all,
I Created aTable and Table fields throw X++.
Now i want to add some of that fields into Field Group.
could u plz tell me the code for that
Thanks & Regards
Anyone having the idea plz ssuggest me
Thanks & Regards
hi Naresh,
you can add the fields to a field group through code as follows:
static void JobAddFieldsToFieldGroup(Args _args)
{
TreeNode treenodefieldgroup,tablenodeautoreport, tablenodeanyfield ;
TreeNode tablenode = TreeNode::findNode(#TablesPath).AOTfindChild(“Demo_table”);
;
//Get the fields group node under the table node
treenodefieldgroup = tablenode.AOTfindChild(“Field Groups”);
//Here i am adding a field test to AutoReport field group
tablenodeautoreport = treenodefieldgroup .AOTfindChild(“AutoReport”);
//Check if that field is already present in that field group
tablenodeanyfield = tablenodeautoreport .AOTfindChild(“Test”);
//add if it is not added
if(!tablenodeanyfield )
{
tablenodeautoreport .AOTadd(“Test”);
}
}
Hi naresh can you explain me how to create the table and fields throuhh code?
please send me the code.
Regards,
Saju.K
Hai saju,
u can get the code for creating Table & Fields in the following link
http://dynamicsuser.net/forums/t/37822.aspx
Thanks & Regards
[Y]Thank u prathap reddy it’s working
Thanks & Regards