RE: how can i set two role centers for one user?
Ramesh,
Try create a new table with ID, User ID, and Profile ID and then use that to assign multiple profiles for one user.
Then in the codeunit LoginManagement (40) in the LoginStart function add the code to find all the profile ID of the user from the new table and then based on that create a text separated by comma with profile names so that you can use that text in the STRMENU function to display which provides the options for the user to select the profile once selected , you can modify the user personalization record.
I have not created a separate table but just tested in this way and it works. If i get time in next couple of days i will try to create a blog on this.
Selection := STRMENU(Text100,1); // i have not used the selection just to show you
UserPersonalization.SETRANGE("User ID",USERID);
IF UserPersonalization.FINDFIRST THEN BEGIN
IF Selection <> 0 THEN BEGIN
Profile.SETRANGE(Profile."Role Center ID",9001);
IF Profile.FINDFIRST THEN;
UserPersonalization."Profile ID" := Profile."Profile ID";
UserPersonalization.MODIFY;
COMMIT;
END;
END;