Hi all,
Can someone please guide me on how to copy users settings (menusuite + windows login permission) from 1 user to another?
I have created as per below for copying of database logins. Thanks in advance.
DataItem - User Menu Level
User Menu Level - OnPreDataItem()
SETRANGE(ID, OldUserId);
IF Overwrite THEN BEGIN
NewUserMenuLevel.SETRANGE(ID, NewUserId);
NewUserMenuLevel.DELETEALL;
END;
User Menu Level - OnAfterGetRecord()
CALCFIELDS(Object);
NewUserMenuLevel := "User Menu Level";
NewUserMenuLevel.ID := NewUserId;
NewUserMenuLevel.INSERT;
Integer
Integer - OnAfterGetRecord()
MemberOf.SETRANGE(MemberOf."User ID",OldUserId);
IF MemberOf.FINDFIRST THEN BEGIN
l_Member.SETRANGE(l_Member."User ID",NewUserId);
IF l_Member.FINDFIRST THEN BEGIN
l_Member.DELETEALL;
END;
l_Member.RESET;
REPEAT
l_Member.INIT;
l_Member."User ID" := NewUserId;
l_Member."Role ID" := MemberOf."Role ID";
l_Member.Company := MemberOf.Company;
l_Member.INSERT(TRUE);
UNTIL MemberOf.NEXT = 0;
END;
0