문제

I have a SharePoint 2007 custom list with the column Manager.

When creating a new item I want the NewForm.aspx to autopulate the Manager field with the user's manager.

I know we can autopulate using JQuery to access Sharepoint's 'User Information List' exposed as a webservice, as per Marc's blog.

My problem is the Manager is not stored in the 'User Information List' so I can not retrieve it this way, anyone have any ideas?

도움이 되었습니까?

해결책

Thanks Mike, - using MOSS, though half my question was if there was a jquery helper to query this webservice ;)

I did this by writing a custom webpart that using the object model to get the user manager and department.

I then tweaked the URL of the custom list form by adding ?ToolPaneView=2 to the URL. This enabled the edit page. I then added my custom webpart and hid it. Then I added a custom editor webpart which I hid as well. \ I modified the custom list form in SP Designer to use labels instead of form fields then I used the custom editor webpart to write some jquery to copy the values from my custom webpart to the label text.

phew! all that just for some standard auto form filling... :S

다른 팁

Are you using WSS or MOSS? If you are using MOSS and have the manager field being populated from Active Directory then you can make a web service call to the UserProfileService and grab the user's profile, which will include that field.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top