Skip to content

Instantly share code, notes, and snippets.

View saicharanreddyk's full-sized avatar

Saicharan Reddy K saicharanreddyk

View GitHub Profile
@saicharanreddyk
saicharanreddyk / How to read input values using attributes
Created February 5, 2020 10:21
Lightning - How to read input values using attributes
In order to read values entered in input elements we can use <aura:attribute>.
To get the values from the input elements we need to use below code
component.get("v.Name Of the Attribute");
And we need to provide the value attribute in lightning input
<lightning:input label="Enter Amount" type="number" required="true" value="{!v.Name Of the Attribute}"/>
To set the value to the component using the attribute we need to use the following code
component.set("v.Name Of the Attribute",Value which needs to be assigned);
@saicharanreddyk
saicharanreddyk / How to read input values based on ids.txt
Created February 5, 2020 10:11
Lightning - How to read input values based on ids
If we want read the input values by using ids we need to use
component.find("Id of the element").get("v.value");
If we want to set any value based on id we need to use below code
component.find("Id of the element").set("v.value");
Component:
*************************************************************************
<aura:component >
<lightning:card iconName="standard:contact">
<aura:set attribute="actions">
ssh-keygen -t rsa -b 4096 -C "[email protected]"
clip < .ssh/id_rsa.pub
ssh -T [email protected]
Execute below piece of code in console to get the Current User Session Id.
document.cookie.match(/(^|;\s*)sid=(.+?);/)[2];
Book mark this below piece of code in your browser and just click on it once you logged into salesforce Org. 
javascript: alert('Copied to Clipboard SessionId --> ' +document.cookie.match(/(^|;\s*)sid=(.+?);/)[2]); var copyFrom = document.createElement("textarea"); copyFrom.textContent = document.cookie.match(/(^|;\s*)sid=(.+?);/)[2]; var body = document.getElementsByTagName('body')[0]; body.appendChild(copyFrom); copyFrom.select(); document.execCommand('copy'); body.removeChild(copyFrom);
@saicharanreddyk
saicharanreddyk / SalesForceBackup.py
Created September 5, 2018 04:28 — forked from mattkatz/SalesForceBackup.py
Simple python Script to backup a salesforce instance to csv files
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")
@saicharanreddyk
saicharanreddyk / sfdx commands list
Last active January 25, 2024 00:16
sfdx commands list
C:\Users\Saicharan Reddy K>sfdx force:doc:commands:list
WARNING: The command "DocListCommand" has been deprecated and will be removed in v49.0 or later. Use "sfdx commands" instead.
=== Commands
force:alias:list # list username aliases for the Salesforce CLI
force:alias:set # set username aliases for the Salesforce CLI
force:analytics:template:create # add an Analytics template to your workspace
force:apex:class:create # create an Apex class
force:apex:execute # execute anonymous Apex code
force:apex:log:get # fetch the last debug log
force:apex:log:list # list debug logs