Access the views of CRM through a local SQL user

From EN Ikoula wiki
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽


This article has been created by an automatic translation software. You can view the article source here.

fr:Accéder aux vues de CRM grâce à un utilisateur SQL local he:גישה אל הנופים של CRM באמצעות SQL משתמש מקומי ru:Доступ к представлениям CRM через локальный пользователь SQL ja:ローカルの SQL ユーザーを使用して CRM のビューへのアクセス ar:الحصول على آراء CRM عن طريق مستخدم SQL المحلي zh:对视图的 CRM 通过本地 SQL 用户访问 ro:Acces la punctele de vedere ale CRM prin intermediul unui utilizator local SQL pl:Dostęp do widoków CRM za pomocą lokalnego użytkownika SQL de:Zugriff auf die Ansichten von CRM durch einen lokalen SQL-Benutzer nl:Toegang tot de standpunten van CRM door middel van een lokale SQL-gebruiker it:Accesso alle visualizzazioni di CRM attraverso un utente SQL locale pt:Acesso aos pontos de vista de CRM através de um usuário local do SQL es:Acceso a los puntos de vista de CRM a través de un usuario local de SQL en:Access to the views of CRM through a local SQL user

Introduction

This article will inform you on how to access the views of CRM (FilteredNameView) by using a local account on the Server SQL.

Prerequisites

Need you to be able to access these views,:

  • A user Active Directory dedicated to CRM
  • A local on account SQL Server dedicated to this task
  • A Super Administrator account access to SQL Server

Problematic

CRM blocking the use of views if the user does not have the role of reading, so the local user does not work, as well as the Super Administrator account of the Server SQL. This is one Security intégrée à CRM. Il faut partie du domaine et être inséré dans CRM.

Procedure

Add a procedure to access the views.span class='notranslate'>SQL.

Here is the procedure:

SET ANSI_NULLS ON
GB
SET QUOTED_IDENTIFIER ON
GB
CREATE PROCEDURE AccessViewCRMLocal
ACE
BEGIN
    EXEC sp_addrolemember 'n' CRMReaderRole ', VOTRE_UTILISATEUR_LOCAL'
    DECLARE @UID uniqueidentifier
    SELECT @UID = SystemUserId FROM dbo. WHERE FullName SystemUserBase = 'LE_NOM_DU_COMPTE_CRM'
    SET CONTEXT_INFO @UID
END

To execute this procedure with the Super Administrator account so that it creates either on the Server SQL de CRM.

Example: Access the content of the views thanks to PHP

This example will allow you to access the accounts stored in CRM via the.span class='notranslate'>Framework Yii.

// It stores the connection to CRM through the Yii connection handler
$connexionCrm = Yii::app()->db_crm;

// We execute the procedure to access the views
$connexionCrm->createCommand("EXECUTE AccessViewCRMLocal")->execute();

// We get the accounts stored in CRM
$query = "SELECT accountid, nameaddress1_addresstypecodeaddress1_City, address1_line1, address1_line2, address1_line3 FROM FilteredAccount"
$accounts = $connexionCrm->createCommand($query)->queryAll();

Your accounts are now in the variable.span class='notranslate'>$accounts.

Conclusion

Thanks to this article, you can now access the views in CRM, and thus avoid duplication joins do basic.



This article seem useful to you ?

0



You are not allowed to post comments.