Customer Engagement & Dynamics CRM Forum

 View Only
  • 1.  Power Apps @ModelDriveFormIntegration help!

    SILVER CONTRIBUTOR
    Posted Oct 20, 2022 03:15 PM
      |   view attached

    We have an embedded Power App form in D365 on the Account record. This form is essentially used to create new child Account records. On the form, users make a selection in a choice field and the only option in the choice field is Account record they are on. When Account is selected in this field, other fields on the form populate based on fields on the Account record selected (the Account being used to access the embedded form). When the form is submitted, a child Account record is created, the selected record in that choice field becomes the Parent Account.

    We had this formula behind the field:

    First(Filter(Accounts,Account=GUID(First([@ModelDrivenFormIntegration].Data).ItemId)))

    It accomplishes what we need. However, now the formula is throwing an error. It no longer works as expected, and we can't figure out how to fix it.

    We need the Account record being used to access that embedded form to populate in that field as a choice. When users submit the form, the submitted record now has that Account as their Parent Account.

    I have an open support ticket with Microsoft, but so far they have not been able to provide me with a solution that works, and say the formula came from a third party (true, I found it online, I think from here) and is therefore unsupported.

     Can anyone help me out? What formula should I be using here?



    ------------------------------
    Autumn Hearne
    KCoe Isom
    ------------------------------


  • 2.  RE: Power Apps @ModelDriveFormIntegration help!

    Posted Oct 24, 2022 04:40 AM

    Hi Autumn,
    You should be able to achieve the same outcome by just setting the Items property of the dropdown to [@ModelDrivenFormIntegration].Item and selecting Name for the Value Property.

    I believe [@ModelDrivenFormIntegration].Data is no longer used, which might be causing your error.



    Let me know how you get on.
    Thanks

    Calum



    ------------------------------
    Calum Bunce
    D365 Consultant
    London
    ------------------------------



  • 3.  RE: Power Apps @ModelDriveFormIntegration help!

    SILVER CONTRIBUTOR
    Posted Oct 25, 2022 02:50 PM
    Thank you! I was able to create a dropdown field, and the Item property you suggested work. Then I just had to reset the Default or DefaultSelectedItems on the other fields to point to the dropdown field, rather than the choice field.

    Now I have an issue with the form loading slowly... but that's another conversation!

    Thanks for your help!

    ------------------------------
    Autumn Hearne
    Associate
    KCoe Isom
    ------------------------------



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