Skip to content

Instantly share code, notes, and snippets.

@zachelrath
Created March 25, 2014 23:00
Show Gist options
  • Save zachelrath/9773371 to your computer and use it in GitHub Desktop.
Save zachelrath/9773371 to your computer and use it in GitHub Desktop.
Skuid Page XML for logging a Case from a Force.com Site and pre-creating a skuid__Image__c record that gets thrown into a "skuid__Photo__c" field on the new Case.
<skuidpage showsidebar="true" showheader="true" tabtooverride="Case">
<models>
<model id="CasePhoto" limit="1" query="false" createrowifnonefound="true" sobject="skuid__Image__c">
<fields/>
<conditions/>
</model>
<model id="Case" limit="1" query="false" createrowifnonefound="true" sobject="Case">
<fields>
<field id="Subject"/>
<field id="Description"/>
</fields>
<conditions>
<condition type="modelmerge" value="" field="skuid__Photo__c" operator="=" model="CasePhoto" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="noquery"/>
</conditions>
</model>
</models>
<components>
<pagetitle model="CasePhoto">
<maintitle>New {{$Model.Case.label}}</maintitle>
<subtitle>{{$Model.Case.labelPlural}}</subtitle>
<actions>
<action type="savecancel" afterCancel="/products" afterSave="/apex/skuid__UI?page=ViewCaseWeb&amp;id={{$Model.Case.data.0.Id}}" window="self">
<models>
<model>Case</model>
</models>
</action>
</actions>
</pagetitle>
<basicfieldeditor showsavecancel="false" showheader="true" model="Case" mode="edit">
<columns>
<column width="50%">
<sections>
<section title="Basics">
<fields>
<field id="Subject"/>
<field id="Description"/>
</fields>
</section>
</sections>
</column>
<column width="50%">
<sections>
<section title="Additional Info">
<fields/>
</section>
</sections>
</column>
</columns>
</basicfieldeditor>
</components>
<resources>
<labels/>
<css/>
<javascript/>
</resources>
</skuidpage>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment