Dialog box to insert a record RRS feed

  • Question

  • I have an entity called clients. this has a relationship to  entity FM_services.

    The client entity has a field called status and service

    If the service is FM, can I run / activate a dialog box to add / edit an associated record in the fm_services. There should only be 1 record in FM_Services if the clients 'service' is set to FM

    any tutorials would be helpful

    Dont ask me .. i dont know

    Sunday, January 13, 2013 10:14 PM


  • Hi Pete,

    Yes, you can do that. I am hoping when you say, there will only be 1 record of FM_Services for a client record, this means the client has N:1 relationship with FM_Services (OR it means FM_Services is a lookup on client). I am also assuming when you are creating or updating or deleting the client, the FM_Services record should also be created (if not there) or update (if already there).

    You don't necessarily need to do that through a dialog. There are 2 ways:

    First Way: Custom workflow activity or a plugin. Whenever you create/update the client record then run a workflow which has a custom workflow activity in which you will code the FM_Services record update. Instead of custom workflow activity you can also write a post create/update plugin to code FM_Services record update.

    Second Way: Dialog. In case dialog is necessary. Then in JScript activate your dialog and call this onsave event of the form. So basically onsave will see whether the service type is FM, then it will pop a dialog. In this dialog you can assign values which then you can pass into a custom workflow activity. In custom workflow activity you can code the FM_services record update.

    You can either refer to CRM sdk for plugin and custom workflow examples or also google for it.

    I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful.

    Ashish Mahajan, Microsoft Dynamics CRM Solutions Architect, CSG (Melbourne)
    My Personal Website: http://www.ashishmahajan.com
    My Blogs: http://ashishmahajancrm.blogspot.com.au and http://ashishmahajancrm.wordpress.com
    My Youtube Channel: http://www.youtube.com/user/ashishmahajanmscrm

    My Linkedin: View Ashish Mahajan's profile on LinkedIn
    My Twitter: https://twitter.com/#!/ashishmahajan74

    Monday, January 14, 2013 12:43 AM