To associte records in Microsoft Dynamics CRM use IOrganizationService.Associate(entityName, Guid, Relationship, EntityReferenceCollection) method.
Entity logical name
The ID of the record to which the related records are associated.
The name of the relationship to be used to create the link.
A collection of entity references (references to records) to be associated..
This method is implemented by OrganizationService class and OrganizationServiceContext generated in previous chapter.
Using Early Bound
Following example demonstarates how to associate a contact with three accounts in Microsoft Dynamics CRM using early bound
// Associate the accounts to the contact record.
// Create a collection of the entities that will be
// associated to the contact.
EntityReferenceCollection relatedEntities = new EntityReferenceCollection();
relatedEntities.Add(new EntityReference(Account.EntityLogicalName, _account1Id));
relatedEntities.Add(new EntityReference(Account.EntityLogicalName, _account2Id));
relatedEntities.Add(new EntityReference(Account.EntityLogicalName, _account3Id));
// Create an object that defines the relationship between the contact and account.
Relationship relationship = new Relationship("account_primary_contact");
//Associate the contact with the 3 accounts.
_service.Associate(Contact.EntityLogicalName, _contactId, relationship,
Console.WriteLine("The entities have been associated.");
//Disassociate the records.
_service.Disassociate(Contact.EntityLogicalName, _contactId, relationship,
When an opportunity is either won or lost, a special type of activity is generated called a Resolution Activity.
Users can open these activities and see information regarding
when the activity took place,
the actual sales value,
why they might have lost an opportunity,
or the competitor to whom it was lost.
CRM 2011 Excel Export & Import
This video shows a new feature in CRM 2011 that allows you to export data from CRM, edit it, and import it back into CRM. This is a great way to make changes to a lot of records at one time. It's also a great way to mess up a lot of records at one time, so take care.
Microsoft Dynamics CRM: Manually Entering a Lead
Invoice Management : Fields on the Invoice Form contd.
Shipping Method: Shipping method for deliveries sent to this address.
Payment Terms: Payment terms to indicate when the customer needs to pay the total amount.
Opportunity: The opportunity that the invoice is related to for reporting and analytics.
Order: The order related to the invoice to make sure the order is fulfilled and invoiced correctly.
Customer: The customer account or contact. This provides a quick link to additional customer details, such as account information, activities, and opportunities.
Creating Role Based Forms - Microsoft Dynamcis CRM 2011
This video provides an overview of how to create a unique and tailored user experience for each type of user that is logging into CRM by creating a separate form for each Record Type in CRM (like Accounts, Contacts, Opportunities etc.)
Product Catalog : Creating the Product Catalog - Sequence
The following sequence is used by many organizations to configure, maintain and use the product catalog:
Set up unit groups: Unit groups contain the units used to sell the products and services by and at what price.
Set up products: Create the product and enter core pricing information.
Set up price lists: Create the price list and the price list items to specify the sales price of each packaged version of the product.
Use in sales and marketing processes:
Discount Lists : are an optional component of the product catalog that can be used to create volume discounts based on the amount of product purchased.
Activity Feeds Overview
Quick overview of activity feeds and social network capabilities within Microsoft Dynamics CRM 2011
Processes/Workflow Ownership Mystery in Microsoft Dynamics CRM
Under what user’s context does the workflow execute? (If the workflow creates a record, who will be the owner of that new record?)
It depends. Automatically triggered workflows (such as a workflow that triggers on account create) will execute in the context of the owner of the workflow. Therefore, if you have a send email step, the email will be by default sent from the e-mail account of the workflow owner. This is important to consider because the workflow owner might belong to a different business unit and have different privileges than the user who triggered the workflow (e.g. who created the account). Let’s say your workflow creates a task each time an account is created. Depending on the privileges of the user, the task might be in another business unit and not visible to the user, therefore you should consider adding an “assign step” that assigns the new task to the owner of the account. Now, if the workflow is executed on-demand, the workflow will then execute in the context of the user who requests the workflow execution. Because dialogs are always on-demand then they always execute in the context of the user who started the dialog.
Why does the process execute under different users depending on how it was started?
This was a design decision based on security considerations. You don’t want to inadvertently be sending emails and executing actions without knowing it because some other user decided it. Therefore, by having this different behavior we can guarantee that the user under which the workflow executes is always aware that a workflow is performing some actions on his behalf. For the automatic workflow case, the owner of the workflow is also the person who activates it and who selects the trigger mechanism and the workflow steps so it is OK if the workflow executes under that user’s context. For the on-demand case, a user is specifically requesting some actions to be performed on his behalf by a workflow so the user is fully aware of the workflow definition and that it will execute; therefore it is safe to execute the workflow under that user’s context instead of the workflow owner (who might not be aware that a user requests an on-demand execution).
Why can’t I activate/deactivate someone else’s workflow, even if I am the system administrator?
For the same security reason as explained above. You want the workflow owner to explicitly acknowledge that a workflow will be activated and will perform some actions on his behalf. You would not want to allow another user (even the system administrator) to decide that some process should be executed on another user’s behalf. If you want to activate/deactivate someone else’s process you must first assign it to yourself.
If I assign an activated process to another user, why does the user have to re-activate it?
Active processes cannot be modified so the system automatically deactivates them before assigning it to the new user. As per Q3 above, only the new owner will be able to re-activate the process.
I am importing a solution that contains processes and it fails with this error message “The workflow cannot be published or unpublished by someone who is not its owner”. What is wrong?
If your solution contains a process that already exists in the organization and is activated then solution import will attempt to update it. In order to do so, it must first deactivate it. However, if the owner of the activated process is not the same as the user who is importing the solution, then deactivating the process will fail (see Q3). Therefore you have a few options to fix this problem:
Import the solution using the user who owns the activated process. This can be tricky, especially if there are multiple processes owned by different users which need to be updated by the solution import.
Verify which processes are included in the solution, and then find them in the organization, if you can find them and they are not owned by you then you must assign them to yourself. You can reassign them to the original user after you import the solution; however, you will have to ask the process owners to activate it themselves.
Dynamics CRM 2011 - Connected Cloud Demo.wmv
In this demonstration of a real estate scenario, you'll see how Microsoft Online Services, including Microsoft Dynamics® CRM Online, Microsoft® Office 365, and Windows Azure,® provide a connected experience that leverages the power of the cloud.
arketing Calendar in Microsoft Dynamics Marketing
Take a look at this new video to see how the Marketing Calendar in Microsoft Dynamics Marketing provides an intuitive interface by showing campaign activities in a timeline view. It helps marketing managers get an overview of all present, past, and future campaign activities - and provides a visual comparision to similar campaigns.