cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
admin122
Frequent Visitor

Create Sales Order line in Sale Order Dynamic 365 Using Canvas app PowerApps

i am trying to create small Canvas app but when i am add new sales order line in sales order 
But I am getting the error: Network Error when using patch function : Field 'producttypecode' is required.


If(ThisItem.'Product Name' in 'Order Products'.'Product Name',
Patch('Order Products',Defaults('Order Products'),
{
Order : Gallery2.Selected,
Name: Gallery2.Selected.Name,
'Product Name': ThisItem.'Product Name' ,
Quantity: ThisItem.Quantity,
'Price Per Unit': ThisItem.'Price Per Unit',
'Extended Amount': ThisItem.'Extended Amount'}),Collect('Order Products',ThisItem));

5 REPLIES 5
cha_cha
Resident Rockstar
Resident Rockstar

Hello @admin122 

 

Your Patch code is missing is Product Type Code entry.

cha_cha_0-1669209500371.png

 


 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

Hello cha_cha

Thank you for answer 🙂


when add 'Product Type Code ' filed give more error missing other filed , all filed are add in Patch give error those filed are system generated 

cha_cha
Resident Rockstar
Resident Rockstar

@admin122 

 

I guess you'll have to change your Product Type Code in your Dataverse to Business Recommended instead of Business required as that field is preventing you to perform a Patch.


 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

@cha_cha 

 

hello i am try below code to create sales order line in sales order but its give error can you please help to solve

If(ThisItem.'Product Name' in 'Order Products'.'Product Name',
Patch('Order Products',Defaults('Order Products'),
{
Order : LookUp(Orders, Order = Gallery2.Selected.Order),
Name: Gallery2.Selected.Name,
'Product Name': ThisItem.'Product Name' ,
Quantity: ThisItem.Quantity,
'Price Per Unit': ThisItem.'Price Per Unit',
'Extended Amount': ThisItem.'Extended Amount',
'Product type': Dropdown1,
'Property Configuration': Dropdown3
}
),
Collect('Order Products',ThisItem));

 

Network error when using Patch function: The spEcified column is generated by the server and can't be specified

 

Thank you

cha_cha
Resident Rockstar
Resident Rockstar

hello,

 

can you please share the column view of our dataverse?


 
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION This helps community members if they experience a similar issue in the future.

 
bistek.space   @cha_bistek    @BisTekSpace 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,469)