This file contains hidden or 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 SK_LightningDataTableController { | |
@AuraEnabled | |
public static List<Account> searchAccountsSOQL(string searchString) { | |
String queryString = 'Select id, name,type,industry from Account '; | |
if(searchString!=null && searchString!=''){ | |
searchString = '%'+string.escapeSingleQuotes(searchString)+'%'; | |
queryString = queryString+ 'where Name Like:searchString'; | |
} | |
queryString = queryString + ' Limit 10000'; | |
List<Account> accList = database.query(queryString); |
This file contains hidden or 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
global class AccountUtility implements OnClickJSUtilityController.OnClickJSHelper{ | |
global OnClickJSUtilityController.onClickJSMessageWrapper executeLogic(string accountId){ | |
OnClickJSUtilityController.onClickJSMessageWrapper wrap = new OnClickJSUtilityController.onClickJSMessageWrapper(); | |
if(accountid!=null && accountId!=''){ | |
try{ | |
Account acc=[select id,name,type,billingCountry,BillingPostalCode from Account where id=:accountId]; | |
if(acc.BillingPostalCode!=null && acc.BillingPostalCode!='' && acc.billingCountry!=null && acc.billingCountry!=''){ | |
acc.type='Prospect'; |
This file contains hidden or 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
//this class is created to parse response from box while searching any content on box | |
public class BoxSearchContentResponseParser { | |
public Integer total_count {get;set;} | |
public List<Entries> entries {get;set;} | |
public Integer limit_Z {get;set;} // in json: limit | |
public Integer offset {get;set;} | |
public class Entries { | |
public String type_Z {get;set;} // in json: type | |
public String id {get;set;} | |
public String etag {get;set;} |
This file contains hidden or 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
//Author- Sunil Kumar | |
public class MetadataAPIUtility{ | |
public static boolean createCustomLabel(string csname,string description,string language,string value, boolean isProtected){ | |
List<MetadataService.Metadata> allMetadataList = new List<MetadataService.Metadata>(); | |
MetadataService.MetadataPort service = createService(); | |
MetadataService.CustomLabel csLabel = new MetadataService.CustomLabel(); | |
csLabel.fullName = csname; | |
csLabel.language = language; |
This file contains hidden or 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
//Author- sunil Kumar | |
//@sunil02kumar | |
// skforce is namespace of my org. | |
public class MetadataAPICMUtility{ | |
public static boolean createCustomMetadata(){ | |
List<MetadataService.Metadata> allMetadataList = new List<MetadataService.Metadata>(); | |
MetadataService.MetadataPort service = createService(); | |
MetaDataService.CustomMetadata CMTRec = new MetaDataService.CustomMetadata(); | |
//fullname refer custom metadata name.unique name |
This file contains hidden or 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
<aura:application extends="ltng:outApp" > | |
<aura:dependency resource="c:SK_LightningCmpForVF"/> | |
</aura:application> |
This file contains hidden or 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
//Author- sunil Kumar | |
//Twitter handle-@sunil02kumar | |
//purpose- create remote site setting so that we can call rest api created in same org | |
public class MetadataAPIUtility{ | |
public static boolean createRemoteSiteSettings(){ | |
boolean isSucessfull=false; | |
Map<string,string> RemoteSiteMap = new Map<string,string>(); | |
//specify the remote site name and url in RemoteSiteMap | |
RemoteSiteMap.put('FOR_REST_API_CALL',URL.getSalesforceBaseUrl().toExternalForm()); | |
//String PageURL1 = URL.getCurrentRequestUrl().toExternalForm(); |
This file contains hidden or 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 showHeader="true" sidebar="true"> | |
SessionIDStart{!$Api.Session_ID}SessionIDEnd | |
StartVFPageBaseURL{!LEFT($CurrentPage.URL,FIND('/',$CurrentPage.URL,9))}EndVFPageBaseURL | |
</apex:page> |
This file contains hidden or 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
<aura:component > | |
<aura:attribute name="childValue" type="string" default="Child"/> | |
<aura:registerEvent name="changeValueEvent" type="c:SK_LightningEventChannel"/> | |
<lightning:button name="ddff" label="Fire event" onclick="{!c.fireEvent}"/> | |
</aura:component> |
This file contains hidden or 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
<aura:application extends="force:slds"> | |
<c:SK_FirstComponent/> | |
<c:SK_SecondComponent/> | |
</aura:application> |