Hi Guys,
If someone had an error like this one while testing a scenario on his CRM 2011 organization:
Unhandled Exception: System.ServiceModel.FaultException
PluginName : SecLib::AccessCheckEx failed.
Returned hr = -2147187962,
ObjectID: 8f3a3333-09e3-e211-b4c7-0050568c06b4,
OwnerId: a9acc15c-95d2-e211-b3ed-0050568c06b4,
OwnerIdType: 8
and CallingUser: 576bd94b-27e3-e211-9980-0050568c06b4.
ObjectTypeCode: 10008,
objectBusinessUnitId: 6fad00e6-71d2-e211-b3ed-0050568c06b4, AccessRights: WriteAccess
Don't worry, it's a right problem. But to resolve it, you need to have a database access to the CRM Sql Server.
You need to verify these points :
- If you don't know who is the CallingUser with the id : 576bd94b-27e3-e211-9980-0050568c06b4 you need to make a search on SystemUser table.
USE [ORGANIZATION_MSCRM]
GO
SELECT * FROM SystemUserBase WHERE SystemUserId = '56C9CC2B-E2C4-4012-B946-34024CBBA15A'
- After that, you need to enumerate the user's roles.
- Then, You need to detect the entity that generate the problem. To do this, you need to use the Object Type Code information : ObjectTypeCode: 10008
USE [ORGANIZATION_MSCRM]
GO
SELECT * fROM EntityView WHERE ObjectTypeCode = 10008
Execute this query to get entity name,
- Finnally, use this information : AccessRights: WriteAccess to verify in all user's roles if this entity had write privilege
You will find that any role has this privilege on this entity.
So, add this privilege to the role that you want and retry your scenario. You will see that it works.
have a nice day.
N.JL
Monday, July 8, 2013
Thursday, June 27, 2013
How to use Fiddler to debug CRM 2011 Javascript and HTML Webresources
Hi Guys,
In order to properly develop JavaScript and/or Html webresources,
a CRM 2011 developer needs to make many publications on CRM development server,
sometimes, with many errors. And when a team works on the same server, especially
on the same entity, that can make the work troublesome and make any back slowly
during these publications.
Using Fiddler 2 locally as an auto-responder is the solution.
As a web debugging proxy, Fiddler will intercept any session
(web call) outgoing form your local machine. And it can redirect some session
to call instead of letting it out to web server. This is the role of the Auto-Responder.
And now, follow these steps:
- Launch Fiddler 2
- Make a Filter to show only sessions going to CRM Server like this:
- Open IE and go to “ Inernet Option”, and delete “Temporary Internet Files and Website Files” like this :
- Back to Fiddler and click to Autoresponder tab.
- Ckeck this two options
- In Web Sessions List, Select Session line corresponding to your javascript/Html webresource that you want to work on then, drag and drop it in " If URI Matchs..." list.
- That add a line in this list. This line starts With the keyword : "EXACT". The same line is added in the first combbox of the "Rule Editor", and a in the second combobox this string "*200-SESSION_211" is added.
- You need to replace EXACT keyword by REGEX keyword In the first combobox, then replace the entire URL string up before the name of the WebResources by "*/" and finally you need to add ".*" in the end of string like this :
- After that, in the second combobox, put the local file path of your webresource like this:
- Finally click to Save.
EXACT:http://ServerName/OrgName/WebResources/new__common.utilities.js
become
REGEX:.*/new_common.utilities.js.*
Repeat this operation for all your webresources that you want to work on. and not forget to empty Temporary IE Files everytime you want to put a new webresource.
Have a nice Day.
I hope that this post helps you.
N.JL
Labels:
CRM 2011,
debug,
Fiddler,
HTML,
Javascript,
Webresource
Subscribe to:
Posts (Atom)