This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import jwt | |
import requests | |
import datetime | |
from simple_salesforce import Salesforce | |
from simple_salesforce.exceptions import SalesforceAuthenticationFailed | |
def jwt_login(consumer_id, username, private_key, sandbox=False): | |
endpoint = 'https://test.salesforce.com' if sandbox is True else 'https://login.salesforce.com' | |
jwt_payload = jwt.encode( | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from simple_salesforce import Salesforce, SalesforceMalformedRequest | |
from argparse import ArgumentParser | |
from csv import DictWriter | |
from datetime import date | |
from pathlib import Path | |
production_instance = 'yourinstance.salesforce.com' | |
parser = ArgumentParser(description="Backs up all Salesforce objects to csv files") | |
parser.add_argument("username", help="User to authenticate as. Should be part of an 'integration_user' profile or some profile with no ip range restriction") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Selector for the `Account` entity | |
*/ | |
public class AccountSelector { | |
public static final AccountSelector INSTANCE = new AccountSelector(); | |
/** | |
* Finds all accounts that are child accounts of | |
* the given opportunity's account. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<apex:page extensions="SomeController"> | |
<script src="{!$Resource.jquery224}"></script> | |
<script>$j = jQuery.noConflict();</script> | |
<apex:form> | |
<apex:outputPanel id="someSection"> | |
... stuff here ... |