Form widget clears values after Save

jcmings
Mega Sage

I have duplicated the OOTB form widget and am using it to display case data on a custom page. I am using a custom table that is a child of HR Case and an HR Service built on that custom table. Whenever I save the form (even using OOTB UI actions), the widget "refreshes" and all of the values in string/checkbox fields get cleared. However, the updates do actually push to the server -- if I refresh the page or view the case in the back-end, the updates are there.

 

I believe this has something to do with my table specifically... When I test this using the OOTB form widget, table=sn_hr_core_case and another (HR Service) record's sys_id, the widget "refreshes" but the values stay on the form. If I change only the sys_id to that of my custom HR Service, the values get cleared. So any time my HR Service or table is inputted, the values clear, even on the OOTB form widget.

 

Do I need to add a record watch? I am confused because this appears to work for other HR Services. It may also be worth noting that I am unable to post work notes/comments to the case from the back-end currently. Not sure if this is related somehow.

 

 

6 REPLIES 6

Nick Parsons
Mega Sage

Hi, can you please clarify the following so people can help you better?:

  • What the version of your instance?
  • What is the actual widget you've cloned? (Please provide a name)

Thanks 

Hey Nick, I'm currently on Utah Patch 9. I cloned the Form widget (id: widget-form).

The Machine
Kilo Sage

It sounds like it’s redirecting you to a new record each time. Any customizations with redirects on the widget or the back end?

 

does the same thing happen in the back end?  If not, then it is specific to your custom widget.  You can also test against the form-widget and make sure everything works as it does on the back end. 

Good luck. 

It doesn't seem to be a new record each time, given that any choice values or reference values still appear after the rest of the fields "clear." Any checkbox, string field, or date field gets "cleared out" (after the database update happens). In other words, every field technically saves to the case form, but the strings/checkboxes/date fields just appear empty. I know this because if I refresh the page or load the case in the back-end, the values are there. There are no customizations with redirects here.

 

I just tested this with form-widget. When the table passed via URL is sn_hr_core_case, there are no issues whatsoever (assuming I am not using my custom HR Service). However, if I change the table to the actual COE (still, not my custom one, but an OOTB one) and keep the same sys_id, I noticed that the Short description and another string field get cleared after save. So it seems like this is happening across multiple COEs.

 

Edit to add: Noticing I missed your comment about the back-end. This is not an issue on the back-end because the Save button automatically refreshes the screen. But it also is evidently not a result of the custom widget as it is happening on the OOTB one as well.