Hi,
Once i'm trying to create a quote with the Patch function, I'm getting an error that I have to provide the quotenumber (An auto-generated field inside the quote entity) and in case I provided a value the quote number will be that value, also the issue happen once I'm trying to create an invoice, is there a way to override this issue or no
any ideas
Solved! Go to Solution.
Hi @aboodhamwi ,
Could you please share a bit more about your issue?
Could you please show more details about your Patch formula?
Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side. The Quote Number (Quote ID) field is a Required field in Quotes Entity, when we generate an app based on the Quotes Entity, it would be recognized a Required/Mandatory field in PowerApps app, which we must provide a value for it.
I afraid that the Quote ID field (Auto Number type) in Quotes Entity could not work as expected within PowerApps app currently. If you want to get further help in this issue, please consider submit an assisted support ticket through the following link:
https://powerapps.microsoft.com/en-us/support/pro
As an alternative solution, you could consider generate a random string value for the Quote ID filed within your Patch formula as below:
Set the OnSelect property of the "Submit" button as below:
Patch( Quotes, Defaults(Quotes), { Name: "PowerApps Portal Ticket", 'Quote ID': "QUO-" & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & "-" & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) } )
More details about generating a random unique key in PowerApps, please check the response within the following thread:
Best regards,
Hi @aboodhamwi ,
Could you please share a bit more about your issue?
Could you please show more details about your Patch formula?
Based on the issue that you mentioned, I have made a test, and the issue is confirmed on my side. The Quote Number (Quote ID) field is a Required field in Quotes Entity, when we generate an app based on the Quotes Entity, it would be recognized a Required/Mandatory field in PowerApps app, which we must provide a value for it.
I afraid that the Quote ID field (Auto Number type) in Quotes Entity could not work as expected within PowerApps app currently. If you want to get further help in this issue, please consider submit an assisted support ticket through the following link:
https://powerapps.microsoft.com/en-us/support/pro
As an alternative solution, you could consider generate a random string value for the Quote ID filed within your Patch formula as below:
Set the OnSelect property of the "Submit" button as below:
Patch( Quotes, Defaults(Quotes), { Name: "PowerApps Portal Ticket", 'Quote ID': "QUO-" & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & Mid("0123456789", 1 + RoundDown(Rand() * 10, 0), 1) & "-" & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) & Mid("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", 1 + RoundDown(Rand() * 36, 0), 1) } )
More details about generating a random unique key in PowerApps, please check the response within the following thread:
Best regards,
Hi,
Thanks for the response, as what you mentioned regarding the Quote Id, from the CRM perspective this is an auto number generated by the system and its system required, but for the powerapps, it keeps asking me once I'm doing the Patch, the Erros(Quotes) will return this record
[{"Record":null,"Column":"quotenumber","Message":"Field required","Error":2,"ServerMessage":null}]
Thanks for the suggesting of creating a random number, i already submitted a ticket for support, in case no proper response from there side i will go with the doing the numbering by my self
User | Count |
---|---|
26 | |
24 | |
9 | |
7 | |
6 |
User | Count |
---|---|
37 | |
34 | |
17 | |
10 | |
9 |