How to create a button on record producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-18-2020 11:22 PM
Dear Developers,
I want to generate an offer letter after clicking a button on record producer as belo
aNow my requirement is
11. How to create "Geneare Off Ltr" button on Record producer.
22. when i click on this button , it will download an offer letter(in Word Format) according to the Nationality(Let's say inida, india offer letter will create, if germany - Germany offer letter will be created.) and these offer letter templates are created on a table already and the table name is let's say NTL_OFR_LTR where 12 countries offer letter templates are created.
pPlease help me on how to achieve this requirement.
ss

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-18-2020 11:36 PM
Hi Manmathpanda
as per my knowledge,
Adding Buttons to Record Producer is possible using UI Page/UI Macro/Portal Pages, once you are done with the button code in any one of them create a variable on record producer with type to UI Page or Macro or Macro with Lable. If you use portal page (widget), then select a Macro and in the default values select the widget.
You can create a new UI page or you can update the UI page: com.glideapp.servicecatalog_cat_item_view which is used for displaying a record producer.
You can get the sys_id of catalog through the link, and only for that ID, create 2 buttons. I believe you might have accomplished it that far.onClick of these buttons you can make a glideAjax call to script includes, which can then be used to perform updates on state field.
refer the DOC:-https://community.servicenow.com/community?id=community_question&sys_id=58fba4c6db663f044819fb243996...
Please Mark Correct and Helpful
Thanks and Regards
Gaurav Shirsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-18-2020 11:49 PM
Hi,
you can have a button created by using variable of type UI page or UI macro
On click of button you would require custom code to generate the word file and download it
for generating word/pdf files sharing few links:
Mark ā
Correct if this solves your issue and also mark š Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-18-2020 11:59 PM
Hi Manmathpanda,
Adding to Gaurav's point, you can create a link directly to the attachment record. For example,
https://YOURINSTANCE.service-now.com/sys_attachment.do?sys_id=3cc358dadb8be2002e38711ebf96190d
You may need a simple UI macro that you can place on the form that says "Geneare Off Ltr".
http://wiki.servicenow.com/index.php?title=UI_Macros
If my answer helped you in any way, mark answer as helpful and correct.
Thanks and regards,
Megha.