- Description
- Example Use Case:
- How to use it
Description
In this How-To we would like to explain how you can develop an individual function using ProCode to delete an entry including all connected subentries together.
Example Use Case:
Given the following data structure:
- Offer 4711
- Position A
- Property 1
- Property 2
- Position B
- Property 3
- Property 4
Now I want to delete the Position A from the offer including the connections from A to the properties 1 and 2
How to use it
- Choose root entry to delete
- Could be done via a panel header function in a grid
- Create a typescript function to get the selected entry
- Include this function as a menu action in grid
- Other way via a function in a detail screen
- Also create a typescript function to get the chosen entry
- Include this function e.g. in the ribbon of a detail screen
- Include an ABL Business task into a TS function
- Here will be described the general approach how to include an ABL Business Task into a TS function. For that you can use the code snippets provided by Build.One:
b1-CallBackendAsyncorb1-CallBackendSync) - Here is an detailed example, where the ABL BusinessTask
ProcessCustomParameterBTis called in a TS function. You can adapt these for the deleting approach - And afterwards there are the code examples for the ABL Business task. Also here you can use the Build.One code snippets
b1-LogicClassandb1-LogicParameter - ProcessCustomParameterBT.cls
- ProcessCustomParameterParameter.cls
- The actual logic of deleting the entries must be implemented by you, follow these high-level steps:
- Find out or know all the tables which are connected to the entry you want to delete
- Know the key fields, how the different tables are connected
- Prepare a delete statement in ABL, which deletes the current entry and all connected ones
- Optional: Send message to frontend
Back to Documentation
Back to Home Page