Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

How to show the Respective Group Name in a Tab Page for the Selected Users

$
0
0

Hi All , 

I have A Tab under which there are two tab pages (1) User Groups & (2) Users

(1) User Groups  -  It Contains all the Groups available in the System.

(2) Users  -  It Contains all the Users

Image [1]:

Image [2]:

In Image[2]  using two buttons which I have Highlighted in RED THICK LINE "[>]" , " [<] "  , we add or remove users for the selected "UserGroup" as displayed in Image(1) .

NOTE  :    "  MY REQUIREMENT".

NOW MY REQUIREMENT IS VICE VERSA OF THE ABOVE MENTIONED SCENARIO.  i.e, WHEN I SELECT FEW USERS ONLY THE RESPECTIVE GROUP  SHOULD BE DISPLAYED IN THE ANOTHER TAB PAGE .

[ CLASS DECLARATION : ]

class FormRun extends ObjectRun
{
SysListPanelRelationTableCallback sysListPanel;
str 10 userGroupId;
container conUsers;
}

-------------------------------------------------------------------------------------------------------------

[ close()  :  ]

public void close()
{
sysListPanel.finalize();
super();
SysSecurity::reload(false);
}

------------------------------------------------------------------------------------------------------------------

[ int() : ]

void init()
{
#ResAppl

sysListPanel = SysListPanelRelationTableCallback::newForm(element,
element.controlId(formControlStr(SysUserGroupInfo, Users)),
"@SYS25440", "@SYS57282", #ImageUser,
tablenum(UserGroupList),
fieldnum(UserGroupList, UserId),
fieldnum(UserGroupList, GroupId),
tablenum(UserInfo),
fieldnum(UserInfo, Id),
[fieldnum(UserInfo, Id), fieldnum(UserInfo, Name)],
0, '',
identifierstr(Validate), '', '');

super();

sysListPanel.init();


}

-------------------------------------------------------------------------------------------------------------------

[ tabCganged() ] : 

void tabChanged(int fromTab, int toTab)
{
#define.TabUserGroups(1)
#define.TabUsers(2)

userGroupId = userGroupInfo.Id;
switch (toTab)
{
case #TabUserGroups:
break;
case #TabUsers:
sysListPanel.parmRelationRangeValue(userGroupInfo.Id);
sysListPanel.parmRelationRangeRecId(userGroupInfo.RecId);
sysListPanel.fill();
break;
}
}

------------------------------------------------------------------------------------------------------------------

[ validate() ] :

boolean validate(userId _userId, AddRemove _addRemove, SysListPanelRelationTable _listViewHandler)
{
return true;
}

------------------------------------------------------------------------------------------------------------------

[ Override Method Of Tab -  tabChanged()   ] : 

void tabChanged(int fromTab, int toTab)
{
element.tabChanged(fromTab, toTab);
super(fromTab, toTab);
}

------------------------------------------------------------------------------------------------------------------------

[ allowPageDeactivate()  ] : 

public boolean allowPageDeactivate()
{
boolean ret;

ret = super();

if (!userGroupInfo.RecId)
{
if (userGroupInfo_ds.validateWrite())
userGroupInfo_ds.write();
else
return false;
}

return ret;
}

-----------------------------------------------------------------------------------------------------------

Please Let Me know How Could I achieve my requirement and where should I have to change Code .

I have mentioned every thing please let me know

Regards ,

Nishath Salman N.


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>