Now that I am storing documents as the new salesforce files I thought the name might be AttachedContentDocument? But I cannot query the object. Where do I find the object in the Skuid models?
Page 1 / 1
Have you tried using the object ContentDocumentLink instead? You could put a condition on that model where the LinkEntityID is the Deposit ID and the last table shows all files. That might be what you’re looking for. I know that object can be queried.
Sometimes Skuid is strapped by what Salesforce allows us to query.
Bill,
Here is a Contact Detail page that demonstrates how to link to the ContentDocumentLink table and display your files.
Thanks,
Bill
<skuidpage showheader="true" personalizationmode="server" showsidebar="true" tabtooverride="Contact"> <models> <model id="Contact" datasource="salesforce" createrowifnonefound="false" query="true" sobject="Contact" limit="1"> <fields> <field id="FirstName"/> <field id="LastName"/> <field id="CreatedDate"/> <field id="MailingCity"/> <field id="MailingStreet"/> <field id="MailingState"/> <field id="MailingCountry"/> <field id="MailingPostalCode"/> <field id="MailingLatitude"/> <field id="MailingLongitude"/> <field id="LastModifiedDate"/> <field id="Phone"/> <field id="Email"/> <field id="Id"/> <field id="AccountId"/> <field id="Account.Name"/> <field id="MailingGeocodeAccuracy"/> <field id="Birthdate"/> <field id="DaysOld" readonly="true" displaytype="FORMULA" label="Days Old" ogdisplaytype="TEXT" uionly="true" returntype="DOUBLE" scale="0" precision="9"> <formula>(TODAY() - {{Birthdate}})/86400000</formula> </field> <field id="RecordTypeId"/> <field id="RecordType.Name"/> </fields> <conditions> <condition type="param" value="id" enclosevalueinquotes="true" field="Id" operator="="/> </conditions> <actions/> </model> <model id="ContentDocumentLink" datasource="salesforce" createrowifnonefound="false" query="true" sobject="ContentDocumentLink" limit="20"> <fields> <field id="ContentDocumentId"/> <field id="ContentDocument.Title"/> <field id="LinkedEntityId"/> <field id="LinkedEntity.Name"/> <field id="ContentDocument.LatestPublishedVersionId"/> <field id="ContentDocument.LatestPublishedVersion.Title"/> <field id="Id"/> <field id="ContentDocument.Id"/> <field id="ContentDocument.LatestPublishedVersion.Id"/> </fields> <conditions> <condition type="modelmerge" value="" model="Contact" enclosevalueinquotes="true" field="LinkedEntityId" operator="=" mergefield="Id" novaluebehavior="noquery" fieldtargetobjects="Account,Asset,Campaign,Case,CollaborationGroup,Contact,ContactAccountJunction__c,ContentWorkspace,Contract,Dashboard,DashboardComponent,EmailMessage,EmailTemplate,Event,Ghost__c,Lead,Network,ObjectFromEmailAcceptedFields__c,ObjectFromEmailDefaultFields__c,Opportunity,Order,OrderItem,Organization,Product2,Quote,Report,SDOC__SDField__c,SDOC__SDJob__c,SDOC__SDRelationship__c,SDOC__SDTemplate__c,SDOC__SDoc__c,SDOC__SDocsSettings__c,Site,Solution,Sort_Order__c,Store__c,Task,Topic,Trove__TroveConfiguration__c,User,abc__c,cdrive__AWS_Account__c,cdrive__AWS_S3_Configurations__c,cdrive__AWS_Set_UP__c,cdrive__Cloud_Files__c,skuid__Auth_Provider__c,skuid__Component_Pack__c,skuid__Encryption_Settings__c,skuid__Image__c,skuid__Model_Service_Adapter__c,skuid__Model_Service_Credential__c,skuid__Model_Service__c,skuid__Page_Assignment__c,skuid__Page_Interaction__c,skuid__Page_Version__c,skuid__Page__c,skuid__Personalization_Settings__c,skuid__Preferences__c,skuid__Theme__c,z_ChildRelationship__c,z_FieldDescription__c,z_MetaDumpSetting__c,z_SObjectDescription__c,z_SchemaTemp__c"/> </conditions> <actions/> </model> </models> <components> <pagetitle uniqueid="sk-2nnOO--83" model="Contact"> <maintitle> <template>{{FirstName}} {{LastName}}</template> </maintitle> <subtitle> <template>{{Model.label}}</template> </subtitle> <actions> <action type="savecancel" uniqueid="sk-zZmyt-88" window="self"> <models> <model>ContentDocumentLink</model> </models> <savehotkeys> <hotkey key="s" modifiers="ctrl"/> </savehotkeys> </action> </actions> </pagetitle> <tabset uniqueid="sk-2nnZAZ-122" renderas="" defertabrendering="true" rememberlastusertab="true"> <tabs> <tab name="Demographics"> <components> <basicfieldeditor uniqueid="sk-2nnOO--84" model="Contact" mode="read" showsavecancel="false" layout="" showheader="true"> <columns> <column width="50%"> <sections> <section title="Basics" collapsible="no"> <fields> <field id="FirstName" uniqueid="sk-zZmzM-96"/> <field id="LastName" uniqueid="sk-zZmzP-98"/> <field id="Phone" type="CUSTOM" uniqueid="sk-zaxUD-370" cssclass="phone_us" snippet="businessPhoneRender" valuehalign=""/> <field id="Email" type="" uniqueid="sk-13zjI1-245" valuehalign=""/> <field id="AccountId" type="" uniqueid="sk-1VHq5D-261" pagesize="5" valuehalign="" optionsource="" redirecttype="datasourcedefault"> <searchfields soslfields="All Fields" usesosl="true"/> <filters/> <renderconditions logictype="and" onhidedatabehavior="keep"/> <enableconditions/> </field> <field id="Birthdate" uniqueid="sk-22tbDe-276"/> <field id="DaysOld" uniqueid="sk-22toXU-369"/> </fields> </section> <section title="Description" collapsible="no"> <fields> <field uniqueid="sk-2N52ME-553" id="RecordTypeId"/> </fields> </section> </sections> </column> <column width="50%"> <sections> <section title="Geo" collapsible="no"> <fields> <field id="MailingGeocodeAccuracy" type="" uniqueid="sk-3yi_Cg-289" valuehalign=""/> <field id="MailingLatitude" uniqueid="sk-zZmzV-101"/> <field id="MailingLongitude" uniqueid="sk-zZmzW-103"/> </fields> </section> <section title="Address" collapsible="no"> <fields> <field id="MailingStreet" uniqueid="sk-zZmzp-115"/> <field id="MailingCity" uniqueid="sk-zZmzq-117"/> <field id="MailingState" uniqueid="sk-zZmzr-119"/> <field id="MailingPostalCode" uniqueid="sk-zZmzv-121"/> <field id="MailingCountry" uniqueid="sk-zZmzz-123"/> </fields> </section> </sections> </column> </columns> </basicfieldeditor> </components> </tab> <tab name="Content Document" loadlazypanels="true"> <components> <file datasource="salesforce" uniqueid="sk-1Yfw5z-376" model="Contact" displayas="filename" storeas="contentdocumentwithrecord"> <uploadsuccessactions> <action type="requeryModels" behavior="standard" model="ContactFeed"> <models> <model>ContentDocumentLink</model> </models> </action> </uploadsuccessactions> <uploadfailureactions/> <renderconditions logictype="and"/> </file> <skootable uniqueid="sk-1MPZvX-293" model="ContentDocumentLink" mode="read" buttonposition="" createrecords="false" pagesize="10" showexportbuttons="false" searchbox="true" searchmethod="server" showerrorsinline="true" showsavecancel="false" showconditions="true" allowcolumnreordering="true" responsive="true" alwaysresetpagination="false"> <fields> <field id="ContentDocumentId" uniqueid="fi-1MPhMg-312" hideable="true" pagesize="5"> <searchfields/> </field> <field type="COMBO" hideable="true" uniqueid="fi-2ooSE_-1827" allowhtml="true"> <label>Download</label> <template>&lt;a target="_blank" href="/sfc/servlet.shepherd/version/download/{{{ContentDocument.LatestPublishedVersionId}}}"&gt;{{{ContentDocument.Title}}}&lt;/a&gt;</template> </field> <field type="IMAGE" hideable="true" uniqueid="fi-118N-1486" columnwidth="180px"> <label>Image</label> <url>/sfc/servlet.shepherd/version/renditionDownload?rendition=THUMB240BY180&amp;versionId={{{ContentDocument.LatestPublishedVersionId }}}</url> </field> </fields> <rowactions> <action type="edit"/> <action type="delete"/> </rowactions> <massactions usefirstitemasdefault="true"> <action type="massupdate"/> <action type="massdelete"/> </massactions> <views> <view type="standard"/> </views> </skootable> </components> </tab> </tabs> </tabset> </components> <resources> <labels/> <css/> <javascript/> <actionsequences uniqueid="sk-2RUGHd-473"/> </resources> <styles> <styleitem type="background" bgtype="none"/> </styles> <interactions/> </skuidpage>
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.