Now Available in Community - New TechTalk Videos for 2020
2020 release wave 1 Discover the latest updates and new features to Dynamics 365 planned through September 2020
Release overview guides and videos Release Plan | Preview 2020 Release Wave 1 Timeline
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants. | Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements | ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance TechTalks | Customer Engagement TechTalks | Upcoming TechTalks
In system administrator, when assigned role is removed for the current user, the removed role name should be shown in info(i.e this role is removed)
so that what should i do?
Riyas ahamed F
You can try to use EeUserRoleChangeLog .
Please read this thread:
thanks for quickly replay blue wang,
i read those blogs but, i am not understand but, i need it once i'll removed sysadmin and current user role name should be shown in info how i get in X++.
[FormDataSourceEventHandler(formDataSourceStr(SysSecRolesEditUsers, userInfo), FormDataSourceEventType::ValidatingDelete)]
public static void userInfo_OnValidatingDelete(FormDataSource sender, FormDataSourceEventArgs e)
FormRun fr = sender.formRun();
FormDataSource SecurityUserRole_ds = fr.dataSource('SecurityUserRole');
SecurityUserRole securityUserRole = SecurityUserRole_ds.cursor();
while select userInfo
where securityUserRole.User == userInfo.Id
&& userInfo.id == curUserId()
where Roles.RecId == securityUserRole.SecurityRole
info(strFmt("secuity role : %1",userInfo.name));
HI, blue wang
once i removed "STAN" security role i need it shows STAN roles remove in the "info".
You can use COC to add your logic to class SysSecRole->public void removeFromSelectedUser() to achieve your goal.
here is the example code
final class SysSecRole_Extension
public void removeFromSelectedUser()
Info(strFmt("%1 is removed", this.name));
Business Applications communities