cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Perumal
Level 10

Create new Sales Invoice Line record

I am trying to create a new "Sales invoice line" record in new CDS, which has "Status" field of enumeration which has values["Active", "Invoice",....]. I got struck with Patch() function which creates a new create record and don't know how to set the "Status" field with any of the enumeration values.

 

 

2 REPLIES 2
Power Apps Staff murali
Power Apps Staff

Re: Create new Sales Invoice Line record

You should be able to do this

 

Patch('Sales invoice line', Defaults('Sales invoice line'), {Status: "Active"})

 

If you want user to select the status, you should be able to bind allowed values for status to say a dropdown and get the selection from there

 

Dropdown1.Items = DataSourceInfo('Sales invoice line', AllowedValues, "Status)

 

Patch('Sales invoice line', Defaults('Sales invoice line'), {Status: Dropdown1.Selected.Value})

 

Hope this helps.

 

Thanks

Murali

Power Apps Staff murali
Power Apps Staff

Re: Create new Sales Invoice Line record

@Perumal - did the provided solution work for you?

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps 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

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,084)