web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApp CDS asking fo...
Power Apps
Answered

PowerApp CDS asking for Quote Number

(0) ShareShare
ReportReport
Posted on by 79

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

  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    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:9.JPG

    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:

    https://powerusers.microsoft.com/t5/General-Discussion/Manually-Generating-UniqueId-Key-Values-or-how-is-it-generated/td-p/29522

     

    Best regards,

  • aboodhamwi Profile Picture
    79 on at

    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

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard