locked
You don't have sufficient privileges to open lookup dialog box : MSCRM 2011 RRS feed

  • Question

  • HI,

    I have written a Javascript for Lookup field on contact entity to enable or disable the field.
    Please find the below code for the same.

    var CRM_FORM_TYPE_CREATE = 1;
    var CRM_FORM_TYPE_UPDATE = 2;

    if (Xrm.Page.ui.getFormType() == CRM_FORM_TYPE_CREATE || Xrm.Page.ui.getFormType() == CRM_FORM_TYPE_UPDATE) {
        if ((CurrentUser.HasRole("Sales Manager")) || (CurrentUser.HasRole("System Administrator"))) {
            var TestUSer = Xrm.Page.ui.controls.get("new_testuserlist");
            TestUSer.setDisabled(false);
            TestUSer.setRequiredLevel("required");
                }
        else {
            TestUSer.setDisabled(true);
            TestUSer.setRequiredLevel("none");

        }

    }

    Above code is working fine in Adminstration role.

    But when I'm assigning the Sales Manager Role to User1 I'm unable to open the lookup value

    As I'm unable to open the lookup field with the  User1.

    "You don't have a sufficient privileges to open this lookup Dialog box.

    In lookup field form changes I enabled the Only Show records where check-box .
    Insdie that CreatedBy(Delegate)(Child Entity)
    CreatedBy(Delegate)(Parent Entity)

    Thanks,


    Thanks, Toushu

    Monday, November 18, 2013 12:11 PM

Answers

  • Check the user previleges on the look up entity. The Sales Manager might not have enough previleges to create, read, del, append on the entity and that's why it is not allowing the user to assign value to lookup.
    • Marked as answer by Rahul-22 Monday, November 18, 2013 12:38 PM
    Monday, November 18, 2013 12:18 PM

All replies

  • Check the user previleges on the look up entity. The Sales Manager might not have enough previleges to create, read, del, append on the entity and that's why it is not allowing the user to assign value to lookup.
    • Marked as answer by Rahul-22 Monday, November 18, 2013 12:38 PM
    Monday, November 18, 2013 12:18 PM
  • Sravani,

    Thanks a lot for your quick response, you are correct I'm missing the Sales Manager CRUD Privileges..
    Now its working fine...


    Thanks, Toushu

    Monday, November 18, 2013 12:40 PM