Skip to content

Instantly share code, notes, and snippets.

View frontendloader's full-sized avatar

Ben Dvorachek frontendloader

View GitHub Profile
@frontendloader
frontendloader / index.js
Last active February 12, 2017 23:34
and condition on remote object query
var queue = new SObjectModel.Group();
var criteria = {
where: {
Name: {
like: event.target.value +'%',
and: {
Type: {eq: 'Queue'}
}
},
}
<apex:page controller="OuterClass" extensions="InnerClass">
<apex:outputText value="{!testString}"/>
<apex:form>
<apex:commandButton value="Click Me" action="{!testIt}"/>
<apex:commandButton value="Next Page" action="{!nextPage}"/>
</apex:form>
</apex:page>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
jQuery(document).ready(function ($) {
//reqfields variable must be individually set up for each form
//keys are fields that can be conditionally set to required
//values are a list of field values that cause those fields to be required
//field tfa_981 is hardcoded to be the only field that controls whether or not 937, 938, 1092 and 1095 are required
//or not in this instance.
var reqfields = {
"tfa_937": ["tfa_1107", "tfa_1109", "tfa_1110", "tfa_1111", "tfa_1112", "tfa_1113", "tfa_1115", "tfa_1118", "tfa_1119", "tfa_1120", "tfa_1121", "tfa_1122"],
@frontendloader
frontendloader / ReadMe.md
Created October 1, 2014 21:10
Salesforce Multiple Spaces in a row in a picklist option.

Create two picklists on the case object. Make PicklistOne control PicklistTwo.

  1. Add an option to PicklistOne of "A"
  2. Add an option to PicklistTwo of "B C" Note that there are two spaces between B and C
  3. Open the visualforce page and feed an id to it like so /apex/TestVFPage?id=500S0000xxxx
  4. Select "A" in PicklistOne.
  5. Select "B C" in PicklistTwo.
  6. Click "Click Me"
  7. The value in PicklistTwo is cleared.
@frontendloader
frontendloader / README.md
Last active August 29, 2015 14:04 — forked from mbostock/.block
We couldn’t find that file to show.