Hi I have a problem with a javascript condition in a workflow rule.
I want to limit the ability of closing a case to members of the case creator team only.
For that purpose I need to get the user_primarychannelid related to the "case_createdby" userID and compare it with the currentUser.user_userprimarychannelid.
Here is the code I've tried which I have decomposed step by step but it doesn't work.
Any help would be appreciated !
/*
var CreatedBy = eware.GetContextInfo("Case","case_createdby");
var Creator = eWare.FindRecord("Users","user_userid="+ CreatedBy);
var ChannelId = Creator.user_userprimarychannelid;
var CurrentChannelID = CurrentUser.user_userprimarychannelid;
if (CurrentChannelID == ChannelId)
{
Valid=true;
}
else
{
Valid=false;
}
*/
Thanks
Valérian