How to reset a form design?

shoobadoop
Tera Contributor

Hello,

I was recently trying to create custom variables for the Contract form, but a problem occurred. I'm not sure what happened, but basically the entire form has been deleted! Is there any way to set the form back to its default state?

Thank you!

1 ACCEPTED SOLUTION

LaurentChicoine
Tera Guru

Hi Alexander,



When you update a form layout using the form design, it creates a Form Layout update.



Versions of this form layout are stored in sys_update_version (you can go in this table by typing sys_update_version.list in the filter navigator).



Inside this list, order by Created Date/Time to see the latest updates and filter with a Name that starts with sys_ui_section.



Once you find the right record (See the field Record name which will contain the table name (Contract)), go in the Version related list and revert to the Previous version which was OK.




I've attached a XML export of the default form layouts for the Contact Table (OOTB as Helsinki), in case you can't find the right version of your form layout.


View solution in original post

10 REPLIES 10

Which table are you actually looking to reset the form layout?



In your initial request you mentionned "Contract form", so I assumed you wanted to reset the form layout for the Contract table (ast_contract). On your print screen, I see Sales. Could you tell me for which table are you trying to reset the form (system name if possible)?



As you don't have the previous version saved, I can only help you by sending you the OOTB XML set which I need the right table to do so.



If the table you are trying to reset is really "ast_contract" then I can help you to try something else but at that point you would maybe be better to rebuild the form from scratch.


It is indeed the Contracts table that I'm trying to restore. Here is how my problem arose:



  1. I tried adding a custom section called "Sales" to the Contract form. I added some string variables to this new section (Customer, Invoice Date, etc.)
  2. I pressed the save button.
  3. I tried to create a new contract, and was greeted by the second picture in my last post.


I have no idea why ServiceNow decided to delete everything from the Contract form, but that's what happened. Now when I go into the Contracts form designer, this is what it looks like:


Untitled 5.png


I tried to reproduce the issue (deleting every sections in the form design) in my personnal sandbox and just as you, I could not import the update set I gave you. It seems like these Form layout record even if kept in seperate record need to be imported as a single one. So I instead took an XML generated inside an update set in FUJI (as I removed everything in my Helsinki instance).



I tried it in my instance and this XML worked successfully.


It still doesn't look like it's working I'm so sorry to trouble you like this! Here's a rundown of what I'm doing:



  1. I'm in the Contract --> Service table. It's showing the default contracts there.
  2. I right-click the Number header, and click on Import XML.
  3. I upload the document you attached in your last message.
  4. The Contract form stays the same.


Here's my current release information, in case that would help you:



Build name: HEAD (Fuji)


Build date: 10-29-2015_1529


Build tag: glide-fuji-12-23-2014__patch10-10-21-2015


What I sent you is a reset for the default view, please check that you are using the defautl view in the form (right click header -> View - Default view).



Otherwise you could try to recreate the form layout manually, it should be faster than to troubleshoot the issue. Here is a screenshot from the default form design OOTB:


2016-05-16_20-25-55.png