workflow execution from Plugin

Here is quick sample code for workflow execution from Plugin ... Execute workflow ... /// <summary> /// Execute porcess /// </summary> /// <param name="entityId"></param> /// <param name="service"></param> /// <param name="workflowId"></param> private static void ExecuteProcess(IOrganizationService service, Guid entityId, Guid workflowId) { ExecuteWorkflowRequest request = new ExecuteWorkflowRequest() { WorkflowId = workflowId, EntityId = entityId }; // Execute... Continue Reading →

Advertisements

bulk Create/Update/Delete for Dynamics 365

  Create / Update / Delete can be done with bulk operation, to avoid more DB hits and it will improve performance of the plugins and or code. Here is reference MSDN URL http://msdn.microsoft.com/en-us/library/jj863631.aspx Default max batch size is 1000, its applicable for all three create/update/delete. bulk Create can be done with following code snippet CreateRequest... Continue Reading →

Refresh roll up field from plugin

Roll up fields are very useful, it reduce lots of manual and coding efforts. This rolls up field will auto refresh by each hour by default, off course it can be changed any time. But what if developer wants to refresh it on fly from plugin itself to make following logic to work perfectly, which... Continue Reading →

Get complete trace through multiple level plugins

  While extending MSD CRM with complicated business requirements, we write many plugins; one plugin triggers from another plugin's create or update. In such a scenarios if one of child plugin breaks then it will provide only current plugins trace, it's very hard to analyse that particular scenario or replicate that same scenario in Dev environment without the proper... Continue Reading →

Plugin debugging

Have you ever stuck in a situation where the plugin working perfectly in a test environment but not the SIT/UAT/Production environment? Remote debugging might be a tricky setup in most of the production server because of the firewall constraint or even many times developer does not have access to the following environment. In such situation... Continue Reading →

Linq Entity with filter

Many times we need to joins with filters in one entity or both of them. Here is the simple sample ... var tcIncentiveId = new Guid("31EE1300-AA49-E711-8100-000D3AD073D7"); //context.Trace("trace " + tcIncentiveId); Entity tcincentive = service.Retrieve("aams_tcincentive", tcIncentiveId, new ColumnSet(true)); //first entity - QueryExpression queryFirstEntity = new QueryExpression("soft_tcincentive"); //first entity columns to fetch queryFirstEntity.ColumnSet = new ColumnSet("soft_tcincentiveid"); //first... Continue Reading →

Date Issue

In MS CRM, we have multiple date time zone setting, each user can set his own time zone as per his requirement. Thus, Microsoft Dynamics CRM stores all DateTime fields in UTC time, so by using the ‘DateTime.UtcNow’ approach our dates will be converted into UTC time before hitting the database. For example, default time... Continue Reading →

Consume Web-request from Plugin

Generally, CRM not works alone, it includes many other application, such time we needs to move data from one application to another. In this situation we needs integration; We do integration with either “HttpWebRequest” or “BasicHttpBinding”.  Explore “HttpWebRequest” implementation here . To consume web-service using “BasicHttpBinding”, I used following way. Created a proxy class for web... Continue Reading →

CRM 2011 Early Binding vs Late Binding Performance

Late is much faster that Early binding.

early-bound

Short

datashort

Long

datalong

WOODSWORKBLOG

Early binding versus late binding, which is faster?

Late.

View original post 353 more words

Blog at WordPress.com.

Up ↑

%d bloggers like this: