Koczka Bence
Koczka Bence

Reputation: 95

Appmaker: how to set the current item to be the lastly created?

I have been struggling this for a while. I am creating an item with a form. After the item is created, I want to redirect the user to a page, where the datsource's current item is set to this new one. How would this be possible? I tried

  var keyofCustomer = record._key;
  google.script.run.getCustomer(keyofCustomer);
  app.datasources.Customers.item=currentCustomer;
  app.showPage(app.pages.CustomerDetails); 

the getCustomer server script:

    function getCustomer(customerID)
   {
    var customer = app.models.Customers.getRecord(customerID);
    return customer;
   }

Any kind of help would be much appreciated.

Upvotes: 0

Views: 43

Answers (0)

Related Questions