locked
How to save same record in two entities RRS feed

  • Question

  • I have two custom entities

    1) Medical 

    2) Kitchen

    I want such a functionality where adding one record to Medical automatically shows that record to the people who have access to Kitchen. Or think of it as adding a record in Medical should show in Kitchens too(as it is nothing changed).

    what should I do? Workflow? mapping? or is there another way. I am new to crm 2011 btw

    Thanks in advance

    Monday, August 5, 2013 12:45 PM

Answers

  • Hi,

    You can create a workflow to start on create of Medical/Kitchen and fill the relevant fields. If you want to keep them in sync all the time, you might want to fire the workflow on update as well.

    Hope it helps.

    • Marked as answer by Hamzak Tuesday, August 6, 2013 10:52 AM
    Monday, August 5, 2013 1:27 PM
  • I changed the workflow to trigger on When record is created and its solved the issue. 
    Thank you for the help :D
    • Marked as answer by Hamzak Tuesday, August 6, 2013 10:52 AM
    Tuesday, August 6, 2013 10:52 AM

All replies

  • Hi,

    You can create a workflow to start on create of Medical/Kitchen and fill the relevant fields. If you want to keep them in sync all the time, you might want to fire the workflow on update as well.

    Hope it helps.

    • Marked as answer by Hamzak Tuesday, August 6, 2013 10:52 AM
    Monday, August 5, 2013 1:27 PM
  • Hey Shaffana thanks for the guidance :D

    can you point me to a good workflow tutorial?
    plus do I have to create it at the start of Medical or Kitchen?
    Remember Medical form is filled first and then it is supposed to fill the Kitchen form. 

    Monday, August 5, 2013 2:58 PM
  • If workflows does not support to fulfill your requirement, in fact you could write plugin on Medical create and copy all the values from Medical and create a Kitchen record.
    Monday, August 5, 2013 6:44 PM
  • How do I do that? I'm sorry I'm a newbie. I do realize I would need JavaScript.

    I just want kitchen to show the same records as created by Medical. Just that. Kitchen is supposed to only issue reports based on those records and nothing else.

    Monday, August 5, 2013 6:53 PM
  • Hey


    My workflow is based on entity Medical and it starts when record is created. I have added only one condition which says 
    CREATE: Kitchen.
    and i have related all the fields of kitchen with fields in medical form. But the workflow is not working.

    Can someone help me in logic or anything.
    Tuesday, August 6, 2013 9:13 AM
  • Hey


    My workflow is based on entity Medical and it starts when record is created. I have added only one condition which says 
    CREATE: Kitchen.
    and i have related all the fields of kitchen with fields in medical form. But the workflow is not working.

    Can someone help me in logic or anything.

    In this case, the workflow starts right after you have created a new medical entity and saved it for the first time. You need to think when you want to start the workflow and what is the best way to trigger it (for example after all info added).
    • Proposed as answer by crm-user-crm Tuesday, August 6, 2013 10:21 AM
    Tuesday, August 6, 2013 10:21 AM
  • Hey


    My workflow is based on entity Medical and it starts when record is created. I have added only one condition which says 
    CREATE: Kitchen.
    and i have related all the fields of kitchen with fields in medical form. But the workflow is not working.

    Can someone help me in logic or anything.


    In this case, the workflow starts right after you have created a new medical entity and saved it for the first time. You need to think when you want to start the workflow and what is the best way to trigger it (for example after all info added).
    I have changed the workflow to on change event when I save the Medical form, the workflow is running. But I have to save the form then manually run the workflow. I want the workflow to start immediately on save and I dont want to manually start it. 
    Any help?
    Tuesday, August 6, 2013 10:30 AM
  • Hey


    My workflow is based on entity Medical and it starts when record is created. I have added only one condition which says 
    CREATE: Kitchen.
    and i have related all the fields of kitchen with fields in medical form. But the workflow is not working.

    Can someone help me in logic or anything.


    In this case, the workflow starts right after you have created a new medical entity and saved it for the first time. You need to think when you want to start the workflow and what is the best way to trigger it (for example after all info added).

    I have changed the workflow to on change event when I save the Medical form, the workflow is running. But I have to save the form then manually run the workflow. I want the workflow to start immediately on save and I dont want to manually start it. 
    Any help?
    I am not sure what do you mean, but if you are you playing now with custom workflows and triggering them by a scipt?
    Tuesday, August 6, 2013 10:44 AM
  • The workflow starts when Record status is changed. When I save the form I have to manually run the workflow by clicking on the run workflow button in the form ribbon. 

    I want the workflow to run automatically when I save my form. What should I do?

    Tuesday, August 6, 2013 10:48 AM
  • I changed the workflow to trigger on When record is created and its solved the issue. 
    Thank you for the help :D
    • Marked as answer by Hamzak Tuesday, August 6, 2013 10:52 AM
    Tuesday, August 6, 2013 10:52 AM