Generate download link when clicking on button

Certified Senior Developer

Hi there,

I have created a button to generate CSV file but after clicking on button- page redirects to home page. 
I want to create document link when clicking on button so that file get downloaded. How can I do this in interface?

Thanks

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    a!buttonArrayLayout(
    buttons: {
    a!buttonWidget_23r3(
    label: "Generate File",
    value: cons!IPA_VAL_DATA,
    saveInto: {
    ri!buttonValue,
    a!save(
    ri!assign.preparedby,
    local!loggedInUser
    ),
    a!startProcess(
    processModel: cons!IPA_DATA_PROCESS_MODEL,
    processParameters: {
    employee:ri!employee,
    address:ri!address,
    tax:ri!tax,
    assigne:ri!assigne
    buttonValue:ri!buttonValue
    },
     onSuccess: {
                    a!save(local!docId,fv!processInfo),
                    )
                  },
                  onError: a!save(
                    local!errorMessage,
                    "Error Exporting File to Excel"
                  )
    )
    },
    
    submit: false(),
    validate: false(),
    style: "SECONDARY",
    
    )
    },
    align: "START",
    marginAbove: "STANDARD"
    ),

Children