I have one question
How to Add a New Entity to Entity Selection
I placed a matrix inside a web form and an entity text input below it
I placed a save button below it, and after selecting the list, I modified the data of the text input and the update was successful.
Next, I placed a button for create a new entity.
I can’t do it well
What am I doing wrong?
After that, I continued to test and I found out how to do it well
Click the Create new entity button, then click the save entity button
New registration is now possible
However, after clicking the save entity button, it is not reflected in the list.
Click the reload button to reflect
To reflect the list immediately after clicking the save entity button
What should I do?
By adding another On click event and making the target the current tab, it is now possible to update
however it takes a long time to refresh
This time I would like to update it while keeping the screen
I believe there is surely a way
To refresh the list or the matrix in order to see if the new entity is been created successfully, you need to add another standard action for reloading the entity selection in the button “Save” after the standard action for saving the new entity, and then you can see the new list or matrix after adding that new entity.
is there a way to complete the sequence via a cs or ds function?
You can do it by using functions from dataclasses:
-For "Save, you can create a function and use this.save() to create the new entity.
-And for “Reload”, you can create a function inside the dataclass, use this.all() to load all the entities from the dataclass (entity selection) and bind the return of the function with the datasource that represents the entity selection.
But to optimize things, using standard actions for saving or reloading is better than using functions.