Skip to content

Commit

Permalink
Fetching user settings should return the company specified in the use…
Browse files Browse the repository at this point in the history
…r personalization if specified (#2143)

Currently we are specifying that all users are in the current company,
however we should only fall back to this if the user personalization
does not specify otherwise.
This fixes an issue on users list where all users are shown to be in the
current company.

Fixes
[AB#537109](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/537109)
  • Loading branch information
AndreasMoth authored Oct 10, 2024
1 parent 2e48799 commit 4993531
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ codeunit 9175 "User Settings Impl."
UserSettingsRec."Locale ID" := UserPersonalization."Locale ID";
UserSettingsRec."Time Zone" := UserPersonalization."Time Zone";

if CompanyName() <> '' then
if (UserPersonalization.Company = '') and (CompanyName() <> '') then
UserSettingsRec.Company := CopyStr(CompanyName(), 1, 30)
else
UserSettingsRec.Company := UserPersonalization.Company;
Expand Down

0 comments on commit 4993531

Please sign in to comment.