Skip to content

Instantly share code, notes, and snippets.

View jadsitt's full-sized avatar

Jeremy Adsitt jadsitt

  • Seattle, WA USA
View GitHub Profile
@jadsitt
jadsitt / RestDispatcher.cls
Created January 21, 2023 05:55 — forked from cdeckert/RestDispatcher.cls
Rest Dispatcher
/**
* @description URL dispatcher
*/
@RestResource(urlMapping = '/*')
global class RestDispatcher
{
// dispatchables
static Map<RequestType, List<Dispatchable>> dispatchables;
// requestTypes
enum RequestType {HTTPGET, HTTPPOST, HTTPPUT, HTTPDELETE, HTTPPATCH}
@jadsitt
jadsitt / XML-PHP-form-from-file-and-save.md
Created February 15, 2021 17:18 — forked from MWins/XML-PHP-form-from-file-and-save.md
XML-PHP-form-from-file-and-save

Using XML/PHP to generate form, process and store results in XML

creating an MVP where a visitor can edit the information of an existing XML file by adding their name & contact info. I'd like to be able to save the altered xml to a new file and rename it to the visitor's name.

basically this as a starting point: http://stackoverflow.com/questions/12514000/edit-xml-via-html-form-php

Start

Ok this is pretty straight forward but without the existing xml file it's hard to help you. I'll just assume you have an empty xml file with name & contact. It'll look like this :

@jadsitt
jadsitt / soapSforceCom200608Apex.cls
Created January 27, 2021 16:54 — forked from FishOfPrey/soapSforceCom200608Apex.cls
Call the Salesforce Apex API executeAnonymous web method and return resulting the DebuggingHeader
//Generated by FuseIT WSDL2Apex (http://www.fuseit.com/Solutions/SFDC-Explorer/Help-WSDL-Parser.aspx)
//Methods Included: executeAnonymous
//Methods Excluded: compileAndTest, compileClasses, compileTriggers, runTests, wsdlToApex
// Primary Port Class Name: Apex
public class soapSforceCom200608Apex {
public class AllowFieldTruncationHeader_element {
public Boolean allowFieldTruncation;
private String[] allowFieldTruncation_type_info = new String[]{'allowFieldTruncation','http://soap.sforce.com/2006/08/apex','boolean','1','1','false'};
private String[] apex_schema_type_info = new String[]{'http://soap.sforce.com/2006/08/apex','true','false'};
private String[] field_order_type_info = new String[]{'allowFieldTruncation'};
@jadsitt
jadsitt / soapSforceCom200608Apex.cls
Created January 27, 2021 16:54 — forked from FishOfPrey/soapSforceCom200608Apex.cls
Call the Salesforce Apex API executeAnonymous web method and return resulting the DebuggingHeader
//Generated by FuseIT WSDL2Apex (http://www.fuseit.com/Solutions/SFDC-Explorer/Help-WSDL-Parser.aspx)
//Methods Included: executeAnonymous
//Methods Excluded: compileAndTest, compileClasses, compileTriggers, runTests, wsdlToApex
// Primary Port Class Name: Apex
public class soapSforceCom200608Apex {
public class AllowFieldTruncationHeader_element {
public Boolean allowFieldTruncation;
private String[] allowFieldTruncation_type_info = new String[]{'allowFieldTruncation','http://soap.sforce.com/2006/08/apex','boolean','1','1','false'};
private String[] apex_schema_type_info = new String[]{'http://soap.sforce.com/2006/08/apex','true','false'};
private String[] field_order_type_info = new String[]{'allowFieldTruncation'};
@jadsitt
jadsitt / ViewAccountHeirarchyController
Created June 15, 2020 16:31 — forked from arun12209/ViewAccountHeirarchyController
ViewAccountHeirarchyController
({
navigateToAccountHierarchy: function(cmp, event, helper) {
var acctId = cmp.get('v.recordId');
var evt = $A.get("e.force:navigateToComponent");
evt.setParams({
componentDef: "sfa:hierarchyFullView",
componentAttributes: {
recordId: acctId,
sObjectName: "Account"
}