how to generate and view pdf on single click

Certified Senior Developer

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,

  Discussion posts and replies are publicly visible

  • 0
    Certified Senior Developer

    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.

  • 0
    Certified Lead Developer

    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.

  • 0
    Certified Senior Developer

    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) */