I have created an entity for customer records and created a field which I set it up to be an autonumber, but when I am clicking a new form the autonumber is not showing; It's only showing when I try to save it.
Is there any possibility that the number can be shown in the field, when we click new from(though it is showing when we save it)
I use a method with SharePoint that you maybe able to implement?
I generate a Ref_Number by adding to the Item ID, however, the item isn't created until the relevant data is Submitted, so I do this:
1. User selects 'Create New'
2. In the background, I Submit a hidden form with only the 'Required' fields data
3. In the OnSuccess of this Form, I set a variable to the myFormName.LastSubmit, which gives me the new ID
4. The user is then taken to the complete Form which is in Edit mode (not New) and has it's Item property set to the above variable
This way I can show the user their new Ref_Number which has been built using the ID. I use this method to circumvent double-ups of Ref_Numbers.
Not sure if you could adapt this method to suit your needs but it maybe worth a go?
Sorry, I've not yet used Model Driven apps & CDS Entities, but I think the basic outline I setup above should work for you?
- create a NEW item - only add the 'Required' fields
- somehow return the details of this NEW item back to your app, I use variables for this
Check out new user group experience and if you are a leader please create your group
Check out how to claim yours today!
We are excited to announce that Demo Extravaganza for 2021 has started!
On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks
Don't miss the call this month on June 16th - 8a PDT