Forms reorganised after update

We used “Custom Field” and “Custom Script” to modify a few forms. The custom field did not respond to our entry in “Insert After” during creation; the field was found at the bottom of the target DocType so we dragged the field into place in “Customise Form”. Then, we updated bench in the server using “bench update” and found that our customised forms were rearranged. The fields took their default positions and all the custom fields were sent to the bottom of the page. How can we address this issue?We want custom fields and relocated default fields to maintain their position after updates.

Thanks
Ashutosh Prasad

1 Like

Hello,

Get fixtures of Property Setter.
To retrieve fixtures put
fixtures = [‘Property Setter’] in custom app’s hooks.py file.

Thanks, Rohit

1 Like

Hi, i apprecuate that somebody is answering this long outstanding issue, but can we have some common person’s (non developer) explanation of a fix for this?

@Rohit, thanks for your response! The rearrangement of the forms was done in ERPNext so we tried to add the line you suggested to ./frappe-bench/apps/erpnext/erpnext/hooks.py. Unfortunately, there was no change; the custom fields continue to remain at the bottom of the page.

Hi Ashutosh,

After adding fixtures = [‘Property Setter’] in hooks.py file, have you run command bench export-fixtures? If no then run this command and then run bench update command

Thanks, Rohit

@Rohit, thanks again. We just tried that but there is still no change to the forms.

Hello,

Check the below steps once again.

  1. Relocate the custom fields using customize form.
  2. In app’s hooks.py file put fixtures = [‘Property Setter’]
  3. Run command bench use your_site_name and bench export-fixtures, after this system will make property_setter.json file under location /frappe-bench/erpnext/erpnext/fixtures/property_setter.json.
  4. Update your setup using bench update command.
  5. if still it’s not work then run bench migrate command.

Thanks, Rohit

2 Likes

@rohit_w, it only works if the Property Setters are generated after the update!

@Ashutosh_Prasad, for now do you need reorganize again the fields, and for prevent it in the next updates, use the suggested method by @rohit_w

@Ashutosh_Prasad, dont forget of keep your changes in your app!

@rohit_w
Thanks Its Working