question

adilahmed avatar image
0 Votes"
adilahmed asked EmilyDu-MSFT commented

Populte Department and related Employee Name from AD in SharePoint Custom List

I Created a custom list and it has below columns

Appointment Date and Time Department Employee

Her I want to Populate Departments from Company and when I select specific department related employees will populate in employee dropdown.

How can i achieve this any way do this by out of the box or i must write farm solution for this. I created User profile service application.

office-sharepoint-server-administrationoffice-sharepoint-server-developmentoffice-sharepoint-server-customization
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EmilyDu-MSFT avatar image
0 Votes"
EmilyDu-MSFT answered EmilyDu-MSFT commented

@adilahmed

Per my knowledge, there is no OOTB option to get Department and Employee Name from AD into columns of a list.

As a workaround, you could create another list to store Department and Employee Name. Then create a lookup column to get Department when you select specific Employee Name.


If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@adilahmed

I'm checking how the things are going on about this issue. Whether the answer helps you?

You can accept the answer if it helps.

0 Votes 0 ·

Hi Emily,
I will check the workaround but how can we do in normal way,
I created a User Profile Service application and Created a connection to Sync Users.
after that how can i do to Populate Users Departments in DeptDropdown and related Employees in EMP Dropdown.

0 Votes 0 ·

@adilahmed

There's no OOTB option to directly get Department and Employee Name from AD into columns of a list.

You could refer sadomovalex's answer to achieve this by using codes.

0 Votes 0 ·

@adilahmed

Is there any progress on this issue?

Please feel free to reply.

0 Votes 0 ·
sadomovalex avatar image
0 Votes"
sadomovalex answered

there is no OTB solution for that. As far as I understood you work with on-prem version. You already configured User Profile Service app which is good. Now you need to run sync and ensure that user profiles are populated from AD and have Department set. After that you will need custom timer job (or PowerShell script which will run periodically by schedule): it should go through all user profiles programmatically and synchronize changes to your custom list (if you will sync users to lists once - then changes in AD won't reflect in your lists). You may start e.g. with this example: Get all user profiles to list.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.