1

I am newbie in SharePoint 2010. Here is what I'm trying to do...

  • I have portal users (active directory integrated).
  • A user from x department will fill an employee request form which includes 4-5 textboxes and possibly a combobox.
  • After he/she fills the form the related department's manager approves or rejects it. That's all.
  • I have a SQL table which includes the user's department, email and department manager info so that I can map user from AD account name. User's manager is not found on AD in our structure.

So how can I achieve this? Thanks for any help.

5 Answers 5

1

First thing you need to do is create an external content type that maps over your SQL table. The table needs to have the userid and the managerid as one row. So if the raw tables dont have that info, you should create a SQL view that does the join.

  1. Open your site in sharepoint designer
  2. Select external content type from the side navigation
  3. Select new external content type from the ribbon
  4. Follow the screens

Then you need to get that info into your user profiles

  1. Go to central admin
  2. Go to your user profile service application
  3. Select Configure Synchronization Connections
  4. Select Create new connection
  5. From the type, select Business Data Connectivity
  6. Choose the external content type from part 1
  7. Its going to be a 1:1 mapping with the userid as the mapping property

Then you need to map the manager field from the external content type to the user profile manager property

  1. Go back to user profile service application
  2. Go to Manage User Properties
  3. Find the manager field
  4. Scroll to the bottom and add a new mapping, using the connection and external content type from part 1 and 2
  5. Do a full profile sync

Now you need to define your workflow

  1. Open your list in sharepoint designer
  2. Create an approval workflow
  3. Define a workflow property 'manager', that looks up the profile field 'manager' of the target user
  4. Define a approval workflow, that has a participant of the workflow property 'manager'
0
0

If the information is available in SQL you can expose it as an External List and I believe you can link your request list to that so you can grab the manager from there. If you want to do organization based workflows though I would encourage you to get the approval structure into AD.

0

For creating the External List, see here: http://msdn.microsoft.com/en-us/library/ee231515.aspx

0

I had a similar problem to this where the user hierarchy was not stored in AD, it was in the ERP system. Because we run rosters where a single user may have 2 managers this was not suitable to even replicate into AD.

The approach I took with this was to expose a web service on the ERP to return both managers details.

0

If the manager exist in AD but not in sharepoint you can add the manager using SPWeb.EnsureUser(manager_AD_Code) and then you can asssing a new task to him/her.

If the manager not exist in AD hi/she will not login the portal and so he/she cannot reach the pages. In this scenario use a different web application and you can send an email to manager for redirect to this web application and the manager approve/reject the request then at code behind you can manage workflow in sharepoint using OM or web service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.