adding checkbox to enable cloning RRS feed

  • Question

  • Hello, I am enjoying working with Microsoft CRM.  Members of our group wish to be able to enter information on a page and have this info cloned to another section of the CRM.  Since our website uses CRM for content, essentially this could potentially mean that info that gets added on one edit screen will appear in multiple places on our website.

    I have looked at several of our content pages.  At the top, I see "customize" and below it "form."  So, I understand how a checkbox can be added to the edit form that would tell the user that data entered on this page will be cloned to another place.  However, I never see any link to add "business logic."  When I click on some custom check boxes (that someone else added) I never see where additional code is located.  At this time I can't figure out how to add programming so that the cloning process takes place.

    Does anyone have any ideas in how to add custom programming to a checkbox that enables data entered on one edit screen to be cloned elsewhere in the CRM?  Thanks if you do. :)
    Tuesday, November 22, 2016 9:11 PM

All replies

  • There is 2 types of coding server side and client side. Although I am not sure but I suspect:-

    1. In design mode of form if you double click the checkbox then a field properties window will pop up. Go to event tab and see any function is being called in event handler section. Also check the code in above form libraries.

    2. If it is server side then you will have to either check workflows or using plugin registration tool you can check any plugin or custom assembly registered against the entity.

    Regards Faisal

    Wednesday, November 23, 2016 10:25 AM
  • To expand on the previous answer, which correctly states you can use either client-side or server-side code for this:

    1. For client-side code, you'd write this as javascript in a webresource, and the event handler for the checkbox control would specify the function and webresource to call
    2. For server-side code, you would write this as a plugin using .Net code, and register the plugin on the update (and maybe create) message for the entity

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Wednesday, November 23, 2016 11:40 AM
  • Thanks a lot, David.  I will look into your ideas.  I appreciate the response! :)

    Wednesday, November 23, 2016 1:07 PM
  • Thanks a lot, Faisal.  I will look into your ideas.  I appreciate the response! :)
    Wednesday, November 23, 2016 1:07 PM
  • I am trying to figure out where the code is to save changes made by a user when adding data to an edit form in CRM.  I presume the database logic is server side, as the URL of the edit page contains a string which matches one of the databases on our SQL server.  However, with about 100 or so stored procedures in this database, which one is CRM using to actually save the data?

    I have opened up the edit form, gone into "customize/form", and double-clicked on things.  I don't see any way to know what code is run when the user saves the form.

    This is where I have issues with CRM.  I wish it were easier to find out what database logic I can change to accomplish my need to clone the page.

    Any help is appreciated.  Thanks!

    • Edited by ScottDPOB Wednesday, November 23, 2016 3:42 PM
    Wednesday, November 23, 2016 3:30 PM
  • There are at least 6 ways to clone a record in CRM. As the code is working on change of a field therefore either it is JavaScript, workflow or plugin. We can use these three method to update any related record in CRM.

    Regards Faisal

    Wednesday, November 23, 2016 4:57 PM
  • Faisal, thanks again for your reply.  I'm still wondering where is the code for the page I wish to clone?  In a .NET application it is easy to figure out what code runs when the user is trying to save.  With CRM I haven't found any reference to an external bit of SQL code; I also haven't found it when reviewing the edit page.  This is where I am stuck: I can't find the database logic associated with the edit page. 

    I appreciate your help so far.  :)

    Wednesday, November 23, 2016 5:49 PM
  • which version of CRM are you using?.  Check any workflow running on that entity on change of field.

    use plugin registration tool to find plugins running on that entity.

    Regards Faisal

    Wednesday, November 30, 2016 11:24 AM