Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

odd behaviour when creating additional relationships to contact entity

  • 1.  odd behaviour when creating additional relationships to contact entity

    TOP CONTRIBUTOR
    Posted Apr 02, 2020 03:21 PM
    I'm seeing an odd behaviour where we have created a small entity linked to a contact record to show the outcome of interviews with that contact.

    Each interview is undertaken by two interviewers who are always contacts in the CRM, so we have added two lookup fields into our new interview entity both N:1 to the contact entity (interviewer 1 and interviewer 2).  All good so far.

    But when a new interview record is created from the subgid on the contact form, both interviewer fields are populated with the name of the related contact.

    I've looked at the field mappings and Dynamics (with no involvement from me) has created mappings from the contact to the two interviewer fields in the new entity so that the contact name is populated into both on creation.  I have tried to remove these mappings but they cannot be removed because they are "system generated".

    Does anyone know a way to fix this situation so that the interview record is created with blank interviewer fields?

    I have a workaround using a workflow that on creation of the record clears the two interviewer fields, but thought there must be a more sensible way to fix this issue...

    Cheers,
    Simon

    ------------------------------
    Simon West
    Nett Sales LLP
    Aldbourne
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: odd behaviour when creating additional relationships to contact entity

    MICROSOFT MVP
    Posted Apr 03, 2020 03:33 AM
    Simon, that is a common problem and you have found one of the fixes. The other fix is to use JavaScript to clear those fields when a new record is added from the sub-grid.

    ------------------------------
    Feridun Kadir
    Principal Consultant, MVP
    Expert CRM Services Ltd
    Stansted
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: odd behaviour when creating additional relationships to contact entity

    TOP CONTRIBUTOR
    Posted Apr 03, 2020 04:42 AM

    Hi Feridun,

     

    Thanks for confirming that I'm not going mad!!  Will also look at the JavaScript option as with the workflow, the new record needs to be saved before the fields are cleared.

     

    Best,

    Simon

     

     

     




    Academy - Online Interactive Learning from Experts


  • 4.  RE: odd behaviour when creating additional relationships to contact entity

    MICROSOFT MVP
    Posted Apr 03, 2020 05:15 AM
    You are welcome.

    With the JavaScript option,I'd clear the fields before saving the record. So in the JavaScript, test if the form is for a new record and if it is clear the values in the lookups. If the form is for an existing record, do nothing - you don't want to erase values that have been correctly entered.

    With a workflow, you could use a synchronous workflow with an automatic trigger of record created and have it clear the fields. That should I think show the form with the fields cleared when a user adds an interview record rather than waiting for the workflow to run asynchronously.

    ------------------------------
    Feridun Kadir
    Principal Consultant, MVP
    Expert CRM Services Ltd
    Stansted
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 5.  RE: odd behaviour when creating additional relationships to contact entity

    TOP CONTRIBUTOR
    Posted Apr 03, 2020 07:18 AM
    Simon,

    That is odd.  But there are other was to designate other contacts related to a contact with different roles (i.e. Interviewer) you can try if the related table does not work well for your needs.

    Connections is one example, and does not require creating a new entity.  Using Connections might be one way to designate Interviewer one and Interview 2, and would not pre-popluate the name field.  (Here is MS Info on creating connections:  https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/basics/create-connections-view-relationships-between-records)

    If there are never going to be more than two interviewers, you could also consider adding two new look-up fields directly on the contact form called Interviewer 1 and interviewer 2 (instead of creating a new relationship entity and sub-grid)  This would also help get around the pre-populated field problem.

    ------------------------------
    Patrick O'Donnell | VP - Business Development, the Americas
    mscrm-addons.com
    Patrick.ODonnell@mscrm-addons.com
    Atlanta GA
    770 781 8260 Cell
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 6.  RE: odd behaviour when creating additional relationships to contact entity

    TOP CONTRIBUTOR
    Posted Apr 06, 2020 04:49 AM

    Thanks Patrick,

     

    I agree that putting this data on the contact form is the cleanest option and with the new UUI, being able to put all this data into one tab is appealing.  But the issue we have is that the person will undertake multiple interviews and they want a record of all the interviews undertaken, so we need the separate entity for multiple child records.

     

    Using the Connections is something that I had not thought of for this – thanks, that could work well!

     

    Best,

    Simon

     

     




    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role