Unbounded Function as Bounded
OData supports bounded and unbonded functions: the bounded one is defined on the page and has reference to the working record while the unbounded does not.
Problem
Bounded 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).
Unbounded 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 unbounded 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 .