Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

5 Answers 5

up vote 1 down vote accepted

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'
share|improve this answer
    
very clear path of solution djeeg,thanks a lot. –  cranfan Jan 13 '11 at 6:44

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.

share|improve this answer

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

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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