Announcements
If( CountRows(Self.Selected.AllItems) = 1, Notify(/The selected order is being cloned./), Notify(/The selected orders are being cloned/));ForAll( Self.Selected.AllItems As selectedOrder, With( { clonedOrder: Patch( Orders, Defaults(Orders), { Name: Left( selectedOrder.Name, (Len(selectedOrder.Name) - 5) ) & RandBetween( 10000, 99999 ), Customer: AsType( selectedOrder.Customer, Accounts ), 'Price List': selectedOrder.'Price List', Owner: selectedOrder.Owner, 'Created By': If( IsBlank(selectedOrder.'Created By'), Blank(), selectedOrder.'Created By' ) } ), selectedOrderProducts: Filter( 'Order Products', Order.Order = selectedOrder.Order ) }, ForAll( selectedOrderProducts As selectedOrderProduct, Patch( 'Order Products', Defaults('Order Products'), { Quantity: selectedOrderProduct.Quantity, 'Price Per Unit': selectedOrderProduct.'Price Per Unit', 'Existing Product': selectedOrderProduct.'Existing Product', 'Manual Discount': selectedOrderProduct.'Manual Discount', Description: selectedOrderProduct.Description, Order: clonedOrder, Unit: selectedOrderProduct.Unit, 'Product type': selectedOrderProduct.'Product type', 'Property Configuration': selectedOrderProduct.'Property Configuration', Name: selectedOrderProduct.Name, Pricing: selectedOrderProduct.Pricing } ) ) ));If( CountRows(Self.Selected.AllItems) = 1, Notify(/The selected order has been cloned successfully./), Notify(/The selected orders have been cloned successfully./))
André Arnaud de Cal... 291,359 Super User 2024 Season 2
Martin Dráb 230,370 Most Valuable Professional
nmaenpaa 101,156