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
1. Export existing app’s variables to config.txt | |
heroku config -s -a existing-heroku-app > config.txt | |
2. Review and push to another app | |
cat config.txt | tr '\n' ' ' | xargs heroku config:set -a new-heroku-app |
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
public static List<string> getFields( string objName,string layout ) { | |
String pageLayout=String.format('{0}-{1}', new String[]{objName, layout}); | |
List<Metadata.Metadata> objlayouts = Metadata.Operations.retrieve(Metadata.MetadataType.Layout, new List<String> { | |
pageLayout | |
} | |
); | |
List<string> fields=new List<string>(); | |
Metadata.Layout layoutMd = (Metadata.Layout)objlayouts.get(0); |
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
@future(callout=true) | |
public static void SMSCallout(String body, String toNumber, String lang){ | |
SmsPocTwilio__c customSettingPOC = SmsPocTwilio__c.getInstance(); | |
System.debug('I am executing'); | |
System.debug(customSettingPOC); |
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
public static MetadataService.MetadataPort createService(){ | |
MetadataService.MetadataPort service = new MetadataService.MetadataPort(); | |
service.SessionHeader = new MetadataService.SessionHeader_element(); | |
service.SessionHeader.sessionId = UserInfo.getSessionId(); | |
return service; | |
} | |
MetadataService.MetadataPort service = createService(); |
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
public class JSONMSAccess { | |
public String token_type; | |
public String expires_in; | |
public String ext_expires_in; | |
public String expires_on; | |
public String not_before; | |
public String resource; | |
public String access_token; |
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
Alert.alert( | |
'Confirmation', | |
'Are you sure logout?', | |
[ | |
{ text: 'Ask me later', onPress: () => console.log('Ask me later pressed')}, | |
{ text: 'Cancel', onPress: () => console.log('Cancel Pressed'), style: 'cancel'}, | |
{ text: 'OK', onPress: () => this.props.navigation.dispatch(StackActions.reset({ | |
index: 0, | |
actions: [NavigationActions.navigate({ routeName: 'Home' })], | |
})) }, |
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
# Set an alias and login on your production Org | |
sfdx force:auth:web:login --setalias "ORGNAME" --setdefaultusername | |
#OR | |
# The same process but with an additional parameter you can login on sandbox enviroment | |
sfdx force:auth:web:login --setalias "ORGNAME" --setdefaultusername --instanceurl https://test.salesforce.com | |
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 your folder project run the following command ######## | |
#################################################################### | |
# navigate to aura folder | |
cd force-app/main/default/aura | |
# Create a Lightning component | |
sfdx force:lightning:component:create --type aura -n myAuraComponent |
NewerOlder