• Jayesh Babu A V
  • NEWBIE
  • 55 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 13
    Replies
I want to open modal dialog box in inside the <aura:component>. I followed this (https://sfdcmonkey.com/2017/04/15/modal-box-lightning-component-salesforce/) tutorial to achieve this. The dialog box is opening fine. But, when the dialog box is opened, I cannot click on any of the upper left menu items, I mean, these menus: User-added imageI fine with being not able to click anything inside the <aura:component>. But, is there any way to open the dialog box in such a way that I can click the menu items?
I am performing a few REST calls in my lightning app. And the urls and tokens for REST calls are stored as custom metadata types and I query the values before making the REST call. I created a managed package and added these custom metadata types to the package. And installed the package to a new org. But, i think the metadata types are not installed to the new org because i cannot see those when I go to Setup -> Custom Metadata Types in the new org and also the REST calls are not working in the new org.
According to the Custom Metadata Types docs, the data is also packaged. What might have gone wrong?
I submitted my managed package for a security review few days ago. After submitting, I found out that I don't have to use an Apex class in the package. So, I tried to delete that class but couldn't because it was part of a managed package. So, I annotated that class with @deprecated. 2 days ago, I got the result and CRUD/FLS Enforcement issue is raised on this class. Now, the problem is, I cannot edit this class as it throws this error: A class with name was deprecated for this package or this name is already in use, also I cannot delete the class. I went to Salesforce Partner Community and raised a ticket and got the permission to delete the managed classes. But, still I cannot delete the class(I don't know why). So, my question is, if I submit the package for security review again, will it raise the same issue again or ignore the issue as the class is now deprecated?
I used this code to call the Bee Template API inside my my Visualforce page using javascript:
request(
    'POST',
    'https://auth.getbee.io/apiauth',
    'grant_type=password&client_id={!clientId}&client_secret={!clientSecret}',
    'application/x-www-form-urlencoded',
    function (token)
And when I submitted this package for security review, I got the Stored XSS security issue. So, changed the code to this:
request(
    'POST',
    'https://auth.getbee.io/apiauth',
    'grant_type=password&client_id={!JSENCODE(clientId)}&client_secret={!JSENCODE(clientSecret)}',
    'application/x-www-form-urlencoded',
    function (token)
But, now I got the Information Disclosure Vulnerability issue. This is the statement I got along with the issue:
Secrets should not be passed in the URL, JSENCODE is not sufficient to hide the secret.
So, how can I solve this?


 
When i deploy my app, it got rejected because of the "Insecure Storage of Sensitive Data" security issue because I hardcoded some of the urls and api keys in apex itself. After a little bit of googling, i found out that Custom Label is the easest way to save these kind of values inside salesforce. So, is it ok or safe to store these values inside the Custom label?
I used the best answer in this question (https://developer.salesforce.com/forums/ForumsMain?id=9062I000000R1mRQAS) to download all the metadata in my org to my local system. Now, I want all those metadata to be deployed to a  new org. Is there any way to do that?
I have been creating a lightning app for 3 months and I have completed it. I wrote all my code in the Salesforce Developer Console. So, my question is, is there any simlple way to get all those codes (aura components, controller classes, helper classes, apex classes, visualforce pages, REST classes) and download to my local computer or is there any way to upload all codes to Github or something?
Hi, I am new to salesforce and i am creating a lightning app which should list the patients in a lightning:datatable. I have searched a lot and i couldn't find anything on  this. Is there any way to get the list of patients using soql queries and display it in a datatable, just like we do for Leads and other objects?
Thanks in advance.
We are creating Lightning app to process some information regarding patients. Can you please let me know what’s the object where the customer data like email, date of birth is stored for below cases

  a. Patient is created on salesforce
  b. Patient is migrated from EHR to salesforce
I did a REST call from my apex class which include website url. This rest will return the pdf form of that website. This is the REST call:
@AuraEnabled
    public static String convertLinkToPdf(String websiteUrl) {
        HttpRequest req = new HttpRequest();
        req.setEndpoint('https://baseurl.com/');
        req.setMethod('GET');
        req.setHeader('Authorization', 'apikey xxxxxxxxxxxxxxxxx');
        req.setBody('{"url": "'+ websiteUrl+'","filename" : "abc.pdf"}');
        HttpResponse res = new Http().send(req);
        System.debug('STATUS: ' + res.getStatusCode());
        System.debug('RESPONSE: ' + res.getBody());
        
        return res.getBody();
    }
This call will convert 'websiteUrl' to a pdf format and return as the body. I want this pdf to be opened in a new browser tab. Is there any way to do that?
 
I want to create a table with grouped items. Below is the image:
User-added image
As, you can see from the image, in the abovr table, some items are grouped together. Is it possible to do this using datatable? I tried this using <aura:iteration>. But, I couldnt find a way to group the items. According to the logic that I have in my mind, i need a way to compare the previous item with the current item in iteration. Somebody, please help.
I am new to Salesforce and I have developed an app in salesforce. I am in the process of submitting the app for security review. There is a question in the submission process:
Specify what Salesforce credentials are stored?
User-added image
I dont know what answer I should give. What does 'Salesforce Credentials' mean?
 
For my app to work properly, the customer who installs the app in their org, has to go to sites setup, create a new site and do a bunch of stuff in the 'Public Access Settings' of the site. So, my plan is, when the app is opened for the first time, it shows a dialog box which contains the steps to create site and all other stuff,  and there is a button on the bottom of the dialog box which opens the 'Site' setup.  But, I couldnt find any url that opens the site setup page. So, is there any url to open the setup page or is there any other way to open the site setup page on a button click inside the app?
Thanks very much.
I am new to salseforce and I want to display a list of patients in my aura:component using a datatatable and want to send emails to the patients. After some googling, I found out that 'EhrPatient__c' is the object that I have to display in the datatable. And the displaying part works fine. But the problem I have is that I have to get the email id of each patient so that  can send emails to them. In the 'EhrPatient__c' object, there is no field that saves the email id of the patient. So, my question is, is there any other way to get the email id of the patient from any other object?
Thanks very much.
Iam new to salesforce and I want to get the Name field from a datatable inside my controller js class. I used the following code to do it:
var row = event.getParam('row');
var name = row.Name;
System.debug(name);
Everything is working fine. I am able to get the name data properly. But, my question is, is there any way to replace the field name 'Name' with a variable? I tried like this:
var row = event.getParam('row');
var nameC = component.get("v.nameColumn");//value of nameColumn is 'Name'
var name = row.nameC;
System.debug(name);

But, i didnt work.  In this case, the value of 'name' is undefined. So, is there any other way to use variable as the field name instead of statically typing the field name?
Thanks very much.
I have created the following string:
String emailBody = 'Dear customer, <br/><br/>Click on the following link to send reply. <a href="mailto:'+ replyMail +'?subject='+replysubject+'&body='+replyBody+'">Click Here</a> Thanks.'

When I copy and paste this string on a html file, the Click Here part is turning into a link, which when clicked, the compose window of the Live Mail is opening up with subject and body is already filled with replysubject and replyBody values. But, I want this string to be sant as an email. So, I used this code:
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
message.toAddresses = new String[] { emailId };
message.optOutPolicy = 'FILTER';
message.subject = emailSubject;
message.setSenderDisplayName(senderDisplay);
message.setReplyTo(replyMail);
message.setHtmlBody(emailBody);
Messaging.SingleEmailMessage[] messages = new List<Messaging.SingleEmailMessage> {message};
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages);

I am getting the email fine, but in the email body, the Click Here part is no longer a link. But when i use raw strings instead of variables, like this: 
<a href="mailto:'+ replyMail +'?subject=replysubject&body=replyBody">Click Here</a>
its a link.

And when I tried like this:
<a href="mailto:'+ replyMail +'?subject="'+replysubject+'"&body="'+replyBody+'"">Click Here</a>
its still a link, but the replysubject and replyBodyvalues are null.

So, what am I doing wrong? How can I send an email with link in the email body?
I am new to saleforce and I used the following code to save files to the Attachment object in salesfore:
String base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8');
Attachment attach = new Attachment();
attach.ParentId = parentId;
attach.Body = EncodingUtil.base64Decode(base64Data);
attach.Name = fileName;
attach.ContentType = contentType;
attach.IsPrivate = false;
insert attach;
Now, I need to generate an url by which the files can be shared outside of the salesforce. After some googling,  I found out that it can be done using ContentDistribution. And I want to generate the url in the apex class itself. I have reffered to many tutorials and no one them worked for me. So, please anyone can provide me with the code or point to a proper tutorial link which expalins the process properly how the sharable url is generated?
 
I have created a datepicker inside the visualforce page and I want to get value of the <apex:input> into a variable, and access it on buton click. this is the code: 
<apex:page docType="html-5.0" showHeader="false" 
           controller="ShowResourcesClass" >

     <apex:form >
    		<apex:pageBlock >
        		<apex:pageBlockSection >
                             <apex:pageBlockSectionItem > 
                		    Date: <apex:input type="date" value="{!chosenDate}"/>
            		     </apex:pageBlockSectionItem>
        		</apex:pageBlockSection>
            </apex:pageBlock>
        </apex:form>
        
        <apex:form >
        	<apex:commandButton action="{!getDateFun}" value="Submit" id="theButton"/>
        </apex:form>

</apex:page>

And this is the apex class
public class ShowResourcesClass {
    public Date chosenDate {get;set;}

    public void getDateFun() {
        System.debug('DATE: ' + chosenDate);
     }

}
Here, when I click the buttton even  after choosing the date, the value of `chosenDate` is always null. 
I am new to Salesforce and I want to display two columns of a list of custom objects inside an <apex:page>. I did it using the <apex:pageBlockTable> and it worked fine. In these two columns, one of them is a url. I want to go to that url when i click on that item inside the pageBlockTable. So, used this code to achieve that:
<apex:pageBlockTable value="{!sentResources}" var="ca">
     <apex:column headerValue="Name" value="{!ca.Name}" />
     <apex:column headerValue="Url">
          <apex:outputlink value="/{!ca.ResourceUrl__c}">{!ca.Title__c}</apex:outputlink>
     </apex:column>
</apex:pageBlockTable>

But, this code is not working. The page keeps reloading when I click on the Url. So, anyone please provide a solution to this. 
Thnaks in advance.
Hello, everybody..
I am new to Salesforce and I currently want to display the list of existing patients in a aura component using the lightning datatable. So ,there are many objects in salesforce like Account, Lead, Candidate Patient, EHR Patient etc. I couldn't find out which object represent a patient. So, my question is  which object represent a patient or which object should I choose to display? 
I want to open modal dialog box in inside the <aura:component>. I followed this (https://sfdcmonkey.com/2017/04/15/modal-box-lightning-component-salesforce/) tutorial to achieve this. The dialog box is opening fine. But, when the dialog box is opened, I cannot click on any of the upper left menu items, I mean, these menus: User-added imageI fine with being not able to click anything inside the <aura:component>. But, is there any way to open the dialog box in such a way that I can click the menu items?
I am performing a few REST calls in my lightning app. And the urls and tokens for REST calls are stored as custom metadata types and I query the values before making the REST call. I created a managed package and added these custom metadata types to the package. And installed the package to a new org. But, i think the metadata types are not installed to the new org because i cannot see those when I go to Setup -> Custom Metadata Types in the new org and also the REST calls are not working in the new org.
According to the Custom Metadata Types docs, the data is also packaged. What might have gone wrong?
I submitted my managed package for a security review few days ago. After submitting, I found out that I don't have to use an Apex class in the package. So, I tried to delete that class but couldn't because it was part of a managed package. So, I annotated that class with @deprecated. 2 days ago, I got the result and CRUD/FLS Enforcement issue is raised on this class. Now, the problem is, I cannot edit this class as it throws this error: A class with name was deprecated for this package or this name is already in use, also I cannot delete the class. I went to Salesforce Partner Community and raised a ticket and got the permission to delete the managed classes. But, still I cannot delete the class(I don't know why). So, my question is, if I submit the package for security review again, will it raise the same issue again or ignore the issue as the class is now deprecated?
I used this code to call the Bee Template API inside my my Visualforce page using javascript:
request(
    'POST',
    'https://auth.getbee.io/apiauth',
    'grant_type=password&client_id={!clientId}&client_secret={!clientSecret}',
    'application/x-www-form-urlencoded',
    function (token)
And when I submitted this package for security review, I got the Stored XSS security issue. So, changed the code to this:
request(
    'POST',
    'https://auth.getbee.io/apiauth',
    'grant_type=password&client_id={!JSENCODE(clientId)}&client_secret={!JSENCODE(clientSecret)}',
    'application/x-www-form-urlencoded',
    function (token)
But, now I got the Information Disclosure Vulnerability issue. This is the statement I got along with the issue:
Secrets should not be passed in the URL, JSENCODE is not sufficient to hide the secret.
So, how can I solve this?


 
I used the best answer in this question (https://developer.salesforce.com/forums/ForumsMain?id=9062I000000R1mRQAS) to download all the metadata in my org to my local system. Now, I want all those metadata to be deployed to a  new org. Is there any way to do that?
I have been creating a lightning app for 3 months and I have completed it. I wrote all my code in the Salesforce Developer Console. So, my question is, is there any simlple way to get all those codes (aura components, controller classes, helper classes, apex classes, visualforce pages, REST classes) and download to my local computer or is there any way to upload all codes to Github or something?
Hi, I am new to salesforce and i am creating a lightning app which should list the patients in a lightning:datatable. I have searched a lot and i couldn't find anything on  this. Is there any way to get the list of patients using soql queries and display it in a datatable, just like we do for Leads and other objects?
Thanks in advance.
I did a REST call from my apex class which include website url. This rest will return the pdf form of that website. This is the REST call:
@AuraEnabled
    public static String convertLinkToPdf(String websiteUrl) {
        HttpRequest req = new HttpRequest();
        req.setEndpoint('https://baseurl.com/');
        req.setMethod('GET');
        req.setHeader('Authorization', 'apikey xxxxxxxxxxxxxxxxx');
        req.setBody('{"url": "'+ websiteUrl+'","filename" : "abc.pdf"}');
        HttpResponse res = new Http().send(req);
        System.debug('STATUS: ' + res.getStatusCode());
        System.debug('RESPONSE: ' + res.getBody());
        
        return res.getBody();
    }
This call will convert 'websiteUrl' to a pdf format and return as the body. I want this pdf to be opened in a new browser tab. Is there any way to do that?
 
I am new to salseforce and I want to display a list of patients in my aura:component using a datatatable and want to send emails to the patients. After some googling, I found out that 'EhrPatient__c' is the object that I have to display in the datatable. And the displaying part works fine. But the problem I have is that I have to get the email id of each patient so that  can send emails to them. In the 'EhrPatient__c' object, there is no field that saves the email id of the patient. So, my question is, is there any other way to get the email id of the patient from any other object?
Thanks very much.
I have created the following string:
String emailBody = 'Dear customer, <br/><br/>Click on the following link to send reply. <a href="mailto:'+ replyMail +'?subject='+replysubject+'&body='+replyBody+'">Click Here</a> Thanks.'

When I copy and paste this string on a html file, the Click Here part is turning into a link, which when clicked, the compose window of the Live Mail is opening up with subject and body is already filled with replysubject and replyBody values. But, I want this string to be sant as an email. So, I used this code:
Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();
message.toAddresses = new String[] { emailId };
message.optOutPolicy = 'FILTER';
message.subject = emailSubject;
message.setSenderDisplayName(senderDisplay);
message.setReplyTo(replyMail);
message.setHtmlBody(emailBody);
Messaging.SingleEmailMessage[] messages = new List<Messaging.SingleEmailMessage> {message};
Messaging.SendEmailResult[] results = Messaging.sendEmail(messages);

I am getting the email fine, but in the email body, the Click Here part is no longer a link. But when i use raw strings instead of variables, like this: 
<a href="mailto:'+ replyMail +'?subject=replysubject&body=replyBody">Click Here</a>
its a link.

And when I tried like this:
<a href="mailto:'+ replyMail +'?subject="'+replysubject+'"&body="'+replyBody+'"">Click Here</a>
its still a link, but the replysubject and replyBodyvalues are null.

So, what am I doing wrong? How can I send an email with link in the email body?

Hi, I can query on ContentDistribution the url of a file that I manually shared with external.

Is it possible to generate that url from Apex?

Thanks