Posts

retrieve columns from LinkedEntities in Microsoft CRM 2011

Hi, You prepare QueryExpression and add some LinkedEntities then you want to retrieve fields from linked part.Just follow the sample;  QueryExpression query = new QueryExpression()                     {                                         ...                                         ...                     };                     FilterExpression filterTicket = new FilterExpression();                     ...                     query.Criteria = filterTicket;                     //all about ticket                     query.LinkEntities.Add(new LinkEntity("contact", "new_new_ticket_contact", "contactid", "contactid", JoinOperator.Inner));                     query.LinkEntities[0].EntityAlias = "contacttoticket"; add alias to reach the fields                     query.LinkEntities[0].Columns.AddColumn("new_ticketid"); add column names to the same level of LinkedEntity to obtain later...                

Complex Query in QueryExpression in Microsoft CRM 2011

Hi, Here is tables and relation,QueryExpression statement afterwards. contact 1--->N new_ticket N --> N new_tour QueryExpression query = new QueryExpression()                     {                         EntityName = "contact",                         ColumnSet = new ColumnSet(new string[] {                                                             "contactid",                                                             "firstname",                                                             "lastname",                                                             "birthdate",                                                             "fullname"                                                             }                                                   )                     }; Query Expression will execute the query against contact. For performance issue; do not retrieve any columns that we do

how to insert resource especially System User into Resource Group in Microsoft CRM 2011 SDK

Hi Again, First,we have to get deep technical information about Constraint definition file; here is the definition in XML format; <Constraints>   <Constraint>     <Expression>       <Body>         resource["Id"] == {ac8e6996-ef65-e211-bc9b-005056820011} ||         resource["Id"] == {4a65de5a-d763-e211-bc9b-005056820011} ||         resource["Id"] == {626E49EC-2011-E211-84B5-005056820011}       </Body>       <Parameters>         <Parameter name="resource"/>       </Parameters>     </Expression>   </Constraint> </Constraints> Body tag refers to any resources in the Resource Group. if you add primary key as guid for the record  to the constraint with 'or' logical word, you will see them in the selected resource group in CRM You can get inspiration from AddMembersToTheConstraint methods as shown bolew,Method takes  constraints string and id of mem

Create Resource Group in Microsoft CRM via SDK

Hi, if you create a resource in crm, use ConstraintBasedGroup class. here is a sample code ;     //get current Resource Group     List resourcegroupS = context.ConstraintBasedGroupSet.Where(rg => rg.Name == " ").ToList();     if (resourcegroupS.Count <= 0) //if exists     {                         //create resource group:                         resourcegroupDriver = new ConstraintBasedGroup                         {                             BusinessUnitId = new EntityReference(BusinessUnit.EntityLogicalName, businessunit.Id),                             Name = "Drivers : " + businessunit.Name,                             Constraints = builder.ToString(),                             GroupTypeCode = new OptionSetValue(ConstraintBasedGroupTypeCode.Static),                         };                         xxx.Id = _serviceProxy.Create(resourcegroupDriver);                     }     } if you need more information about 'context&

manage SQL express 2008 via SQL developer (oracle) tool

Hi, I downloaded SQL Server 2008 Express Edition from Microsoft Web Site.After installed SQL express, i figured out that i did not install tools such as Microsoft SQL Server Management Studio.I decided to connect via SQL Developer which comes from Oracle 11G client package instead MSSQL Management Studio. It is very easy.The first thing we have to be sure that Microsoft SQL Server JDBC Driver 3.0. exists in our system. ( http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a737000d-68d0-4531-b65d-da0f2a735707&displaylang=en )

search text in Stored Procedures

Do you want to find any text in Stored Procedures in SQL Server Database ? "select * from INFORMATION_SCHEMA.ROUTINES" returns Procedure,Function exist in specific database. You will see objects and details in columns.

create connections between two entities with Late Binding in Microsoft CRM 2011

Hi, I would like to share benefits of connections in Microsoft CRM 2011 and how to build connection in 2 Entities by LateBinding. Connected entities may be both Custom or System. here is how the SDK describes the benefits of Connections Connections  provide the following capabilities: An easy and flexible way to make a connection between two records of most Microsoft Dynamics CRM entity types. All customizable business and custom entities can be enabled for connections. An option to add useful information, such as description of the connection and the duration. An ability to create connection roles that describe the relationship between the two records, such as a relationship between a doctor and a patient, or a manager and an employee. A quick way to create multiple connections and roles for a particular record. For example, a contact may have many relationships with other contacts, accounts or contracts. In each relationship a contact may play a different role. Informa