protected virtual bool EntityHasPath(OrganizationServiceContext context, Entity entity, string path) { var entityPath = OrganizationServiceContextExtensions.GetApplicationPath(context, entity); if (entityPath == null) { return(false); } return(string.Equals(path, entityPath.PartialPath)); }
protected virtual bool EntityHasPath(OrganizationServiceContext context, Entity entity, string path) { var entityPath = OrganizationServiceContextExtensions.GetApplicationPath(context, entity); if (entityPath == null) { return(false); } var resultPath = entityPath.PartialPath; var contextLanguageInfo = HttpContext.Current.GetContextLanguageInfo(); if (contextLanguageInfo.IsCrmMultiLanguageEnabled && ContextLanguageInfo.DisplayLanguageCodeInUrl) { resultPath = contextLanguageInfo.StripLanguageCodeFromAbsolutePath(entityPath.PartialPath); } return(string.Equals(path, resultPath)); }