Skip to content

Instantly share code, notes, and snippets.

View zachelrath's full-sized avatar

Zach McElrath zachelrath

View GitHub Profile
@zachelrath
zachelrath / NewCaseWithMap.xml
Created March 12, 2014 18:17
Skuid Page XML for "NewCaseWithMap" example
<skuidpage showsidebar="true" showheader="true" tabtooverride="Case">
<models>
<model id="Case" limit="1" query="false" createrowifnonefound="true" sobject="Case">
<fields>
<field id="Subject"/>
<field id="Status"/>
<field id="Priority"/>
<field id="Latitude__c"/>
<field id="Longitude__c"/>
</fields>
@zachelrath
zachelrath / LogACaseWeb.xml
Created March 25, 2014 23:00
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"/>
@zachelrath
zachelrath / ViewCaseWeb.xml
Created March 25, 2014 23:02
Skuid Page XML for viewing a Case as a Force.com Site Guest User, that allows you to upload Attachments to the Case, as well as to the named "skuid__Photo__c" Lookup to the skuid__Image__c (File) object
<skuidpage showsidebar="false" showheader="false" tabtooverride="Case">
<models>
<model id="Case" limit="1" query="true" createrowifnonefound="false" sobject="Case">
<fields>
<field id="CaseNumber"/>
<field id="CreatedDate"/>
<field id="Subject"/>
<field id="Description"/>
<field id="Status"/>
<field id="skuid__Photo__c"/>
<skuidpage showsidebar="false" showheader="true" tabtooverride="Account">
<models>
<model id="Account" limit="100" query="true" createrowifnonefound="false" sobject="Account">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
</fields>
<conditions/>
</model>
</models>
<skuidpage showsidebar="true" showheader="true" tabtooverride="Contact">
<models>
<model id="Contact" limit="100" query="true" createrowifnonefound="false" sobject="Contact">
<fields>
<field id="FirstName"/>
<field id="LastName"/>
<field id="CreatedDate"/>
</fields>
<conditions>
<condition type="param" value="accountid" field="AccountId" operator="=" enclosevalueinquotes="true"/>
<skuidpage showsidebar="false" showheader="true" tabtooverride="Contact">
<models>
<model id="ContactData" limit="1" query="true" createrowifnonefound="false" sobject="Contact">
<fields>
<field id="FirstName"/>
<field id="LastName"/>
<field id="CreatedDate"/>
<field id="AccountId"/>
<field id="Account.Name"/>
<field id="Email"/>
@zachelrath
zachelrath / OpportunityDetail.xml
Created April 24, 2014 20:39
Opportunity Detail page with "Shopping Cart" for picking Products / Line Items
<skuidpage showsidebar="false" showheader="true" tabtooverride="Opportunity">
<resources>
<labels/>
<javascript>
<jsitem location="inline" name="markCompleted" url="">skuid.snippet.registerSnippet('tasks.markCompleted',function(params){
// Mark all selected items as closed,
// then save our 2 Tasks models
var model = params.model,
list = params.list,
selectedItems = params.item ? [params.item] : list.getSelectedItems();
<skuidpage showsidebar="true" showheader="true" tabtooverride="Opportunity">
<models>
<model id="SortOrders" limit="100" query="true" createrowifnonefound="false" sobject="Sort_Order__c">
<fields>
<field id="Sort_Order__c"/>
<field id="Skuid_Page__c"/>
<field id="Skuid_Page__r.Name"/>
<field id="Model_Id__c"/>
</fields>
<conditions>
@zachelrath
zachelrath / Opportunity_withInlineEditablePreview.xml
Created May 7, 2014 18:03
An Opportunity detail page with a popup that lets you use a prototype Skuid markup language feature within "fragments" of HTML code to generate inline-editable Skuid Ui Fields
<skuidpage showsidebar="true" showheader="true" tabtooverride="Opportunity">
<models>
<model id="Opportunity" limit="1" query="true" createrowifnonefound="false" sobject="Opportunity">
<fields>
<field id="Name"/>
<field id="CreatedDate"/>
<field id="CloseDate"/>
<field id="Amount"/>
</fields>
<conditions>
@zachelrath
zachelrath / PendingApprovalItemsForUserGroups.xml
Created July 3, 2014 15:27
Skuid Page that shows Pending Approval Items for the User or for any Groups that the user is a part of, either directly or indirectly
<skuidpage showsidebar="true" showheader="true" tabtooverride="User">
<models>
<model id="UserGroups" limit="20" query="true" createrowifnonefound="false" sobject="Group">
<fields>
<field id="Name"/>
<field id="DeveloperName"/>
<field id="Type"/>
</fields>
<conditions>
<condition type="join" value="" field="Id" operator="in" enclosevalueinquotes="true" joinobject="GroupMember" joinfield="GroupId" logic="">