I have a custom list and when the user open the list item Display form there is a custom ribbon. This ribbon should be enabled if the current user is a member of a particular Group. Here is the caml query i used
var id = JSRequest.QueryString["ID"];
if (contextKey == "ApproveRequest") {
var condition = '<View>' +
'<Query>' +
'<Where>' +
'<And>' +
'<Eq>' +
'<FieldRef Name=\"ID\"></FieldRef>' +
'<Value Type=\"Integer\">' + id + '</Value>' +
'</Eq>' +
'<Or>' +
'<Membership Type="SPGroup" ID="447">' +
'<FieldRef Name=\"Author\"/>' +
'</Membership>' +
'<Eq>' +
'<FieldRef Name= \"Author\"/>' +
'<Value Type="Integer"><UserID Type="Integer"/></Value>' +
'</Eq>' +
'</Or>' +
'</And>' +
'</Where>' +
'</Query>' +
'</View>';
}
but the above Code is not working.