- In the drop-down, the system will display standard OData execute actions. To enable this, we need to create an OData execute action.
- This involves creating a method in the data entity and adding the following attribute at the top of the method.
[SysODataActionAttribute("Name", false)]
- For a static method, we will pass 'false.' For an instance method, we need to pass 'true'.
Below code I have written in my custom entity.
[SysODataActionAttribute("GetSalesStatus", false)] public static str getStatus(str salesId, DataAreaId company) { str status; changecompany (company) { status = enum2Str(SalesTable::find(salesId).SalesStatus); } return status; }
After rebuilding the project, it appears in the drop-down.
Sales ID and company are the input parameters. After selecting the execute action, click on 'Add parameter,' then select these two parameters and assign their respective values
In the blog below, he has explained OData actions with different scenarios. Please check for further clarification.
OData actions
OData actions
Keep Daxing!!
No comments:
Post a Comment