cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tallbacken
Level: Power Up

Automatically create record in Dynamics 365 (CRM)

Could you help a rookie out? I´ve tried to Google this but no success.

 

I would like to create an app to use for adding Contact, Account and Opportunity in Dynamics 365. I have an idea that a potential customer would enter i.e First Name, Last Name, Email and Company Name in the app. I can manage to create a record in the Contact entity based on Name and Email fields, and a record in the Account entity with the Company Name. 

 

Now I want to automatically create a record in the Opportunity entity, based on the info the potential customer enters. How would I do that?

 

My thoughts:

Create a form connected to the opportunity entity? Can I auto populate the fields based on the previous fields?

Use collections in some way?

Or do I want to use Flow to manage this?

1 REPLY 1
PowerApps Staff carlosag
PowerApps Staff

Re: Automatically create record in Dynamics 365 (CRM)

One option is to use the Patch function

https://powerapps.microsoft.com/en-us/tutorials/function-patch/

so that you can control in the button after saving the form to the Contacts, for example:

 

   SubmitForm(Form1);Patch(Opportunity, Defaults(Opportunity), {FirstName: DataCardValue2.Text, etc... })

 

Inside the { } make sure to set hte right name for the columns you are trying to set and match the right textbox in the Form control.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 164 members 5,804 guests
Please welcome our newest community members: