Showing posts with label Crm 4. Show all posts
Showing posts with label Crm 4. Show all posts

Monday, 30 January 2012

Correct use of "Execution Time"

The CRM workflow designer provides a property called "Execution Time" which can be used in dynamic expressions such as "if Account(CreatedOn) + 10 days < workflow(ExecutionTime)". The meaning of this property is neither the time at which the workflow is published nor the time the workflow instance starts. The actual value of this property is the real time when the workflow evaluates an expression that contains this property. Therefore, expressions such as "Wait until 1 day after workflow(ExecutionTime)" will never succeed and the workflow will wait and resume once a day forever causing performance problems. If you want your workflow to wait for a specific amount of time you should use the wait step and configure the condition as: workflow – timeout – equals – {Duation}. This will unload the workflow and resume execution after the specified time duration has passed.

Reference
http://blogs.msdn.com/b/crm/archive/2010/01/15/microsoft-dynamics-crm-workflow-authoring-best-practices.aspx

Tuesday, 17 January 2012

Crm 4 workflow update children records from a parent record

Reference: http://www.dynamicscrmtrickbag.com/2009/09/02/account-contact-update/

Synchronize Child and Parent Records – with Workflows
Sherry Hale, a long-time Trick Bag reader, recently emailed me the following question:

…can you make a workflow that when an account address is updated, the contacts that share that address are also updated? It seems simple, but I can’t seem to pull in contact entity information on an account related workflow, nor can I start a contact child workflow from an account workflow.

Unfortunately, I had to answer her that she was correct: it’s not as simple as it seems it would be! An automatic workflow written against the Account entity doesn’t know anything about child records (like contacts, as in this example). In this sense, workflows are similar to Dynamics CRM Advanced Find: child records know lots about parent records, but parents don’t know anything about children.

You certainly can do that with code, and as soon as I find a good example of that kind of code out there I’ll post an update with a link to it. [If you know of any good examples of that or have written code to that effect yourself, please let me know and I'll give you ample credit!]

Updating Child Records from a Parent … with an On Demand Workflow
But, notice I said above that you can’t do it with an automatic workflow on the parent entity (in this case, account, but this is a more general point and will work the same way for anywhere in CRM where you’ve got a 1:N relationship). If you can live with an “on demand” workflow written for the child entity, it’s actually quite straightforward.

Here’s how you do it:

Create a new workflow for Contact, call it something descriptive like “Update Contact from Parent Account”.
Uncheck the default “Record is created” checkbox in the “Options for Automatic…” section, and make it available to run on demand:


Pull down the Add Step menu and give it a single Update Record action, on Contact, as I show in the above figure, then click Set Properties, and use Dynamic Values in the Form Assistant to update the fields on the child record(remember, the workflow will be run against any selected contacts, in this example!) with any values you want from the parent record (you can see the “Parent Customer (Account)” entity selected in the “Related Entities” list below, and also reflected in the values I’m using to update the fields on the contact record:


Save and Close, publish, and you’re ready to go.

If the workflow is published as an On Demand workflow for Contact, you’ll see it on any contact grid, including the so-called “Contact Associated View” for accounts. In an example like the following figure shows, I’ve clicked the Run Workflow button on the toolbar (which you won’t see unless you’ve got one of the on demand workflows published for Contact), and I’m about ready to change 119 contact records with updated address information from their parent account record.

So, Sherry, it might not be automatic…but it’s a lot better than doing them one at a time.

One More Thing…
You might be thinking: big deal: I can do that with a bulk edit. (select all the contact records you want and select Edit from the More Actions menu, and any updates you make to the fields there will be applied to all selected records). While it’s true that sometimes this will work, there are two limitations (at least) to the bulk edit approach that will still work in the workflow approach:

Plenty of fields can’t be edited with a bulk edit (e.g., certain lookup fields, such as Parent Customer). Any field can be updated with the workflow approach I showed here.
Another advantage of the workflow update approach is that you can apply logic in a workflow. For example, suppose you only want to update certain of those child records with the parent record values, and other ones you didn’t. If there are criteria determining which ones get the update and which ones don’t, you can put that into a “Check Condition” in a workflow, whereas “bulk edit” really is a bulk edit, and gets applied to every record no matter what.
I wrote a book on Dynamics CRM workflows, by the way, and it contains tons of examples like this one and other useful workflows. You can purchase the book on Lulu.com or on Amazon, and if you do, you can also get a (free) subscription to the online version of the book, where you can download the workflows themselves, customizations, and related content.

Here’s a link you can visit to find out more about my book and purchase it:

Wednesday, 11 January 2012

What needs to be done to Crm 4.0 Client when users' AD password changed.

What needs to be done to Crm 4.0 Client when users' AD password changed.

User configuration to allow Microsoft Dynamics CRM e-mail router access to mailbox
I. Open the Microsoft Dynamics CRM Web client.
II. Click Tools from the menu, and then click Options.
III. Click the E-mail tab.
IV. Mark Allow E-mail Router to use my credentials to send and receive e-mail on my
behalf.
V. Enter the domain and username in the User name open text box.
VI. Enter the domain password in the Password open text box.
VII. Click OK.

Note: If Microsoft CRM user’s passwords are set to expire periodically in Active Directory, you
must complete these steps every time the password changes.

Tuesday, 10 January 2012

Monday, 19 December 2011

Crm Hidden Security Privileges

The Background
I recently had a client who couldn’t create BU even when she was give all rights on the “Business Unit” entity.


The Symptoms
When the user created a BU under the root BU, she will get a big error in face says “You do not have enough privileges to access the Microsoft Dynamics CRM object or perform the requested operation.”. In the Crm server trace log, I found the following error message:

Error: Exception has been thrown by the target of an invocation.
Error Number: 0x80048306
Error Message: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: e4b0437d-0c33-e011-aed8-00155d00cb35, OwningUser: 00000000-0000-0000-0000-000000000000 and CallingUser: 62eeaabf-2e49-e011-8b16-00155d00cb35
Error Details: SecLib::AccessCheckEx failed. Returned hr = -2147187962, ObjectID: e4b0437d-0c33-e011-aed8-00155d00cb35, OwningUser: 00000000-0000-0000-0000-000000000000 and CallingUser: 62eeaabf-2e49-e011-8b16-00155d00cb35

Investigation:
As the tracing log has no mention about the privilegeid, I decided to have a play with the security role just in case creating BU requires privilege of other entities. However after I added full privileges to every entity for that user, she still could not create a BU. While I was scratching my head, my colleague has mentioned hidden privileges to me.

The Solution:
The cause of the issue was the lack of crm hidden privileges. To enable a security role to allow its user to create BU, you need to give it some special security roles which is not available on the UI. The easiest way you can assign those privileges to a role is to copy from another role which already has those special privileges. So what I done was that I copied the system admin role to a new role called “BU Creator”, Then I removed every privilege I could from that role. So that the “BU creator” role essentially became a role which only contained special privileges. Then I added the role to the crm user I was using and it worked!

If you want to dig deeper into the crm hidden securities, here is a great blog post to read http://blogs.msdn.com/b/crm/archive/2009/08/04/viewing-all-crm-privileges-including-hidden-privileges.aspx.

Additional Reference:
http://support.microsoft.com/kb/957976/en-us

Sunday, 18 December 2011

A user can not create Business Units (BU)

To enable a security role to allow its user to create BU, you need to give it some special security roles which is not available on the UI. Only way you can assign those privileges to a role is to copy from another role which already has those special privileges. So what I done is that I copied the system admin role to a new role called “BU Creator”, Then I removed every privilege I can from that role. So that the “BU creator” role essentially becomes a role which only contained special privileges. Then I added the role to the crm user I was using and it worked. It worked on both dev and uat.

Viewing all crm privileges including hidden privileges
http://blogs.msdn.com/b/crm/archive/2009/08/04/viewing-all-crm-privileges-including-hidden-privileges.aspx

Wednesday, 14 December 2011

Using the CrmDiscoveryService Web Service: IFD

Access Discovery Service from a Crm 4.0 IFD deployment. However this url is not going to work for the plugin registry tool. Because this url will be redirected to the sign in page.
https://localhost/MSCRMServices/2007/SPLA/CrmDiscoveryService.asmx

Monday, 5 December 2011

Crm Performance

http://crmperftoolkit.codeplex.com/

http://blogs.msdn.com/b/benlec/archive/2009/01/20/deadlocks-performance-issues-mscrm-database-growth-asyncoperationbase-table-increase.aspx

http://blogs.msdn.com/b/crm/archive/2009/01/16/tips-for-faster-and-better-performance-on-microsoft-dynamics-crm-4-0.aspx

http://blog.dynatrace.com/2010/09/02/top-3-performance-problems-in-custom-microsoft-crm-applications/

Sunday, 20 November 2011

Crm 4 Email Tracking

When you track an email in Crm, it means an email activity record will be generated from an income email which matches the track criteria.

Once an email is tracked, you will be able to find it in your Crm activity list with Type = E-mail

To manually track an email, click on the "Track in CRM" button in the Crm integration ribbon section in Outlook.

To automatically track an email, you need to choose how much emails to be tracked/copied into crm.



The token (e.g. CRM:0002001) is there to allow Crm to set the "Regarding" field automatically.

Email tracking CRM 4.0 - Here's 4 Easy questions

Q1. What is the difference between the three options?
1. All Emails
2. Emails in Response to CRM emails
3. E-mail messages from CRM Leads, Contacts and Accounts

The first one is obvious. The second one states that any email that originated in CRM, if replied to, the reply will be tracked in CRM. The third one specifically tracks emails from CRM Leads, Contacts and Accounts (which is obvious too).

Q2. If I click on "Set Regarding" and link an email message from one of my customers - why does it not remember next time he sends me an email and automatically "Set Regarding" to his contact record

If you have enabled Smart Matching based email correlation (On by default in CRM 4 and configurable for CRM 2011 in System Settings), AND if the second email that you want to have regarding object set automatically is part of the original thread conversation, then the email will have the regarding object set automatically. If the second email is having a different subject or set of recipients, then the email will nto have the regarding set as CRM will find that to be a different conversation.

Q3. I get some email automatically linking (getting tracked) where it says "Regarding NONE" - does that mean it's not attached to a record? where do I find that email in CRM?

Email are automatically tracked if you have chosen one if the 3 options in Q1. The Regarding object is set as None since there is no history for that email (no previous email in the thread has a regarding object set). You will be able to see all emails in the Activities Grid.

Q4. How does it decide if it should track the email and where it should put it? (is it looking at the email address only or something else)
Answered in Q3.

Wednesday, 2 November 2011

Increasing the CRM 4.0 Attachment Size Limit

The default attachment file size limit in Microsoft Dynamic CRM 4.0 is 5 MB. There is good reason for this - as a general rule you should be placing some restrictions on the amount of file data that can enter CRM so that the database can maintain a reasonable size and so that performance is optimized. However, your business may find the need to increase this size a little in order to handle larger file attachments. Here are the instructions to increase the file size limit to 10 MB. You can go larger than this, but pay close attention to the table size and performance over time as you want to keep CRM running as well as possible. Note - even though the System Settings option looks like this it would apply to email attachments only, it does apply to "notes" type attachments as well. Finally, this procedure to change the max attachment size is not an officially published recommendation, so use this at your own risk. How to increase the max attachment size in CRM 4.0:


1. Open the application web.config (C:\Inetpub\CRM\web.config).


2. Locate the key within the element and change the values to the following:


3. Locate the key within the element of the

Wednesday, 19 October 2011

Crm 4 playground

User WMS Dev

Crm 4 Email configuration. Email router configuration

Email router is an interface between a email platform, e.g. Exchange, and the Crm.

E-mail Router can check directly on the user accounts/email boxes. However the down side of that is you will have save user name is password in Crm Personal Options. Once the password of a user changed in AD, the new password need to be updated in Crm too. If you have lots lots of user, it can become unmanageable.

Therefore the "Forward Mailbox" incoming delivery method is used to overcome the issue. "Forward Mailbox" is just another AD user/account/Exchange mail box.

Create the Forward Mailbox/User. Once you created an AD user, and exchange email box will be setup automatically. So User =[1 to 1 relationship]= User’s mail box

Setup forwarding rules using Rule Deployment Wizard.


Configure email router screen
Configuration Profiles: Define where the Exchange server is.
Deployment: Defines where the Crm server is.
Users, Queues, and Forward Mailboxes: Defines Forward Mailbox account/email account.

Just as a side note. "Set Personal Opitons | E-mail" AND "User | [E-mail Access Configuration] section go hand by hand.

Ref: http://video.mikelu.org/emailrouterfwd/emailrouterfwd.html

Monday, 10 October 2011

Outlook for Microsoft dynamics crm add-in will not install, Crm outlook client

One of the reasons can be some other Microsoft or Non-Microsoft add-ins is interfering with the install process.

To disable outlook add-in.

In outlook 2010, Outlook Options -> Add-Ins -> Click on "go" next to Manage COM Add-ins

In outlook 2007, Trust Center -> Click on "go" next to Manage COM Add-ins

Monday, 3 October 2011

Extract Plugins Crm utility

http://blogs.infinite-x.net/free-utilities/

Thursday, 29 September 2011

Cascade link type 'NoCascade' is invalid for Delete. while importing customizations

If rollups installing/uninstalling does not helps, try exucute this sql on your _mscrm database:

UPDATE [dbo].[RelationshipView] SET [CascadeDelete] = 2
WHERE [IsCustomRelationship] = 0 AND [CascadeDelete] = 0

Monday, 12 September 2011

Monday, 5 September 2011

Invalid Action error when trying to open Microsoft CRM 4.0; CrmWRPCTokenKey Expires

I was getting the Invalid Action error when trying to open Microsoft CRM 4.0.

CrmWRPCTokenKey
CrmKey(Id:f2325117-8ab9-e011-9379-00155d009105, ScaleGroupId:00000000-0000-0000-0000-000000000000, KeyType:CrmWRPCTokenKey, Expired:True, ValidOn:07/29/2011 02:25:58, ExpiresOn:08/31/2011 02:25:58, CreatedOn:07/29/2011 02:25:58, CreatedBy:NT AUTHORITY\NETWORK SERVICE
CrmKeySetting(Id:a24534e8-f95d-4885-9b90-91894176bba3, KeyType:CrmWRPCTokenKey, KeyLength:128, KeyGenerationInterval:720, KeyTimeToLive:792, CryptoTimeToLive:72, Algorithm:HMACSHA256, ArchiveLength:1, Enabled:True, ActiveKeys:[ScaleGroupId=00000000-0000-0000-0000-000000000000,ActiveKeyId=f2325117-8ab9-e011-9379-00155d009105])

Fix:
Starting the Microsoft CRM Asynchronous Processing Service.
If the Crm Asynchronous service can NOT be started, restart the server or all related servers.