• Bullfrog84
  • NEWBIE
  • -2 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 0
    Questions
  • 15
    Replies

I would like to have below functionality created on Visualforce Page, Please help with the solution.

Attachment Preview

Hi everyone,

I'm new to lightning development and was just wondering about the following use case. I want to create a lightning component that allows end users to input data using the lightning:input tag, but I don't see a way to set a default value that is editable. Does anyone know whether this is possible and how to do it?

Thanks!

-Matt
I'm trying to print content inside a div as below.
 
printPreview: function(component, event, helper) {
    	//window.print();
        
        
	   var divToPrint=component.find("printableDiv");
	   console.log('divToPrint.outerHTML: '+JSON.stringify(divToPrint.innerHTML));
	   newWin= window.open("");
	   newWin.document.write(divToPrint.outerHTML);
	   newWin.print();
	   newWin.close();
},

But this did not work. Anyone got a working example to print within Lightning components please. Appreciate any help. Thanks.
Hi,

I am having issues with the rendering of images in a Visualforce PDF.

ll my product images are stored on a server and are accessible at the URL http://images.metropuzzle.com/IMG2/[PRODUCT CODE]_IMG2_L.jpg
E.g. http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg
When I try to use those URL in <apex:image> it does not render the image in the PDF...

User-added image


As I am trying to track down the issue, I found something very odd.
For this simple test I am using one of my product image, and an image I found online, the URL is http://investor.salesforce.com/files/design/newlogo-company.png -- This URL seems to redirect to the URL http://s1.q4cdn.com/454432842/files/design/newlogo-company.png

I am building the PDF with the Visualforce code below: 
<apex:page renderAs="PDF">
    <div class="productGridContainer">
            <div class="productGridItem">
                <div>
                    <apex:image value="http://images.metropuzzle.com/IMG2/NPZPD1703_IMG2_L.jpg"/>
                    <apex:image value="http://investor.salesforce.com/files/design/newlogo-company.png"/>
                    <apex:image value="http://s1.q4cdn.com/454432842/files/design/newlogo-company.png"/> 
                </div>
            </div>
    </div>
</apex:page>

It does not render my product image, and for the image I found online it only renders the first one, not the second one. But it is the same image!
User-added image

Would someone have any idea why this is not working?

Thanks a lot!
Hi all,

I want to display news feed from external source using visualforce. I tried using javascript and some sample codes yet no output.

Please provide some help. If possible, with code. It will be really helpul.

Thanks and Regards
Ramandeep 
Tryign to mass create events with data loader but the start time field won't pass through my format?  On the events object the time and date field are seperate. 
Hi.. I have just started learning jQuery in Vf page and was checking online resources . I cam accross these codes , needed some clarity on this.
<apex:includeScript value="{!URLFOR($Resource.jQuery, '/js/jquery-1.11.4.min.js')}"  />
<apex:includeScript value="{!URLFOR($Resource.jQuery, '/js/jquery-ui-1.8.6.custom.min.js')}"  />
<apex:stylesheet value="{!URLFOR($Resource.jQuery, '/css/ui-lightness/jquery-ui-1.8.6.custom.css')}"  />
  I have downloaded[ jquery-ui-1.11.4.custom.zip] and included as a static resource but I am not sure if I need to download something else as well?
Because in the example above there are 3 lines of code. Are they referring to the same jQuery zip folder?
Also please help me get some working example with jQuery in Visualforce page.
Hello,
I am a Trailhead Newbie. How do I know if I have already created my Developer Org? When I click on Connect To Your Developer Edition it gives me the option to Log In With Developer Edition or Create a New Developer Edition; when I click on Connect To Your Developer Edition it asks me to authorize Salesforce Developer to access my information, basic data, etc; when I click on Create a New Developer Edition, it asks me to enter a Username, but when I use my current log in e-mail, it says it's already being used so not sure if I've created a Developer Org already? I appreciate your help!
Chelsea

Hi all,

I need to be able to display all my case comments and case emails in an <apex:repeat> block and they should be ordered by the date they were sent. I'm rather new to salesforce development and I'm not 100% sure how to do this. 

I have tried the following:

My Controller:

public class CaseFeedItem
    {
        public string creatorSmallPhotoUrl {get; set;}
        public string createdByName {get; set;}
        public string textBody {get; set;}
        public dateTime createdDate {get; set;}        
    }
    
    public list<CaseFeedItem> myCaseFeedItems {get; set;}

PageReference loadcase(Id caseID) 
    {
        system.debug('loadcase: starting... ');

        if (caseID == null)
            return page.conf_error;  /// NEED TO DO SOMETHING HERE
        
        mycase = 
            [
                SELECT
                        Id,
                        CaseNumber,
                        Subject,
                        Owner.Name,
                        CreatedDate,
                        Status,
                        Description,
                        Auditor_First_Name__c,
                        Auditor_Last_Name__c,
                        Auditor_Email__c,
                        Auditor_Phone__c,
                        Client_Name__c,
                        Client_Year_End_Date__c,
                        Client_No_of_Requests__c,
                        Client_Date_Requests_were_Sent__c,
                        Client_Audit_Deadline_Date__c,
                        ClosedDate,
                		IsClosed
                    FROM 
                        Case
                    WHERE
                        Id = :caseID
            ];
        
        system.debug('viewcase: case: '+mycase.subject);
        
        mycasecomments = 
            [
                SELECT 
                    Id,
                    CommentBody,
                    CreatorName,
                    CreatedById,
                    CreatedDate,
                    CreatorFullPhotoUrl,
                    CreatorSmallPhotoUrl,
                    IsPublished,
                    CreatedBy.Name
                    
                FROM 
                    CaseComment
                WHERE 
                    ParentID = :caseID
                ORDER BY
                    CreatedDate DESC
            ];
 
        myCaseEmails = 
        [
            SELECT
            	Id,
            	FromAddress,
            	FromName,
            	TextBody,
            	MessageDate,
            	ToAddress,
            	Subject
            	
            FROM
            	EmailMessage
            WHERE
            	ParentID = : caseId
            ORDER BY
            	MessageDate DESC
        ];
        newcomment = new CaseComment(ParentId=caseID);
        createCaseFeed();
        return null;

    }

 public void createCaseFeed()
    {
        for(CaseComment comment : mycasecomments)
        {
            CaseFeedItem feedItem = new CaseFeedItem();
            feedItem.creatorSmallPhotoUrl = comment.CreatorSmallPhotoUrl;
            feedItem.createdByName = comment.CreatedBy.Name;
            feedItem.textBody = comment.CommentBody;
            feedItem.createdDate = comment.CreatedDate;
            myCaseFeedItems.add(feedItem);
        }
        
        for(EmailMessage email : myCaseEmails)
        {
            CaseFeedItem feedItem = new CaseFeedItem();
            feedItem.creatorSmallPhotoUrl = null;
            feedItem.createdByName = email.FromName;
            feedItem.textBody = email.TextBody;
            feedItem.createdDate = email.MessageDate;
            myCaseFeedItems.add(feedItem);
        }
    }
And on my VF page:
 
<apex:repeat value="{!CaseFeedItems}" var="feedItem">
                        
      <div class="col-md-2 col-sm-2 xs-marginbottom">
            <img src="{!feedItem.creatorSmallPhotoUrl}" width="60" height="60" alt=""/><br/>
             <apex:outputText value="{!feedItem.createdByName}" />
       </div>
       <div class="col-md-10 col-sm-10">
              <apex:outputText value="{!feedItem.textBody}" />
               <br/><br/>
               <small>Date/Time Sent:&nbsp; 
                  <apex:outputText value="{0,date,MM'/'dd'/'yyyy  HH:MM}">
                        <apex:param value="{!feedItem.createdDate}" /> 
                  </apex:outputText>
               </small> 
       </div>
       <div class="col-md-12 col-sm-12">
           <hr/>
        </div>
</apex:repeat>


At the moment I get:

Error: Error occurred while loading a Visualforce page. on /confirmation/conf_caseView
Attempt to de-reference a null object 

And I would also like to find out how I would sort the "myCaseFeedItems" list by date

Hi I have a requiement where there are 100 bankers that will completed 5 hour shifts between 8am-9pm. We want to set a parameter of when their shift starts and ends so that we can activate their user in salesforce 5 minutes before the starting of their shift and 5 minutes after their shift ends. Please explain how you would make this work.
Hi all, I need some assistance.
We have a wizard type visualforce page developmnet that uses 3 objects- Lead, Custom obj 1 and Custom obj 2. The custom objects all have lookup relationships with the lead object.
What is supposed to happen is that we will send you a link to a site that includes the Lead Id, Page 1 that opens up has lead fields that need updating and Custom obj 1 records that need to be created when you select the Continue button. And we need to pass the Lead Id to Page 2.
On Page two when selecting Continue a record for Custom Obj 2 needs to be created and the Lead Id that was passed from Page 1 needs to be assigned to the Lead field on Custom Obj 2. We also need the Custom Obj 2 ID to be passed on to the next page, Page 3.

Can anyone help with the controller?

Hi all,

 

I am using a custom button.

I want to show user a file upload dialog to user when he clicks the custom button.

Did anyone have idea how to do it?

Tnx,

  • June 03, 2013
  • Like
  • 1

Define Parent Object:Foo with Standard Field "Name".
Define Child Object: Bar with Standard Field "Name" and Custom Field Lookup(Foo) (with Child Relationship Name Bars).
Define Grandchild Object: Ziff with Standard Field "Name" and Custom Field Lookup(Bar) (with Child Relationship Name Ziffs).

Background:

 

1. This queries the Parent Foo and makes elements of Bar visible:

Select Name,(Select Name from Bars__r) from Foo__c


2. This queries the Child Bar  and makes elements of Foo visible:

Select Name, Foo__r.Name From Bar__c where Foo__c  !=  null

3. These queries in the Grandchild work:

 

Select Name,  Bar__r.Name From Ziff__c

Select Name,  Bar__r.Name, Bar__r.Foo__r.Name From Ziff__c


I'm seeking a query on the Parent Foo, similar to #1, that makes elements of Bar and Ziff visible.

 

Thanks.

 

 

 

I am wondering if there is a way we can specify more than one components in rerender attribute of any component.

 

I guess one way we can achieve is to put all components to be rerendered in once panel and then rerender that panel. However, our requirement is that we need to rerender two components which cannot be put in a single panel due to the layout requirement.

 

Is there any way/workaournd to achieve this?

 

Thank you,

Hi,

 

Below is from my controller extension class. I have a VF page with standard controller as a custom object.

For the below line of code I get an error - Illegal assignment from Database.SaveResult to LIST<Database.SaveResult>

 

Code:

Database.SaveResult[] MySaveResult = Database.Insert(currTrip, false );

 

My code line is exactly as given in the Apex Developer's guide. I don't understand what's going wrong here!!

Any help is much appreciated.

 

Thanks.

I have created the lightning component and want to display it on VF page and render as PDF. For this, I have created a Lightning Dependency App and added it to VF page using $Lightning.createComponent(String type, Object attributes, String locator, function callback). 
I have followed steps mentioned in the following documentation: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_visualforce.htm
But nothing is displayed in PDF.

Here is the code:
App:
​<aura:application access="GLOBAL" extends="ltng:outApp">
    <aura:dependency resource="c:AccountSnapshotComponent"/>
</aura:application>

VF Page:
<apex:page renderAs="pdf" standardStylesheets="false">
    <apex:includeLightning />
    <div id="lightning" />
    <script>
        $Lightning.use("c:AccountSnapshotApp", function() {
            $Lightning.createComponent("c:AccountSnapshotComponent",
                                       { label : "Press Me!" },
                                       "lightning",
                                       function(cmp) {
                                           // do some stuff
                                       });
        });
    
    </script>
</apex:page>

 Please help to display data in PDF format.

Hi all,

 

I am using a custom button.

I want to show user a file upload dialog to user when he clicks the custom button.

Did anyone have idea how to do it?

Tnx,

  • June 03, 2013
  • Like
  • 1