Unbound Function as Bound
OData supports bound and unbound functions: the bound one is defined on the page and has reference to the working record while the unbound does not.
Problem
Bound actions will result in an error if the record does not exist, so they cannot be used after a business logic, which results in "deleting" the record (e.g., posting).
Unbound actions don't have a reference to the working record; therefore, you should pass data to the function so it can create one.
Solution
You can create an unbound function, which can take two parameters: one is a 'serviceName: Text' and the other is 'recordId: RecordId' which will be filled by the mobile application if the parameter list contains these values. From the serviceName, you can search through the page customization headers, which will contain the "Source Table No.".
After that you can create a RecordRef with the table number and the record id and use it as you choose. If there is no record on in the mobile application, then the record id will be an empty string.
Feedback
Submit feedback for this page .