View "In Content Document"

Bill,

In looking at your video, I think the setup of your deck needs to be adjusted. I think you should set your Deck component to use the ‘AccountContentDocumentLink’ model. In your AccountContentDocumentLink model, add the field ‘LatestPublishedVersionId’ which you can see ‘through’ the ContentDocumentId field. Then you can change the URL on your Click action to be:

/lightning/r/ContentDocument/{{{ContentDocument.LatestPublishedVersionId}}}/view

You can also try this simple page. It’s meant to be used in a Page Include. You must have Lightning Experienced enabled and you need to pass 1 parameter:

linkid={{{$Model.modelName.data.0.Id}}}

Where the ‘linkid’ is the Id from your "CR_FIle_DNA__c’ object (or any other object that supports Files (i.e. Account, Contact, Opportunity; etc.).

This page only uses the ContentDocumentLink object.

<skuidpage unsavedchangeswarning="no" personalizationmode="server" showsidebar="false" useviewportmeta="true" showheader="false">
    <models>
        <model id="ContentDocumentLinkPI" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="ContentDocumentLink">
            <fields>
                <field id="ContentDocumentId"/>
                <field id="ContentDocument.Title"/>
                <field id="LinkedEntityId"/>
                <field id="LinkedEntity.Name"/>
                <field id="ShareType"/>
                <field id="Id"/>
                <field id="Visibility"/>
                <field id="ContentDocument.LatestPublishedVersionId"/>
                <field id="ContentDocument.LatestPublishedVersion.Title"/>
            </fields>
            <conditions>
                <condition type="param" value="linkid" field="LinkedEntityId" fieldtargetobjects="" state="" operator="=" enclosevalueinquotes="true" novaluebehavior="noquery"/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <deck searchmethod="server" searchbox="true" columngutter=".75em" rowgutter=".75em" model="ContentDocumentLinkPI" filtersposition="top" filterswidth="150px" showsavecancel="false" behavior="flex" verticalalign="top" ratio="1" minwidth="350px" uniqueid="sk-sQAlT-219" buttonposition="" pagesize="10">
            <components>
                <image source="url" uniqueid="sk-sQE0g-236" datasource="salesforce" behavior="none" model="ContentDocumentLinkPI" url="/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB240BY180&amp;amp;versionId={{{ContentDocument.LatestPublishedVersionId}}}">
                    <styles>
                        <styleitem type="itemsize" width="custom">
                            <styles>
                                <styleitem property="width" value="240px"/>
                            </styles>
                        </styleitem>
                        <styleitem type="border"/>
                    </styles>
                    <conditions>
                        <condition type="contextrow" field="Id" mergefield="Id" operator="="/>
                    </conditions>
                </image>
            </components>
            <massactions/>
            <interactions>
                <interaction type="tap" direction="either">
                    <action type="redirect" window="self" url="/lightning/r/ContentDocument/{{{ContentDocument.LatestPublishedVersionId}}}/view">
                        <models/>
                        <popup title="{{Model.label}}: {{Name}}" width="80%">
                            <components/>
                        </popup>
                    </action>
                </interaction>
            </interactions>
            <actions/>
            <styles>
                <styleitem type="border"/>
            </styles>
        </deck>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>

Thanks,

Bill