100 lines
3.6 KiB
OpenEdge ABL
100 lines
3.6 KiB
OpenEdge ABL
public with sharing class ShopifyConfigurationResultTemplate_Ctrl {
|
|
|
|
public String resultCheck {get; set;}
|
|
public String emailContent {get; set;}
|
|
public String shopifySyncLogoUrl {get; set;}
|
|
public String facebookIconUrl {get; set;}
|
|
public String instaIconUrl {get; set;}
|
|
public String twitterIconUrl {get; set;}
|
|
public String linkedInIconUrl {get; set;}
|
|
public String heartIconUrl {get; set;}
|
|
public String WriteReviewURl {get; set;}
|
|
|
|
public String facebooksiteURl {get; set;}
|
|
public String InstasiteURl {get; set;}
|
|
public String twittersiteURl {get; set;}
|
|
public String linkedinsiteURl {get; set;}
|
|
public String sfdcBaseURL = URL.getOrgDomainURL().toExternalForm();
|
|
|
|
|
|
public String orgId;
|
|
|
|
public List<Document> documentList;
|
|
|
|
public ShopifyConfigurationResultTemplate_Ctrl(){
|
|
list<Organization> Orglist = new list<Organization>();
|
|
resultCheck = ApexPages.currentPage().getparameters().get('result');
|
|
if(ApexPages.currentPage().getparameters().containsKey('emailContent')){
|
|
emailContent = ApexPages.currentPage().getparameters().get('emailContent');
|
|
}
|
|
|
|
documentList = new List<Document>();
|
|
|
|
Orglist = [SELECT Id from Organization WITH SECURITY_ENFORCED ];
|
|
|
|
if(!Orglist.isEmpty() && Orglist!= null){
|
|
orgId = Orglist[0].id;
|
|
}
|
|
|
|
list<Document> listofDocument = new list<Document>();
|
|
listofDocument = [SELECT Id, Name,Url, FolderId, Folder.Name FROM Document WHERE Folder.Name = 'Hic Shopify made easy logo' WITH SECURITY_ENFORCED];
|
|
if(listofDocument.isEmpty()) return;
|
|
|
|
for(Document doc : listofDocument){
|
|
|
|
if(doc.Name.equals('Facebook')){
|
|
facebooksiteURl = doc.url;
|
|
}
|
|
if(doc.Name.equals('Instagram')){
|
|
InstasiteURl = doc.url;
|
|
}
|
|
if(doc.Name.equals('Twitter')){
|
|
twittersiteURl = doc.url;
|
|
}
|
|
if(doc.Name.equals('Linkedin')){
|
|
linkedinsiteURl = doc.url;
|
|
}
|
|
|
|
if(doc.Name.equals('HIC_ShopifySyncFacebookIcon')){
|
|
|
|
facebookIconUrl = sfdcBaseURL + '/' + 'servlet/servlet.ImageServer?id='+ doc.id + '&oid='+orgId;
|
|
}
|
|
|
|
if(doc.Name.equals('HIC_ShopifySyncRedHeart')){
|
|
|
|
heartIconUrl = sfdcBaseURL + '/' + 'servlet/servlet.ImageServer?id='+ doc.id + '&oid='+orgId;
|
|
}
|
|
|
|
if(doc.Name.equals('HIC_ShopifySyncInstaIcon')){
|
|
|
|
instaIconUrl = sfdcBaseURL + '/' + 'servlet/servlet.ImageServer?id='+ doc.id + '&oid='+orgId;
|
|
}
|
|
|
|
if(doc.Name.equals('HIC_ShopifySyncLinkedInIcon')){
|
|
|
|
linkedInIconUrl = sfdcBaseURL + '/' + 'servlet/servlet.ImageServer?id='+ doc.id + '&oid='+orgId;
|
|
}
|
|
|
|
if(doc.Name.equals('HIC_ShopifySyncLogo')){
|
|
|
|
shopifySyncLogoUrl = sfdcBaseURL + '/' + 'servlet/servlet.ImageServer?id='+ doc.id + '&oid='+orgId;
|
|
}
|
|
|
|
if(doc.Name.equals('HIC_ShopifySyncTwitterIcon')){
|
|
|
|
twitterIconUrl = sfdcBaseURL + '/' + 'servlet/servlet.ImageServer?id='+ doc.id + '&oid='+orgId;
|
|
}
|
|
|
|
if(doc.Name.equals('AppWriteReviewURL')){
|
|
WriteReviewURl = doc.Url;
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} |