Skip to main content

Notifications

Community site session details

Community site session details

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

C# plug-in

(0) ShareShare
ReportReport
Posted on 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 at
    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 Super User 2025 Season 1 on at
    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 Super User 2025 Season 1 on at
    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 at
    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 Super User 2025 Season 1 on at
    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 Super User 2025 Season 1 on at
    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 at
    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 at
    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 Super User 2025 Season 1 on at
    Re: C# plug-in

    @newbie_jade 

    Please add screenshots here.

     

  • newbie_jade Profile Picture
    19 on at
    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 85 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 65 Super User 2025 Season 1

#3
mmbr1606 Profile Picture

mmbr1606 55 Super User 2025 Season 1

Overall leaderboard