79147722

Date: 2024-11-01 10:49:25
Score: 1
Natty:
Report link

In the community it will openup in a new window for this code and i didnt find a way to pop-up in the same window as it shows in the internal salesforce org :(

`this[NavigationMixin.Navigate]({
    type: 'standard__webPage',
    attributes: {
        url: DistributionPublicUrl
    }
});`

and this below approaches we take us to the detail page of contentDocument in the new tab when we try to open in community

 `this[NavigationMixin.Navigate]({
        type: 'standard__namedPage',
        attributes: {
            pageName: 'filePreview'
        },
        state : {
            selectedRecordId: file.ContentDocumentId
        }
    })`
this[NavigationMixin.Navigate]({
        type: 'standard__namedPage',
        attributes: {
            pageName: 'filePreview'
        },
        state : {
            selectedRecordId: file.ContentDocumentId
        }
    })
Reasons:
  • Blacklisted phrase (1): :(
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: pavi