0

I have made custom component using datatable in lwc and in dropdown there is button for "Upload New Version" for files. i want to navigate to standard page using navigation but some how due to actionName improper page is not navigated to standard page. Is navigation not possible for Upload New Version in files ?

newVersion(currentRow)
  {
    const seletedRow = currentRow.value;
      console.log('seletedRow:' , seletedRow)

      this[NavigationMixin.Navigate]({
          type: 'standard__objectPage',
          attributes: {
              recordId: seletedRow,
              objectApiName: 'ContentVersion',
              actionName: 'NewVersion'
          }
      }); 

  }

1 Answer 1

0

I am afraid if this is possible without replicating the entire file upload functionality thorugh LWC and Apex.

Rather you can take benefit with the filepreview named page to have the document preview, and let User manually update a new version from the standard preview page. In your Datatable you can list down all the files and open the standard file preview with onRowAction, and Users can update a new version there.

docPreview() {
    this[NavigationMixin.Navigate]({
        type: 'standard__namedPage',
        attributes: {
            pageName: 'filePreview'
        },
        state: {
            recordIds: '0690o00000W1G5YAAV' //your ContentDocumentId here
        }
    });
}
1
  • Thanks for help and suggestion.. !! Nov 18, 2022 at 17:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .