web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
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.

I have the same question (0)
  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @newbie_jade

    So why you choose to write a plugin, have you tried to used Powerautomate and CDS current environment.

     

    If you can share screens of how your entities are structured, I can guide you on either way either to create a plugin or use Powerautomate.

     

  • newbie_jade Profile Picture
    19 on at

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

  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @newbie_jade 

    Please add screenshots here.

     

  • newbie_jade Profile Picture
    19 on at

    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!

     

     

     

  • newbie_jade Profile Picture
    19 on at

    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.

  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @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

     

  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @newbie_jade 

    What are the data types of these fields?

    Mira_Ghaly_0-1616058140059.png

     

  • newbie_jade Profile Picture
    19 on at

    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,415 Moderator on at

    @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?

     

  • Mira Ghaly Profile Picture
    11,415 Moderator on at

    @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

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard