Posts

Showing posts from August, 2008

"Current active key expired" Error

A client was getting an "Invalid Action" error when trying to open their Microsoft CRM 4.0 (on-premise) application. Checking the event log, showed the following: Event Type: ErrorEvent Source: MSCRMKeyGeneratorEvent Category: NoneEvent ... Description: Current active key (KeyType : CrmWRPCTokenKey) is expired. This can indicate that a key is not being regenerated properly. Starting the Microsoft CRM Asynchronous Processing Service on the server solved the problem! Kevin Dosseray

Bug Javascript Function parseInt

Not so long ago I encountered a problem with the parseInt JavaScript function. In some cases the parseInt returns an incorrect value. For example, parseInt("08") results in 0 instead of 8 and parseInt("09") also results in 0 instead of 9. Apparently the reason for this is because the zero in front is trying to tell the browser that this is an octal number, and "08" and "09" are not valid octal numbers. With parseFloat I didn't have the problem. So to "fix" the problem, I used the following: parseInt(parseFloat("string value")) Please note that this "bug" only happens when the value being checked is a string and the string starts with a leading zero. Kevin Dosseray

Get Current User in Reporting

If you want to use the current user id in custom reports for MS CRM 4.0 (for example to set a filter) , you can use the SQL function "organization name" _MSCRM.dbo. fn_finduserguid . This function will give you the guid of the current user which you can compare for example with the ownerid of a record. Kevin Dosseray

Merge Error 'No Attribute'

At a client we received an error 'No Attribute' while trying to merge 2 accounts. In the trace logs the error said: 'owninguser field not known in custom entity'. Apparently this was caused by the parental relationship between account and a custom entity. After changing the parental relationship to a referential (restrict delete), the merging worked fine. I did some searching on the internet and it seems that Microsoft is aware of the bug and working on a hotfix, but no release date is yet known. Kevin Dosseray