After almost 2 years of working with MS CRM (3.0 and 4.0), I thought it might help a few if I share my experience. So here I am with my first blog, it is a problem which we recently faced and after much analysis we were both pleased and surprised to know the resolution.
Here goes the problem. We are using Dynamics CRM 4.0 and We have a N:1 relationship from account to account (to cater to sub accounts kind of scenario) and there is some on change javascript associated with this. We also have a custom entity customer which is parent to account. Now when we tried to move a sub account from one customer to another customer's first level account, we were getting an error on page on saving and on debugging through the javascript we were getting an error in the Form.crm.htc file. The error was something like this:
is null or not an objectFor moving an account A from customer X (where it is a sub account of account D) to customer Y (where it will be the first level account) the steps we followed were delete the value in parent account lookup and set the parent customer lookup to Y from X.
Some users reported they were able to successfully change parent customer while some were facing the above problem. So we did a step by step analysis and found that the only difference was that those users who did not get an error were using the 'remove value' button inside the lookup while those getting the error were using delete key to null out the value.
Why this happens is something I am pursuing and will soon provide that update. Till then if you are facing this error you can try this as an resolution step.
Thats all for this post, will be back soon with more.