Entity – BDS experts
Count total number of records – how to??

Count total number of records – how to??

Count total number of records – what is the issue How simple can that be to count total number of records – just use linq query using EntitySet object like the one below var contactCounter = new ServiceContext(_service).ContactSet.Select(item => item).Count(); and that’s it. But no – you will get an exception: Invalid ‘count’ condition. An entity member is […]

Save and publish one click

Save and publish one click

Save and publish one click – what is it for If you are customizing loads of entities forms here is a solution that can speed it up a bit – save and publish one click. When I customize form, the most often repeated operations are: save publish close customization form reload entity record form Solution […]

Entity name by object type code JavaScript

Entity name by object type code JavaScript

Entity name by object type code – what is the issue Recently I found myself in a situation where there was no Xrm.Page.data.entity object so getEnityName() could not be used. Yes, there are form where it’s not available 🙂 I thought, phi, piece of cake. I remembered that there is FormEditorWebService.asmx which has a GetEnityId() so […]

Crm 2011 Import Failed: Root Component Insertion is unprocessed

Crm 2011 Import Failed: Root Component Insertion is unprocessed

After making some unsupported SQL modyfications I got exception during importing solution. Answer; First of all enable tracing, it has almost all info about exceptions, which says: Crm Exception: Message: No RowGuid attribute defined for shareable/publishable entity ProductPriceLevel, ErrorCode: -2147220970, InnerException: Microsoft.Crm.CrmException: No RowGuid attribute defined for shareable/publishable entity ProductPriceLevel.   After undoing SQL changes […]

Field flag getIsDirty() == false, why ?

Field flag getIsDirty() == false, why ?

Recently, I’ve came accross situation, that despite the fact that certain field has been change on CRM form, a javascrift flag getIsDirty() == false. I’ve  noticed that just after changing field value user is clicking ribbon button and that was the reason. Flag getIsDirty() is beeing set when form control loose focus – operating on […]

Get attribute value audit, history

Get attribute value audit, history

What for Sometimes, there is necessity of getting historical values for entity attribute. Of course to do so audit for organization, entity and attribute have to be turned on. Code below allows user, with proper privileges, to read attribute value audit. For sure if you need fancy validation this code is no good for that. […]

How to copy entire entity form ?

How to copy entire entity form ?

If you have several forms for entity, and you need to create new form based on previously created form there are two options: open form customization window and SaveAs simple copy form request can be used instead of inserting fields ony by one using Microsoft.Crm.Sdk.Messages; var stageAdapter = new CRMServiceAdapter("SERVER_NAME", "Stage"); var organizationService = stageAdapter.Proxy; […]