Total Pageviews

Monday, 14 March 2016

Use of plug-in in ms crm

Use of plug-in's :-

Every day we will use plug-in's but actually we can not concentrate on the questions like why use plug-in ? 

Plug-in's are very use full in ms crm to do some of the operations automatically when we are doing some other works. For example need to go update the account record having exact count value of its related contact records when contact is added to it or removed from it.

So plug-in's will work as triggers like as triggers in sql , when one operation is completed it will automated and performed another work.

When to use plug-in's , scripts and workflows :-

This question keeps on strike on so many developers while working , we can achieve the same task with different ways like using script, using plug-in's,using workflow's.Need to choose correct way to solve the problem, of course its complicated.But if we have some idea about all these concepts we can easily choose the correct path. I am trying to give little bit information which i know.

Script :- 

Basically script is useful to validate the client side data like field validation,show/hide fields,show/hide tabs and sections. Don't try to use plug-in's here .
scripts can be use when work with ribbon customization for enable/disable rules , display rules and click events.
scripts also can use if we want to update or create few related records when parent record is created or updated.We can do update or create huge records also but it may affect on performance.its not recommended.
scripts can use to trigger workflows and plug-ins when ribbon button clicked or on load of form or on change of field on form
scripts can use to open html dialogs when click on buttons.
scripts can use when developing the custom html pages..

Plug-in :- 

Mostly plug-in's  can be used when we want to perform some bulk operations before and after events 
Plug-in's can be used to update or create related records when parent record is updated or created or deleted.
Plug-in's can use for 1-N ,N-1 and N-N relationship.

Workflows :-

workflows are usefull to perform some events with out need of custom code like sending email,change status,create or update records.
workflows can only work N-1 relationship means we can not perform the update of all related records when parent record is updated.we can only do if child record is updated then we can update the parent record.
if we want to perform updation to all child records when parent is updated need to write custom workflow.
workflow's have the advantage is can call child workflow's .
workflow's can be used to schedule the process to run at particular time on daily bases or monthly or yearly .This thing we can not do in plug-in's.
.




No comments:

Post a Comment