object script update records in client side - Forum - Rollbase - Progress Community

object script update records in client side

 Forum

object script update records in client side

  • Does object script have a counterpart on the client side? I need to update a value when a certain event is encountered. For example I have a link that when I click it, it calls an api method similar to rbv_api.updateRecord to update my field.
  • You can send AJAX from client to requests to retrieve/update records. Please check Chapter 7 for details.
  • Thanks but this does not solve the problem.

    I am on the view page. I have template field that when clicked needs to update the number of clicks counter. When I click the field, I am able to change the value of the number of clicks, but when I refresh the page or go another tab and return to it, the value of the number of clicks is no longer correct (return to 0).
  • Should rbf_setFieldContent() be able to save the value on the server? As of the moment, it just changes the display but not the server value.
  • I also tried rbf_setField but it still does not update my click count.
  • I think rbf_setFieldContent only sets value on current page. We can enhance this to also set value o server side. As for rbf_setField it should change server-side value. I'll check how it works.
  • Hi Pavel,

    I get the error useIds is not defined when using the rbf_setField. This is when the field I am updating is a text field. From chapter 7, I understand that this parameter is not needed when the field is a text field. Attached is a copy of the error I get.
  • I confirm the bug, will be fixed in the next update.