Skip to Content

How to get the newly created entity from backend in SAP Fiori for iOS SDK?

Hi everyone,

I am trying to get the newly created entity in the backend as a result, but I cannot find anything in the documentation. Does anyone know if this is possible or not implemented at all. The OData service responds with the newly created entity.

This is the method in question:

And a code sample would look something like this:

@objc func createEntity() {


        self.view.endEditing(true)"Creating entity in backend.")

        self.zfsmobilesrvEntities.createEntity(self.entity) { error in


            if let error = error {

                self.logger.error("Create entry failed. Error: \(error)", error: error)

                let alertController = UIAlertController(title: NSLocalizedString("keyErrorEntityCreationTitle", value: "Create entry failed", comment: "XTIT: Title of alert message about entity creation error."), message: error.localizedDescription, preferredStyle: .alert)

                alertController.addAction(UIAlertAction(title: self.okTitle, style: .default))


                    // Present the alertController

                    self.present(alertController, animated: true)




  "Create entry finished successfully.")


                self.dismiss(animated: true) {

           NSLocalizedString("keyEntityCreationBody", value: "Created", comment: "XMSG: Title of alert message about successful entity creation."))






Basically, in the line of a successful creation of an entry, I would like to know if there is a way to also get the new entity as an object.

Thank you in advance!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    May 09, 2018 at 03:34 PM


    This is maybe simpler than you expected - or I'm misunderstanding. If you call `createEntity(self.entity)`, the `self.entity` will be updated with the latest server version that you have after the create, i.e. all properties will be updated with the response from the create operation.


    Add comment
    10|10000 characters needed characters exceeded