How to create a record from inside of workspace ?

Sanket1
Giga Contributor

I am able to add fields values using the form fields component from UI Builder, but the question is how I can submit it, I mean how to configure submit button so that record will get created 

[ No Submit Button ]

CAN ANYONE PLEASE HELP WITH THE STEPS TO CONFIGURE SUBMIT BUTTON

find_real_file.png

1 ACCEPTED SOLUTION

Kirankumar Amba
ServiceNow Employee
ServiceNow Employee

Form fields does not support the use of ui actions. It is mainly intended to be as a read only component. You have to use Form component to be able to support ui actions.

Steps to create a form:

  • Take a Form component. Add a Glide Form data broker from @servicenow/now-record-form-connected application

find_real_file.png

  • Update the details for the data broker instance:
    • Table: incident
    • SysID: -1 (for any new record)

find_real_file.png

  • Now you have form data available in @data.glide_form_1 prop
  • Update your form config:
    • Sections: @data.glide_form_1.nowRecordFormBlob.sections
    • Fields: @data.glide_form_1.nowRecordFormBlob.fields
    • Table: incident

find_real_file.png

  • By now, you should have your form ready
  • Next step: Setting up UI actions
  • Add a Action Bar component on the top of form and update the config as: 
    • Actions: @data.glide_form_1.nowRecordCommonUiactionbar.actionNodes

find_real_file.png

  • That's it! You should have your form ready with a save action. Try creating an incident. It should work as expected. 

Let me know if it works or you have any doubts. Thanks!

 

View solution in original post

11 REPLIES 11

Kirankumar Amba
ServiceNow Employee
ServiceNow Employee

Form fields does not support the use of ui actions. It is mainly intended to be as a read only component. You have to use Form component to be able to support ui actions.

Steps to create a form:

  • Take a Form component. Add a Glide Form data broker from @servicenow/now-record-form-connected application

find_real_file.png

  • Update the details for the data broker instance:
    • Table: incident
    • SysID: -1 (for any new record)

find_real_file.png

  • Now you have form data available in @data.glide_form_1 prop
  • Update your form config:
    • Sections: @data.glide_form_1.nowRecordFormBlob.sections
    • Fields: @data.glide_form_1.nowRecordFormBlob.fields
    • Table: incident

find_real_file.png

  • By now, you should have your form ready
  • Next step: Setting up UI actions
  • Add a Action Bar component on the top of form and update the config as: 
    • Actions: @data.glide_form_1.nowRecordCommonUiactionbar.actionNodes

find_real_file.png

  • That's it! You should have your form ready with a save action. Try creating an incident. It should work as expected. 

Let me know if it works or you have any doubts. Thanks!

 

Thanks for detaild steps

If it helps you, consider accepting the solution so that others can find it easier. Thanks! 

Can you please specify how to popup notification after record is saved / created

May be you can make use of Client scripts for that. Not exactly sure of it.