Showing posts with label Microsoft Dynamics. Show all posts
Showing posts with label Microsoft Dynamics. Show all posts

Thursday, July 19, 2012

Kick Your Business Up a Notch: All The Way To AWESOME!!

Learn how you can kick your business up a notch with Microsoft Dynamics.  This is a pretty cool little AD campaign by Microsoft that hopefully can be used to introduce Microsoft's "Dynamic Business" concept that I think could really help a lot of people.

Fun YouTube Video Promotion: http://www.youtube.com/watch?v=iO8HZLR8-G4

The Meat and Potatoes: http://www.microsoft.com/en-us/dynamics/dynamic-business.aspx

- Check it out!

Monday, March 7, 2011

Reflection on CRM 2011 CrmSvcUtil.exe Issues

I was trying to run the CRM web service proxy tool, CrmSvcUtil.exe, on a new computer today I was unfamiliar with and I had a couple exceptions I had to work through that I wanted to quickly highlight.

Exception 1. 
Exiting program with exception: Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The system cannot find the file specified.
Enable tracing and view the trace files for more information.

Resolution:
Install Windows Identity Foundation
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=eb9c345f-e830-40b8-a5fe-ae7a864c4d76&displaylang=en

Exception 2.
Exiting program with exception: An error occurred when verifying security for the message.
Enable tracing and view the trace files for more information.

Resolution:
This WCF error was resolved by verifying the clock on the server and dev machine were both properly set.  In this case the server was a new Windows Server machine that had just been stood up and the clock had never been set.  I changed the time settings and the problem was fixed.

Cheers, and Happy Monday!

Monday, October 13, 2008

Get User Roles from User ID Using C# in Microsoft CRM 4.0

It is fairly easy to use the web service to get the roles for a particular user based on their GUID.
This methodology is based on a post by Jim Wang at http://jianwang.blogspot.com/2008/01/crm-40-check-current-users-security.html in client-side jscript ; there isn’t much good information out on the web on how to do this in C#, and it is a bit more difficult than a normal retrievemultiple call considering it is a many-to-many relationship, so… here it is!

On a side note, congratulations Jim on getting awarded with the honor of CRM MVP.

public BusinessEntityCollection GetUserRoles(Guid guidUserID, ICrmService serv)
{
try
{
QueryExpression qe = new QueryExpression();
qe.EntityName = "role";
qe.ColumnSet = new AllColumns();

LinkEntity le = new LinkEntity();
le.LinkFromEntityName = "role";
le.LinkFromAttributeName = "roleid";
le.LinkToEntityName = "systemuserroles";
le.LinkToAttributeName = "roleid";

ConditionExpression ce = new ConditionExpression();
ce.AttributeName = "systemuserid";
ce.Operator = ConditionOperator.Equal;
ce.Values = new object[] { guidUserID };

LinkEntity le2 = new LinkEntity();
le2.LinkFromEntityName = "systemuserroles";
le2.LinkFromAttributeName = "systemuserid";
le2.LinkToEntityName = "systemuser";
le2.LinkToAttributeName = "systemuserid";

le2.LinkCriteria = new FilterExpression();
le2.LinkCriteria.Conditions.Add(ce);

le.LinkEntities.Add(le2);
qe.LinkEntities.Add(le);

RetrieveMultipleRequest rmRequest = new RetrieveMultipleRequest();
rmRequest.ReturnDynamicEntities = true;
rmRequest.Query = qe;

RetrieveMultipleResponse response = (RetrieveMultipleResponse)serv.Execute(rmRequest);

if (response.BusinessEntityCollection.BusinessEntities.Count > 0)
{
return response.BusinessEntityCollection;
}
else
{
return null;
}
}
catch (Exception ex)
{

WriteToFile("error: " + ex.ToString());

return null;

}
}

This post is provided as-is and implies no warranty; Jamie Miley does not assume any responsibility for problems arising from the use of this information.

Saturday, September 27, 2008

Map Custom Attributes from Opportunity Product to Quote Product to Order Product and so on in Microsoft CRM 4.0

It is possible to map custom attributes from opportunity product to quote product to order product to invoice product within CRM.  The best part about this workaround is that according to a recent Microsoft support case I opened, this is a supported workaround.

I will demonstrate this by going from quotedetail (quote product) to salesorderdetail (order product):
In SQL Server Management Studio.  Run the following query:
Select * from entitymapbase where targetentityname = 'salesorderdetail'
This query should return three items, we care about the row with a SourceEntityName column value of "quotedetail".

Now copy the GUID value of the EntityMapId column for that row.

Then I use this URL, and at the end of it I paste the GUID that I just copied:
http://yourservernamehere/yourorgname/Tools/SystemCustomization/Relationships/Mappings/mappingList.aspx?mappingId=

This gives me the secret hidden mappings that I was after, between "Quote Product" and "Order Product".  It is just another normal CRM GUI relationship mappings form.

This post is provided as-is and implies no warranty, Jamie Miley does not assume any responsibility for problems arising from the use of this information.