locked
Content Type Permissions RRS feed

  • Question

  • Hello All,

    I have a document library having 2 views :- Manager View and Resource View

    Manger View has 4 columns :- col1,col2,col3,col4

    Resource View has 2 columns :-col1,col2

    and have 2 groups :- Manager Group and Resource Group

    By setting the target audiences Manager Group has to see only Manager View and Resource Group has to see only Resource View(Apart from Target Audience ,may be some other solution,I don't know).

    My question here is,  both of them(Manager and Resource Groups) are able to see/share the same new item form/edit item form having 4 columns.

    I want to restrict them like Resource should see new/edit form having 2 columns and for Manager having 4 columns.

    Any suggestions? 


    Like Cricket

    Thursday, November 8, 2012 3:46 AM

All replies

  • Hi,

    You can use jquery/javascript on newform/editform pages so you can hide fields based on user role. Please try below javascript:

    http://sharepointnadeem.blogspot.in/2011/09/hide-sharepoint-list-field-based-on.html

    Hope it could help


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Thursday, November 8, 2012 6:28 AM
    Moderator
  • Thanks Hemendra for the help.But the code is incomplete.Can we do it using client object model?

    Like Cricket

    Thursday, November 8, 2012 7:57 AM
  • Can you please provide full JS script.

    Thanks


    Like Cricket

    Thursday, November 8, 2012 10:36 AM
  • Here is link which has full JS with description:

    http://sharepointjavascript.wordpress.com/2012/05/07/showing-or-hiding-form-fields-based-on-membership-in-a-sharepoint-group/

    First link also has full script i don't understand why did you ask this question.

    Hope it could help


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Friday, November 9, 2012 7:36 AM
    Moderator
  • No I didnt resolve my problem.

    It is not working fine in my case

    Thanks


    Like Cricket

    Monday, November 19, 2012 11:26 AM
  • No I didnt resolve my problem.

    It is not working fine in my case

    Thanks


    Like Cricket


    Why it is not working? i have used same code with many sites and all work well. Can tell us your problem or if you have any issue with script then share your script with us.

    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Tuesday, November 20, 2012 4:59 AM
    Moderator
  • Hi Hemendra,

    Sorry for the delayed response. We are looking for a better solution,so it should be applicable forms,like new form,edit form and Display form etc.Apart from that we need to implement the same in datasheet view also.

    I thought its not possible by using JavaScript code.

    Thanks


    Like Cricket

    Thursday, November 29, 2012 12:27 PM