Showing posts with label MS CRM. Show all posts
Showing posts with label MS CRM. Show all posts

Integrate SQL Server Reports with MS CRM

To integrate SQL Server Reports with MS CRM, select "Reports" under MS CRM "Workplace" as shown below.















Then click on "New" to add a new report as shown in below figure.















After that click on "Browse" button which is shown in below figure, and select the report to be added. Enter the details of the report like Name, Description,etc.
















Finally click the Save button to save the report. After that the added report is displayed under Reports in MS CRM Workplace.

Retrieving a value from MSCRM and and Assign it to another Variable

We can retrieve data from MS CRM, like we retrieve data from a database. For that as in the below code, we have to first specify the attributes which we want to consider while retrieving by using ColumnSet class.

Then we can specify the conditions to be consider using the ConditionExpression class.
Also we can specify a condition operator like in SQL queries by using that class.

Then we can filter the given condition using FilterExpression class. After that we can create a query to retrieve data using QueryExpression class. By using that query we can retrieve the data as shown in below code.


ColumnSet cols = new ColumnSet();
cols.Attributes = new string[] { "name", "accountnumber" }; //name and accountnumber are two attributes.

ConditionExpression condition = new ConditionExpression();
condition.AttributeName = "accountnumber"; // Get values corresponding to accountnumber value
condition.Operator = ConditionOperator.Equal;
condition.Values = new string[] { str1[0].Trim() };

FilterExpression filter = new FilterExpression();
filter.FilterOperator = LogicalOperator.And;
filter.Conditions = new ConditionExpression[] { condition };

QueryExpression query = new QueryExpression();
query.EntityName = EntityName.account.ToString();
query.ColumnSet = cols;
query.Criteria = filter;

// Create the Web service request object.
RetrieveMultipleRequest retrieve = new RetrieveMultipleRequest();
retrieve.Query = query;

// Execute the Web service request.
RetrieveMultipleResponse retrieved =
(RetrieveMultipleResponse)service.Execute(retrieve);

BusinessEntityCollection entities = retrieved.BusinessEntityCollection;
account ac = entities.BusinessEntities[0] as account;

string nameinCrm=ac.name;

Hope this will be helpful for you!!!

MS CRM

CRM (Customer Relationship Management) is a business strategy focus on maximizing shareholder value through winning, growing and keeping the right customers.

To download MS CRM SDK, use below link
http://www.microsoft.com/downloads/details.aspx?FamilyID=9c178b68-3a06-4898-bc83-bd14b74308c5&displaylang=en

Good Luck!

tablename_WriteToDataDestination: Mashup Exception Data Source Error Couldn't refresh the entity...

 Once a Dataflow is created and published on Fabric, got the below error while refreshing the Dataflow. tablename_ WriteToDataDestination: M...