Tuesday, January 26, 2010

Both 'amount' and 'percentage' cannot be set

There was a bit of learning involved last week when I was trying to update the Contract Line entity programmatically. I had a custom entity under the Contract Line entity. I had written web service code which inturn called the CRM Service to update the Contract Line entity with values from the custom child entity.

In my custom web service I was summing up the values from the child records and updating the 'Amount' and 'Discount Percentage' fields of the related Contract Line record.

While I was testing, the system generated the platform trace which said -

Both 'amount' and 'percentage' cannot be set.

I am assuming, CRM wanted to convey that both 'Amount' and 'Discount Percentage' fields of Contract Line entity cannot be calculated and updated using the CRM Service Update method.

I really don't know why was the system designed this way? All I do know is that I have to look for another way out.

I would appreciate if someone can reason this behavior!!

Monday, January 18, 2010

The SELECT permission was denied on the object 'Build Version', database ', schema 'dbo'.

  • So you were trying to Restore CRM database on another machine?
  • You used the Deployment Manager to Import Organization?
  • You tried to load CRM using the browser but received something you didn't want to see
The SELECT permission was denied on the object 'Build Version', database ', schema 'dbo'.

No wonder you reached this blog post. Read on. This might help:

  • Open SQL Server Management Studio
  • Select the CRM Database you are working with
  • Right-click the BuildVersion table from the CRM Database and click Properties
  • Select Permissions tab on the left pane
  • Click on View Schema Permission on the right pane
  • Click on Add button
  • Click Browse
  • Select CRMReaderRole of type Database Role
  • Click OK twice (Back to Table Properties Window)
  • Check the intersection Select vs. Grant
  • Click OK

You should be good to go.