on 2023 Aug 07 3:22 PM
Hi,
I have my default oDataModel defined in my manifest.json as "". This oDataModel has a entity called "ZC_MAINT_ZLABELS_PRINT" with some properties. 1 of these properties is Plant and has a value help defined in CDS (RAP).
I want to put a SmartField in my application for property Plant (So I don't need to create a value help myself):
<form:SmartForm id="idNewLabelSmartForm" class="editableForm" editable="true"> <form:Group id="idNewLabelGroup"> <form:GroupElement id="idNewLabelGroupElement"> <smartField:SmartField id="idPlantNewLabelprinterSmartField" value="{Plant}" entitySet="ZC_MAINT_ZLABELS_PRINT"/> </form:GroupElement> </form:Group> </form:SmartForm>
Now when I select a value from my value help or enter a value in the SmartField directly it is cleared automatically and my SmartField is empty again. How do I fix this issue? In the sample code ".bindElement(/abc)" is executed but this is something I cannot do as the entity does not exist yet.
Thanks!
Request clarification before answering.
Hi,
Try to use the method createEntry of the model. It returns a context that you can bind.
The field values will be updated automatically by the smartfields so you will only have to call submitChanges() when pressing Save.
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Resolved my issue
User | Count |
---|---|
88 | |
10 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.