Skip to content

Instantly share code, notes, and snippets.

@max-reznichenko
Created June 7, 2018 17:48
Show Gist options
  • Save max-reznichenko/b8de4cddff90a51d1aef167f6bd1f104 to your computer and use it in GitHub Desktop.
Save max-reznichenko/b8de4cddff90a51d1aef167f6bd1f104 to your computer and use it in GitHub Desktop.
Salesforce - mass furlough exemption
// add jq
var jq = document.createElement('script'); jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; document.getElementsByTagName('head')[0].appendChild(jq);
// start jq
jQuery.noConflict();
// click toggle
jQuery('.slds-checkbox_faux').parent('#toggle-desc').click()
// select reason
var reason = 'Critical Resource - other'; // var reason = 'Non-Critical Resource';
jQuery('.slds-select_container select option[value="'+reason+'"]').prop('selected', true)
// add justification
var justification = 'The engineer is required to work on the furlough date(s) in order to perform sprint delivery on time.'
jQuery('.slds-form-element__control.slds-grow textarea').html(justification)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment