I am trying to create a new opportunity line for an existing opportunity but I am getting the following error.
"The requested operation is invalid. Server Response: The unit id is missing.
However I am indicating in the patch to use the default unit. The full patch is below.
Patch('Opportunity Lines',Defaults('Opportunity Lines'),{opportunityid: ID, producttypecode: 'Product Type6'.Product, opportunityproductname: Dropdown4.Selected.Name, quantity: 1, propertyconfigurationstatus: 'Properties Configuration'.Edit, description: Dropdown4.SelectedText.Name, productid: Dropdown4.SelectedText, uomid: Dropdown4.SelectedText.'Default Unit'})
Any idea what might be wrong?
Solved! Go to Solution.
Hey @Jonfarmer4999
Hey @Jonfarmer4999
Hi
I get the exact same error with
Dropdown4.Selected.'Default Unit'
Regards
Jon
Hey @Jonfarmer4999
Hi the drop down items is the Products entity.
I am unsure what the Colname should be I have tried uomid but that gives an invalid type error.
Regards
Jon
Hey @Jonfarmer4999
Hey @Jonfarmer4999
Finally got it to work using this
Patch('Opportunity Lines',Defaults('Opportunity Lines'),{opportunityid:ID,producttypecode:'Product Type6'.Product,opportunityproductname:Dropdown4.Selected.Name,quantity:1,propertyconfigurationstatus:'Properties Configuration'.Edit,description:Dropdown4.SelectedText.Name,productid:Dropdown4.SelectedText,uomid:Dropdown4.SelectedText.'Default Unit'})
User | Count |
---|---|
255 | |
249 | |
82 | |
42 | |
29 |
User | Count |
---|---|
320 | |
262 | |
121 | |
70 | |
52 |