Most project managers don't actually manage the members of their teams. Our position is one of influence management rather than positional authority. For many reasons this requires that we have excellent people skills, even more so than functional managers.
While trying to handle both project management and functional management is definitely in the 'overload' category, having the two split requires some extra juggling on everyone's par
How to Play Nicely
Establish a partnership with each of the managers you'll be working with so you're both comfortable being open about problems, issues, and potential risks. This will also establish a nice feedback loop so you can give your team members kudos when they do a good job. If there's a problem with anyone on the team that you aren't able to resolve, go to the functional manager FIRST before publishing any risks or slips. No one likes to hear about that kind of thing secondhand.
Working with brand new managers can be difficult. They're trying to learn the job, connect with their people, manage finances and workloads, etc. Many companies move high performers into management with no education - if you run into that situation, look for ways to help the manager along whenever it involves your team.
(I recently had a friend in just that position - new manager, no training or assistance. In response, I developed New Manager Survival Training™ - if you see a need, feel free to point the new panicky manager to my website.)
Who To Assign
We always want the best and the brightest for our teams. As good corporate citizens, though, it's really important to be clear about what exact level of expertise is needed to successfully complete the project and articulate those needs to management. If you really do need the most skilled experts in some areas, be sure to point out the risk to the project if that level of expertise isn't available.
If you really DON'T need the most skilled expert to successfully complete your project, document what you need and go for that. It's tempting to try to get the best and the brightest so your project shines, but in context you're doing the best for your organization if you get the right skills match for the job.
All of this makes it easier for the functional manager to balance resources and keep their employees happy.
Providing Information on Team Members' Performance
Functional managers need information on their employees' performance. They will of course gather information from a number of sources, but it will be helpful if you provide insight specifically on your project.
Once you've established a relationship with a manager, see what kind of information they need. (Of course, always feel free to let the manager know when someone on your team has done an outstanding job!) They may want statistics or information on specific areas that are difficult to get elsewhere. As always, try to resolve issues on your team within your team, but if someone presents a continuing problem, needs assistance (education, mentoring, etc.), or anything else that you can't resolve, be sure to talk it over with the manager. Always focus on demonstrated behavior, not 'attitude' or your assumptions about underlying causes.
Project Status and Risks
Of course, we report project status including risks regularly, far and wide. But managers with employees on your team have a special interest in the project, and it's important that they not be taken unaware.
Keep them on your distribution for status reports. Invite them as optional to team meetings (well, maybe not ALL team meetings, but occasionally). And if something is going south on the project, give them some warning. If your project is in trouble, any managers with employees on your team might possibly be called on to assist, authorize overtime, or provide additional resources, so giving them some time to react will only help the result.
Strong Partnerships
Strong partnerships between project managers and functional managers makes everyone's job easier. It takes a little extra work to get it going, but it is always well worth the effort.