Skip to main content
November 9, 2023
Question

how to generate and view pdf on single click

  • November 9, 2023
  • 3 replies
  • 0 views

I have a requirement to generate and view PDF on single click , how can i do ?

now i am generating then viewing pdf using start process, is there any way to do in one click

thanks,

3 replies

November 9, 2023

Try to use Record Action for it. The process would generate the PDF and show the pdf as well. Enable the activity chaining as well.

stefanhelzle0001
Brainy
November 9, 2023

When you enable process chaining up to the node that creates the PDF, you can fetch the ID of the generated document from your UI. Feed that into a document viewer.

November 9, 2023

a!gridColumn(
label: "Doc View",
value: a!recordActionField(
actions: {
a!recordActionItem(
action: 'recordType!{recordTypeName.action.viewDocument',
identifier: fv!identifier
)
},
style: "LINKS",
display: "ICON",
openActionsIn: "DIALOG",
align: "CENTER"
),
align: "CENTER",
width: "1X"
)

Hi, Try to create an action in record and call it , as mentioned above.When you click that icon you can open your doc with one click

{
a!sectionLayout(
label: document(ri!document, "name"),
labelSize: "MEDIUM_PLUS",
contents: {
a!documentViewerField(document: ri!document)
},
divider: "ABOVE",
showWhen: a!isNotNullOrEmpty(ri!document)
)
}

/*In record action attach a process model -> in that PM give only one UI -> and that UI contains above bold code(pass doc Id as ruleinput to UI) */