Sometimes when executing a prompt the user realizes that the record being searched does not exist. In those cases, it is practical to be able to insert a record without leaving the current task.
K2BPrompt supports generating that kind of interface. In this exercise we will activate that feature in the prompt we created in the last exercise.
- Go to the K2BPrompt instance created in the last exercise.
- Below the “Prompt” node, you will find the “Modes” node, as shown in this picture.
|Prompt Modes Definition
- Go to the “Modes” node and change the “Insert” property to “True”.
- Run your app, and try creating a new invoice using a customer that was not created in the database.
- Go to the K2BPrompt instance.
- Go to the" Modes" node and change the AfterInsert property to "ReturnToPrompt"
|Prompt Modes After Insert property
- Run your app, and try creating a new invoice using a customer that was not created in database. See the difference between "ReturnToTransaction" and "ReturnToPrompt"
Tip: You can customize how the Insert action works, by using the “Insert Condition” and the “After Insert” properties. See Modes (Prompt) for more details.