0

enter image description here

When 'Request Quote' is pressed, I want all the info from the text boxes to be sent to Dynamics 365 and for a lead entity to be created and filled out with all info.

ChrisSolar
  • 17
  • 5

1 Answers1

0

For other data sources, we usually do SubmitForm. But for CDS we have to use PATCH function.

Read more

Patch(
 "CDSEntityDataSource",
 Defaults(CDSEntityDataSource),
 {
   Column1:DataCardValue1.Text,
   Column2:DataCardValue2.Text,
   ...
 }
)
  • 1
    Patch(Leads, Defaults(Leads), {'First Name':'Text First Name', 'Last Name':'Last Name','ZIP/Postal Code':Postcode,'Address 1':'Building Name or Number','Mobile Phone':'Phone number',Email:Email,Ext:'Phone Extension','Company Name':'Company Name',Description:'Description Box'}) – ChrisSolar Jun 03 '20 at 10:10
  • This is the code I had written in PowerApps yet the app would not run because it says there is a field 'subject' that is required for it to work, yet we have no field called subject on the specific entity! – ChrisSolar Jun 03 '20 at 10:11
  • @ChrisSolar definitely ‘subject’ field is there. assign some value to it. https://learn.microsoft.com/en-us/dynamics365/customer-engagement/web-api/lead?view=dynamics-ce-odata-9 – Arun Vinoth-Precog Tech - MVP Jun 03 '20 at 11:07