• Bharath Kumar Thota
  • NEWBIE
  • 60 Points
  • Member since 2019
  • Bigworks


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies
Hello,
I want to imporove my skills on Aura ightning Components, so is there any website to get questions on lightning for practise.

Thank you,
Bharath Kumar Thota
Hi,
I have a Lightning component form which consists of many fields and parts. What I need is to refresh a particular part of the Lightning component without refreshing the whole component.
User-added image
In the above image I have the Fetch Contact Info in one whole div so when I click the refresh icon it should empty all the fields if the values are present. Is there any possibility to do that, any information will be helpful.

Thanks,
Bharath Kumar Thota
Hi,
I am using REST API to the whole information of a "Report" record in that I am able to see what filters are used and getting those values using Apex. But the problem I have is with "Standard Fields", the API names for the standard fields of an object are not same in the report record. I will explain with the below image:
User-added image
In the above image, [Item 2] and [Item 4] are custom field which doesn't trouble me. But the other 4 which I have highlighted are standard fields of Opportunity object. So these names doesn't match with either the label or API name of the field.
Example: [Item 6]
-> In this metadata name is OPP_QUANTITY
-> In Opportunity the label is Qunatity
-> In Opportunity the API name is TotalOpportunityQuantity
The name in this doesn't match with label or API name.
So how to retrieve the API name or label of that field is there any way.
Please help me with this.

Thanks,
Bharath Kumar Thota
Hi,
I want to retrieve records of "Report" based on "Object". Is this possible?
In one picklist I have Objects when I select a particular object for example let us take it as Opportunity, so in the next picklist I need to get the report records which are related to Opportunity object.
Retrieving the report records based on object is possible?

Thanks,
Bharath Kumar Thota
Hi,
In "Report" object, we will use filters for each record to get required information from a report record. So can we get those filters as SOQL query?
Filters means they are like WHERE condition in SOQL query in the same way can we retrieve the SOQL query from the filters for each record. Is it possible to do?

Thanks,
Bharath Kumar Thota
Hi,
I need to override the "Select" button with a Visualforce page.
In Opportunities there is "Products (Standard)" related list in that I clicked on "Add Product" button then the below page (image) has opened.
In this when I click on "Select" button I need to override the standard functionality and replace it with Visualforce page.
Is this possible?
User-added image

Thanks,
Bharath Kumar Thota
Hi,
I need to add input text box to PDF and send that PDF to mail, so that the other person can enter the data in input box. This operation must be done by writing the code in the instance but not by using external applicaitons. Any information on this will be helpful for me.

Thanks,
Bharath Kumar Thota
Hi,
I am adding an Attachment for a record in Account. It is saving the attachment as PDF for the record but when I try to open it showing "Failed to load PDF document". I am using RemoteAction for saving the attachment. Please can I know why?

This is my method in controller:
@RemoteAction
    public static void saveHTMLPDF(Id ehsId, String signatureBody) {
        Attachment a = new Attachment(ParentId = ehsId, name = 'pdfFromVf.pdf', ContentType = 'application/pdf', 
                                      Body = Blob.valueOf(signatureBody));
        System.debug('1. ehsId: ' + ehsId + ' signatureBody: ' + signatureBody);
        System.debug('2. Attachement a: ' + a);
        Database.saveResult result = Database.insert(a, false);
    }

VisualForce page code:
<script type = "text/javascript">
    function savePdf() {
        var x = document.getElementById("savePDF");
        x.style.display = "none";
        var ehsId = "0012x000006LNsN";
        var pdf = new jsPDF();
        pdf.addHTML(document.body, function() {
            Visualforce.remoting.Manager.invokeAction(
    '{!$RemoteAction.HTMLSignatureCodeController.saveHTMLPDF}', 
            ehsId, pdf,
            function(result, event){
            },
            {escape: true}
        );
        });
   }
    </script>

Thank you,
Bharath Kumar Thota
Hello,
I want to imporove my skills on Aura ightning Components, so is there any website to get questions on lightning for practise.

Thank you,
Bharath Kumar Thota
Hi,
I have a Lightning component form which consists of many fields and parts. What I need is to refresh a particular part of the Lightning component without refreshing the whole component.
User-added image
In the above image I have the Fetch Contact Info in one whole div so when I click the refresh icon it should empty all the fields if the values are present. Is there any possibility to do that, any information will be helpful.

Thanks,
Bharath Kumar Thota
Hi,
I want to retrieve records of "Report" based on "Object". Is this possible?
In one picklist I have Objects when I select a particular object for example let us take it as Opportunity, so in the next picklist I need to get the report records which are related to Opportunity object.
Retrieving the report records based on object is possible?

Thanks,
Bharath Kumar Thota
Hi,
I need to override the "Select" button with a Visualforce page.
In Opportunities there is "Products (Standard)" related list in that I clicked on "Add Product" button then the below page (image) has opened.
In this when I click on "Select" button I need to override the standard functionality and replace it with Visualforce page.
Is this possible?
User-added image

Thanks,
Bharath Kumar Thota
Hi,
I need to add input text box to PDF and send that PDF to mail, so that the other person can enter the data in input box. This operation must be done by writing the code in the instance but not by using external applicaitons. Any information on this will be helpful for me.

Thanks,
Bharath Kumar Thota
Hi,
I am adding an Attachment for a record in Account. It is saving the attachment as PDF for the record but when I try to open it showing "Failed to load PDF document". I am using RemoteAction for saving the attachment. Please can I know why?

This is my method in controller:
@RemoteAction
    public static void saveHTMLPDF(Id ehsId, String signatureBody) {
        Attachment a = new Attachment(ParentId = ehsId, name = 'pdfFromVf.pdf', ContentType = 'application/pdf', 
                                      Body = Blob.valueOf(signatureBody));
        System.debug('1. ehsId: ' + ehsId + ' signatureBody: ' + signatureBody);
        System.debug('2. Attachement a: ' + a);
        Database.saveResult result = Database.insert(a, false);
    }

VisualForce page code:
<script type = "text/javascript">
    function savePdf() {
        var x = document.getElementById("savePDF");
        x.style.display = "none";
        var ehsId = "0012x000006LNsN";
        var pdf = new jsPDF();
        pdf.addHTML(document.body, function() {
            Visualforce.remoting.Manager.invokeAction(
    '{!$RemoteAction.HTMLSignatureCodeController.saveHTMLPDF}', 
            ehsId, pdf,
            function(result, event){
            },
            {escape: true}
        );
        });
   }
    </script>

Thank you,
Bharath Kumar Thota
Hi All,

I  want to display content of PDF on vf page. I have stored PDF in Notes & Attachments related list of account object. My requirement is I want to show footer message on Vf Page. Then after I want to show all content of Vf page in PDF(renderAs ="PDF") Here in the below code I am using iframe. But it is not working. It is showing blank. Please help.
<apex:page controller="ViewPdf" renderAs="PDF">
    <iframe src="data:{!att.ContentType};base64,{!pdf}" >
    <div class="footer">
        <div>This document is internal use only</div>
     </div>
    </iframe>
</apex:page>
public class ViewPdf {
    public Attachment att {
        get {
            if (att == null) {
                att = [SELECT Body, ContentType, Name FROM Attachment WHERE ID = '00P280000018FlA'];
            }
            return att;
        }
        private set;
    }
    public String pdf {
        get {
            return EncodingUtil.Base64Encode(att.body);
        }
    }
}