Select Models from Page Includes

Pat VachonPat Vachon 💎💎💎
edited June 25, 2020 in Ideas



9
9 votes

Awaiting Review · Last Updated

Comments

  • Amy DewaalAmy Dewaal 💎
    edited May 23, 2018
    Pat,

    That would be helpful, thanks for the idea! Vote this up if you would like to see this so the devs know how important this is as they consider ideas for a future release.

    Thanks!
    Amy
  • edited March 25, 2019
    Where can someone go and vote for this idea?
  • edited June 25, 2020
    This can still be achieved by using snippets ( refer - https://community.skuid.com/skuid/topics/call-snippet-from-snippet?topic-reply-list%5Bsettings%5D%5B...)

    1. So create a snippet in your included page to return the model(s) data you want to save.
    2. Invoke this snippet in the javascript that runs on click of save button.


  • Amy DewaalAmy Dewaal 💎
    edited December 16, 2016
    If you click into an idea on the community, you'll see two buttons at the top right of the page next to the title of the issue. The top button is "Vote." 
  • Pat VachonPat Vachon 💎💎💎
    edited October 18, 2016
    Yes. Understood. Have used snippets for many things. Prefer to have this be declarative if possible. That way those without js skills can do this as well.
  • Pat VachonPat Vachon 💎💎💎
    edited June 25, 2020
    ^^^ bump ^^^
     
    Having a detail record with a skuid page for each  relates listsis my preferred best practice. With a custom component I've built to register models from page includes to the Save/Cancel on the detail skuid page has enabled me to make use of related list skuid pages both in detail pages and tab pages.

    If Skuid can enabled models to be selected from action framework would make this practice more accessible to others via declarative means .
  • Bill McCulloughBill McCullough 💎💎
    edited May 13, 2018
    Pat,

    Have you tried an Action Sequence tied to an Event?  You can 'publish' a 'Save' event from your detail page that your page include will see and run its 'Save' action sequence for the model/models on your page include.

    Thanks,

    Bill
  • Bill McCulloughBill McCullough 💎💎
    edited May 15, 2018
    Pat,

    Here are 2 pages that demonstrate using 'Publish Event' to Save and Cancel a related list in a tab on a detail page.  You will need to install both pages and have (at least) Skuid 11.0.2 installed to try this.

    I have a Contact detail page with a tab for related files (Content Document).  This tab has a file upload component and a page include to a table of content document links.  The page include reacts to a Save or Cancel from the detail page.  Upon successful upload, the file upload component will requery the table of content document links.  This is all handled declaratively by publishing an event.

    Thanks,

    Bill

    Contact Detail:
    <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="multi" uniqueid="sk-zZmyt-88" window="self" label="Save" icon="sk-icon-save">
                        <models>
                            <model>ContentDocumentLink</model>
                        </models>
                        <savehotkeys>
                            <hotkey key="s" modifiers="ctrl"/>
                        </savehotkeys>
                        <actions>
                            <action type="save">
                                <models>
                                    <model>Contact</model>
                                </models>
                            </action>
                            <action type="publish" scope="skuid" event="SaveChanges">
                                <params/>
                            </action>
                        </actions>
                    </action>
                    <action type="multi" label="Cancel" uniqueid="sk-1XDq-676" icon="sk-icon-cancel">
                        <actions>
                            <action type="cancel">
                                <models>
                                    <model>Contact</model>
                                </models>
                            </action>
                            <action type="publish" scope="skuid" event="CancelChanges">
                                <params/>
                            </action>
                        </actions>
                    </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="chatterfeed">
                                <uploadsuccessactions>
                                    <action type="publish" behavior="standard" model="ContactFeed" scope="skuid" event="Requery">
                                        <models>
                                            <model>ContentDocumentLink</model>
                                        </models>
                                        <params/>
                                    </action>
                                </uploadsuccessactions>
                                <uploadfailureactions/>
                                <renderconditions logictype="and"/>
                            </file>
                            <includepanel type="skuid" uniqueid="sk-1XDq-458" pagename="ContentDocumentPageInclude" querystring="id={{{$Model.Contact.data.0.Id}}}"/>
                        </components>
                    </tab>
                </tabs>
            </tabset>
        </components>
        <resources>
            <labels/>
            <css/>
            <javascript/>
            <actionsequences uniqueid="sk-2RUGHd-473"/>
        </resources>
        <styles>
            <styleitem type="background" bgtype="none"/>
        </styles>
        <interactions/>
    </skuidpage>
    Page include:
    <skuidpage showheader="true" personalizationmode="server" showsidebar="true" tabtooverride="Contact">
        <models>
            <model id="UIOnlyContentDocPI" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
                <fields>
                    <field id="Id" displaytype="REFERENCE" label="Id" defaultvaluetype="param" defaultValue="id" enclosevalueinquotes="true" value="id" ogdisplaytype="TEXT" datasource="salesforce">
                        <batchfields/>
                    </field>
                </fields>
                <conditions/>
                <actions/>
            </model>
            <model id="ContentDocumentLink" datasource="salesforce" createrowifnonefound="false" query="true" sobject="ContentDocumentLink" limit="20" processonclient="true">
                <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="" field="LinkedEntityId" fieldtargetobjects="Account,Asset,AssetRelationship,Campaign,Case,ChannelProgram,ChannelProgramLevel,CollaborationGroup,Contact,ContactAccountJunction__c,ContentWorkspace,Contract,Dashboard,DashboardComponent,EmailMessage,EmailTemplate,Event,Ghost__c,Goal,Lead,ListEmail,Metric,Network,Opportunity,Order,OrderItem,Organization,OutgoingEmail,PartnerFundAllocation,PartnerFundClaim,PartnerFundRequest,PartnerMarketingBudget,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,Survey,Task,Topic,User,WorkCoaching,WorkFeedbackRequest,WorkPerformanceCycle,bt_stripe__Blackthorn_Terminal__c,bt_stripe__Company_Location__c,bt_stripe__Company__c,bt_stripe__Dispute_Evidence__c,bt_stripe__Dispute__c,bt_stripe__Location__c,bt_stripe__Payment_Gateway__c,bt_stripe__Payment_Method__c,bt_stripe__Payment_Schedule__c,bt_stripe__Reattempt_Settings__c,bt_stripe__Stripe_Customer__c,bt_stripe__Stripe_Settings__c,bt_stripe__Studio_App__c,bt_stripe__Transaction_Field__c,bt_stripe__Transaction_Validation_Rules__c,bt_stripe__Transaction__c,bt_stripe__Webhook_Event__c,skuid__Auth_Provider_Credential__c,skuid__Auth_Provider__c,skuid__Component_Pack__c,skuid__Encryption_Settings__c,skuid__Feedback_Response__c,skuid__Feedback__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" operator="=" model="UIOnlyContentDocPI" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="noquery"/>
                </conditions>
                <actions/>
            </model>
        </models>
        <components>
            <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>
        <resources>
            <labels/>
            <css/>
            <javascript/>
            <actionsequences uniqueid="sk-2RUGHd-473">
                <actionsequence id="504b6d62-a44a-4546-9102-2dbfb91cfef3" label="Requery" type="event-triggered" event-scope="skuid" event-name="Requery">
                    <description/>
                    <actions>
                        <action type="requeryModel" model="ContentDocumentLink" behavior="standard"/>
                    </actions>
                </actionsequence>
                <actionsequence id="57c401b2-a824-44ff-afcd-7af56a1ed57b" label="SaveChanges" type="event-triggered" event-scope="skuid" event-name="SaveChanges">
                    <description/>
                    <actions>
                        <action type="save">
                            <models><
  • Pat VachonPat Vachon 💎💎💎
    edited May 16, 2018
    forehead meets palm

    Thanks!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!