Skip to main content
Community site session details

Community site session details

Session Id : AfJVJJaxzJQVQYKC5zwyAm
Power Apps - Power Apps Pro Dev & ISV
Unanswered

C# plug-in

Like (0) ShareShare
ReportReport
Posted on 17 Mar 2021 08:09:04 by 19

Hi, I'm new in powerapps and C#. I'm trying to write a plug-in. It's about when a contract is made by Entity A, this contract will also be added to Entity B's dataverse. Entity A and entity B has one to one relationship.

I may made wrong in descriping the situation, let me know if you need more informations. Thanks in advanced.

  • newbie_jade Profile Picture
    19 on 18 Mar 2021 at 09:53:29
    Re: C# plug-in

    Thanks for replying me. You really helped me a lot. The dealer is a lookup and it is in dealer table. I will set the lookup value step by step. Thanks again!

  • Mira Ghaly Profile Picture
    11,409 Moderator on 18 Mar 2021 at 09:44:09
    Re: C# plug-in

    @newbie_jade 

    Please have a look below:

    I also suggest you set one lookup field at a time and run and see if it works but you are on the right track 🙂

    Mira_Ghaly_0-1616060604925.png

     

  • Mira Ghaly Profile Picture
    11,409 Moderator on 18 Mar 2021 at 09:37:38
    Re: C# plug-in

    @newbie_jade 

    So now your step that is failing is the create Dealer Contract , if i am right? 

     

    Then you do not need to set the Dealer_contract field

    you need to set the dealer which is a lookup ? what is it a lookup from which table contact or account or custom?

     

  • newbie_jade Profile Picture
    19 on 18 Mar 2021 at 09:10:36
    Re: C# plug-in

    Dealer's type is lookup, dealer_contract's type is unique identifier.

    Here is the details of dealer_contract:

    newbie_jade_0-1616058489103.png

    And below is the details of contract:

    newbie_jade_1-1616058516986.png

     

  • Mira Ghaly Profile Picture
    11,409 Moderator on 18 Mar 2021 at 09:02:27
    Re: C# plug-in

    @newbie_jade 

    What are the data types of these fields?

    Mira_Ghaly_0-1616058140059.png

     

  • Mira Ghaly Profile Picture
    11,409 Moderator on 18 Mar 2021 at 09:00:30
    Re: C# plug-in

    @newbie_jade 

    To pass a lookup you need to pass it in the below way , I am sorry but I can't get much of your screenshots

    Say Dealer is a lookup of type entity so you need to pass it as :

    /accounts/accountGUID

     

  • newbie_jade Profile Picture
    19 on 18 Mar 2021 at 08:58:35
    Re: C# plug-in

    And I still have a question can automate make this contract automic? Like If I change the status of a contract from inactive to active in contract table, this contract will also be active in dealer_contract.

  • newbie_jade Profile Picture
    19 on 18 Mar 2021 at 08:45:49
    Re: C# plug-in

    newbie_jade_2-1616056439088.png

    Here are the contract and dealer_contract table. When a supplier user log in and made an contract with a dealer, this record will be added to contract table and the contract should be also added to dealer_contract table.

     

    I tried to make this in automate but got a bad request error, here is the detail of my flow:

    newbie_jade_3-1616057011605.png

    Here is the error:

    newbie_jade_4-1616057100903.png

    Did I do wrong from the start? Or I just need to fix this error? Thank you very much for helping me!

     

     

     

  • Mira Ghaly Profile Picture
    11,409 Moderator on 18 Mar 2021 at 07:45:44
    Re: C# plug-in

    @newbie_jade 

    Please add screenshots here.

     

  • newbie_jade Profile Picture
    19 on 18 Mar 2021 at 02:04:23
    Re: C# plug-in

    Thanks for your reply. I'm really appricated you can guide me on doing this. How can I share screens with you?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Loading complete