can we create field through script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2019 03:23 AM
i need to insert skill and experience if user have multiple skills so based on user create number of fields in record producer (like in form name and value type field i need alter native to name and value type ) please solve this......!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2019 03:48 AM
Hello Venkat,
Create a record using script in the sys_dictionary table with table name and type of the field and then you would have to create a record in the Section Element (sys_ui_element) table. You would need to know the Form Section (sys_ui_section) the element should be on and the Form (sys_ui_form) that section is on.
Mark Correct if it solved your issue.
Regards,
Tushar Sharma
www.dxsherpa.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2019 03:55 AM
Hi,
If your instance is London version and above, you can create a variable set on the record producer which is of multi row type. This way you can give user a way to add a set of fields dynamically.
check this link
London version:
https://docs.servicenow.com/bundle/london-it-service-management/page/product/service-catalog-management/concept/c_ServiceCatalogVariableSets.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2019 03:58 AM
TLDR; Yes, but best practice is , you should not.
Why not, fields are just a dictionary records. so you can keep creatin records.
But i would definetely not advice the same , as there could be several other background things going to be affected during its creation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2019 04:00 AM
I misintrepreted your question, as your subject line is misleading.
so you want to create record producers to update fields on some sys_ table?
then the answer is, NO you cannot map.
But yes you can script to gliderecord those table and set it up accordingly.
something like var gr= new GlideRecord('table');
gr.insert();
gr.field= producer.field;