• Salesforce 283
  • NEWBIE
  • 60 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 50
    Questions
  • 46
    Replies
Hi Guys,

I have written the simple code mentioned below. I don't know why it is displaying the records. Please help me on this.

<apex:page controller="AngularJS_Page2" docType="html-5.0" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="true" cache="false">
  <head>
  <meta charset="utf-8"/>
 <!-- <apex:includeScript value="{!URLFOR($Resource.AngularJS, '/lib/angular.js')}"/>
  <apex:includeScript value="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.js" />-->
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0/angular.min.js"/>
 </head>
    <div ng-app="myapp"  ng-controller="mycontroller">
    
  <table>
   <tr>
     <th>Name</th>
     <th>Phone</th>
   </tr>
   
   <tr ng-repeat="Acc in Accounts">
    <td ng-bind="Acc.name"></td>
    <td ng-bind="Acc.phone"></td>
   </tr>
  </table>
  </div>
 
 
 <script>
 var app=angular.module('myapp',[]);
 app.controller('mycontroller',funtion($scope){
    $scope.Accounts = {!Accountslist};
 });
 </script>
</apex:page>

Apex Class:

public with sharing class AngularJS_Page2 {

    public String getAccountslist() {
        return JSON.serialize([select id,name,phone from account]);
    }
}

Thanks in Advance.
Hi Guys,

I have a portal. When user is pre registered into the portal, user will get the mail to his mail id which entered in Pre registration form. After click the link in mail the registration process will be completed. In this process user is unable to see the link as hyperlink in mail.
Note: Mail template developed by using visualforce. Sometimes user able to see and unable to see the link.
Can you please tell me solution ASAP.

Thanks in Advance.
Hi Guys,
I have one rich text area field in case object. When user add the image in rich field and click save. It will be inserted into Content Data field in feed item object. Please help me out this problem and its very urgent.
Thanks in Adnavce.
 
Hi Guys,
I am using one custom button in detail page. When click that one vf page will open and in that i am opening another popup. In first popup, after clicking the save the page is redirecting to detail page in popup itself. But i want popup should be closed and redirect to detail page. Pls help me out very urgent. I used everything window.close() and location.href but its not working.
 
Hi Guys,
I used same functionality in another page its working fine. But i am using in another page its throwing an error msg when click on Del row button. Please help me out this problem very urgent. 

 
Apex Class:
 public void delrow(){
        deletestudentslist = new List<students>();
        Indexnum = Integer.valueof(ApexPages.currentPage().getParameters().get('index'));
        del = stdlist.remove(Indexnum);
        deletestudentslist.add(del);
   }

VF Page: 
<apex:column>
<apex:commandlink value="Delete Row" action="{!delrow}" rerender="d">
      <apex:param value="{!rownum}" name="index" />
     </apex:commandlink>
 </apex:column>
User-added image
Hi Guys,
  I want to implement a customer community. I don't know how to start this and which license i have to take. Please help me out this.


Thanks & Regards,
Mahesh.
Hi Guys,
 I have one table in that tick symbols are showing. Those tick marks will show automatically when particular field has in object. Actually if i remove renderas="pdf" it's showing. How can i show that in PDF and please help me out this problem.

Example:

<apex:page>
  <p style="color:red;font-size:20px"> &#10004;</p>
</apex:page>

Regards,
Mahesh.

 
Hi Guys,
I have one PDF page in that i want to display 10 pages of PDF document in Visualforce PDF. Actually that 10 pages of document changes often. So PDF doc put in document obj and display in VF PDF. Actually i can take separate page(without renderas) for PDF which is stored in document that is showed but whenever i put in VF PDF it's not getting. Please help me out this problem.
Script tag is not working in VF PDF. Could u pls suggest another solution.
Page:

<script>
        window.location.href = "data:application/pdf;base64,{!pdfdoc}";
</script>

Apex Class:
 public Classname(){
    doc = [SELECT id, Body, ContentType, Name FROM document where id='XXXXXXXXXXXXX'];
}
    public string pdfdoc {
    get {
    return EncodingUtil.Base64Encode(doc[0].body);
            }
        }
    
    }
Hi Guys,
   I developed one table in which each row(tr) has 3 td's. Here if i use more lengthy word in one td, the word is not getting into next line. I used wordwrap and overflow but not working in PDF. Please help me out this problem and observe bold words.

Sample Code:

<table style="width:90%;margin-left:5%;margin-right:5%;page-break-after:always;border:1px solid black;word-break: break-all;" cellspacing="0">
     <tr style="width:100%;border:1px solid black;">
       <td style="width:20%;text-align:center;border:1px solid black;word-break: break-all;table-layout:fixed;">
        <apex:outputlabel style="word-break: break-all;">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</apex:outputlabel>
       </td>
       <td style="width:20%;text-align:center;border:1px solid black;">
        <apex:outputlabel >XXXXXXXXXXXX</apex:outputlabel>
       </td>
       <td style="width:60%;text-align:left;border:1px solid black;"><!------word-wrap: break-word;word-break:break-all;------->
        <table style="width:100%;">
         <tr>
          <td>
           <ul style="list-style-type:dots;">
                <li>
                 <apex:outputlabel style="overflow-wrap: break-word;">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX</apex:outputlabel>
                </li>
                <li>
                 <apex:outputlabel style="word-break:keep-all;">XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX</apex:outputlabel>
                </li>
           </ul>
          </td>
         </tr>
        </table>
       </td>
      </tr>
    </table>
Hi Guys,

I created 10 PDF pages which has header image, images and page numbers. In those, i want to display some pages override header image and page numbers. Please help me out this problem.

Here i used:
<apex:page>
<style>
            @page {
                   margin-top: 3.0cm;
                   margin-left: 0cm;
                   margin-right: 0cm;
            @top-center {
                  background-image: url('{!$Resource.con_header}')
                  width:100%;
                }
          }
          
        @page{
          @bottom-right {
                  content: "Page " counter(page) " of " counter(pages);
                  padding-bottom:20px;
                  padding-right:40px;
              }   
            }
        </style>

<div>
        <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page4.tif')}" width="100%" height="875px"/>
         <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page5.tif')}" width="100%" height="875px"/>
          <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page6.tif')}" width="100%" height="875px"/>    
           <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page7.tif')}" width="100%" height="875px"/>     
            <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page8.tif')}" width="100%" height="875px"/>       
             <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page9.tif')}" width="100%" height="875px"/>        
              <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page10.tif')}" width="100%" height="875px"/>
    </div>    
</apex:page>

What i mentioned above, i can display header in all pages and page numbers.
Those above images i have to display without header and page numbers. How can i?
Hi Guys,

I created 15 PDF pages which has header image, images and page numbers. In those, i want to display some pages override header image by using images and page numbers. Please help me out this problem.

Here i used:
<apex:page>
<style>
            @page {
                   margin-top: 3.0cm;
                   margin-left: 0cm;
                   margin-right: 0cm;
            @top-center {
                  background-image: url('{!$Resource.con_header}')
                  width:100%;
                }
          }
          
        @page{
          @bottom-right {
                  content: "Page " counter(page) " of " counter(pages);
                  padding-bottom:20px;
                  padding-right:40px;
              }   
            }
        </style>

<div>
        <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page4.tif')}" width="100%" height="875px"/>
         <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page5.tif')}" width="100%" height="875px"/>
          <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page6.tif')}" width="100%" height="875px"/>    
           <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page7.tif')}" width="100%" height="875px"/>     
            <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page8.tif')}" width="100%" height="875px"/>       
             <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page9.tif')}" width="100%" height="875px"/>        
              <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page10.tif')}" width="100%" height="875px"/>
    </div>    
</apex:page>

What i mentioned above, i can display header in all pages and page numbers.
Those above images i have to display without header and page numbers. How can i?


Thanks,
Mahesh.
Hi Guys,

I created one PDF page and have shown page numbers. But some pages has images, in that page numbers have to hide or behind the image in those pages. 
All pages has header image but i want to hide or behind the images in which pages has images.
Hi Guys,
I created one zip file and put in static resource which has images. I mentioned each image in VF PDF page and displayed. Here i want to display dynamically which means that today i put 4 images tomorrow i will put 6 images. So dont want to mention remianing images it will show all images automatically. Is it possible to write a loop on zipfile.
 
Hi Guys,

I put Zipfile in static resource which named as pdfimages.zip and MIME type showed as image/png. In that so many images and  i want to display one by one image in Visualforce PDF pages.  Please help me out this problem.


Regards,
Mahesh.
Hi Guys,
I write one time apex:image it will show in all pages. So i used static resource but it didn't come and often i had to write apex:image. I tried whatever examples in google. So please try in your org and help me out this problem.

Static Resource:
<style type="text/css" media="print">
div.header {
position: running(header);
}
@page
{
margin-top: -0.2in;
margin-left:-0.1in;
margin-right:-0.1in;
@top-center
{ content: element(header);
background-image: url('{!$Resource.Con_Header}');
}
}
</style>
 
Hi Guys,
I want to display header image in all pages in PDF.
I have tried like this. If i call apex:image it came in every page with this styles. In order to call apex:image often i put image in static resource but its not working. Here without mentioned div class in page, styles are working. Please help me out this.
Thanks in Advance.


Static Resource:

<style type="text/css" media="print">
div.header {
position: running(header);
}
@page {
margin-top: -0.2in;
margin-left:-0.1in;
margin-right:-0.1in;
@top-center {
content: element(header);
background-image: url('{!$Resource.Con_Header}'); }
}
</style>

VF Page:

<apex:page>
<apex:stylesheet value="{!URLFOR($Resource.Cont_PDF_Styles)}"/>
<apex:image value="{!$Resource.Con_Header}" />
</apex:page>
 

Hi Guys,

I put one pdf file in static resource. So i need to display that file in vf page. 
How can i call pdf file and help me out this problem.



Thanks,
Mahesh.

Hi Guys,

I have created one PDF page. So i want to add one more PDF into this PDF. Is it possible to do that. If it is possible how can i do that please help me out this problem.


Thanks,
Mahesh.
Hi Guys,

I have put header image in static resource that calling in vf page but its not working. I had to mention apex:image in vf page again where i want to see the header.  So could you please help me out this problem and i don't want to mention apex:image.

div.header{
    position: running(header) ; 
}
@page {
        margin-top: -0.2in;
        margin-left:-0.1in;
        margin-right:-0.1in;
        
      @top-center { 
              content: element(header);
        background-image: url('{!$Resource.Con_Header}');
   }
 }


Thanks,
MAhesh.
Hi Guys,

  I need to display header images which is full width image that apply all pages in PDF. Styles are not working when styles write in page itself. So i wrote in static resource and please help me out this problem.
Hi folks,

I have written one class in org1.I generated wsdl file and partner wsdl of that class. I login to other salesforce org2 and import those two files into this org. I created one stub class in org2 and using this class i have called those classes and methods and callout this stub class using developer console. While executing this class it throws an error [System.CalloutException: IO Exception: Unauthorized endpoint, please check Setup-&gt;Security-&gt;Remote site settings. endpoint = https://login.salesforce.com/services/Soap/u/34.0]. I have pasted login url in Remote site settings in org 2.

Apex class in Org1:
global class webservicesoap1
{
 webservice static string createcontact(string Fname,string Lname,String phone)
 {
 list<contact> conlist=[select id from contact where firstname =:fname and lastname =:lname and phone =:phone];
  if(conlist.size()!=0)
   {
    return 'contact already exists';
    }
    else{
     contact c=new contact();
     c.firstname=fname;
     c.lastname=lname;
     c.phone=phone;
     insert c;
     return c.id;
     }
     }
     }

Stub Class i implemented in org2:

public class soapcallout
{

    public soapcallout(ApexPages.StandardController controller) {

    }

 public soapcallout()
 {
    partnerSoapSforceCom.soap spc=new partnerSoapSforceCom.soap();
    string username ='sfgt@283.com';
    string password ='radhekrishna***AIyGjqKUpuRnKaBzoX6XRUnzH';
    partnerSoapSforceCom.loginresult loginresult = spc.login(username, password);
    system.debug(loginresult.sessionid);
    
    soapSforceComSchemasClassWebservice.webservicesoap1 websrvc= new soapSforceComSchemasClassWebservice.webservicesoap1();
    soapSforceComSchemasClassWebservice.SessionHeader_element sessionheader =new soapSforceComSchemasClassWebservice.SessionHeader_element();
    sessionheader.sessionid = loginresult.sessionid;
    websrvc.timeout_x = 120000;
    websrvc.sessionheader = sessionheader;
    string s = websrvc.createcontact('Mahesh','Krishna','9526389523');
    }
    }



 
Hi Guys,
I used same functionality in another page its working fine. But i am using in another page its throwing an error msg when click on Del row button. Please help me out this problem very urgent. 

 
Apex Class:
 public void delrow(){
        deletestudentslist = new List<students>();
        Indexnum = Integer.valueof(ApexPages.currentPage().getParameters().get('index'));
        del = stdlist.remove(Indexnum);
        deletestudentslist.add(del);
   }

VF Page: 
<apex:column>
<apex:commandlink value="Delete Row" action="{!delrow}" rerender="d">
      <apex:param value="{!rownum}" name="index" />
     </apex:commandlink>
 </apex:column>
User-added image
Hi Guys,
   I developed one table in which each row(tr) has 3 td's. Here if i use more lengthy word in one td, the word is not getting into next line. I used wordwrap and overflow but not working in PDF. Please help me out this problem and observe bold words.

Sample Code:

<table style="width:90%;margin-left:5%;margin-right:5%;page-break-after:always;border:1px solid black;word-break: break-all;" cellspacing="0">
     <tr style="width:100%;border:1px solid black;">
       <td style="width:20%;text-align:center;border:1px solid black;word-break: break-all;table-layout:fixed;">
        <apex:outputlabel style="word-break: break-all;">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</apex:outputlabel>
       </td>
       <td style="width:20%;text-align:center;border:1px solid black;">
        <apex:outputlabel >XXXXXXXXXXXX</apex:outputlabel>
       </td>
       <td style="width:60%;text-align:left;border:1px solid black;"><!------word-wrap: break-word;word-break:break-all;------->
        <table style="width:100%;">
         <tr>
          <td>
           <ul style="list-style-type:dots;">
                <li>
                 <apex:outputlabel style="overflow-wrap: break-word;">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXX</apex:outputlabel>
                </li>
                <li>
                 <apex:outputlabel style="word-break:keep-all;">XXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX</apex:outputlabel>
                </li>
           </ul>
          </td>
         </tr>
        </table>
       </td>
      </tr>
    </table>
Hi Guys,

I created 10 PDF pages which has header image, images and page numbers. In those, i want to display some pages override header image and page numbers. Please help me out this problem.

Here i used:
<apex:page>
<style>
            @page {
                   margin-top: 3.0cm;
                   margin-left: 0cm;
                   margin-right: 0cm;
            @top-center {
                  background-image: url('{!$Resource.con_header}')
                  width:100%;
                }
          }
          
        @page{
          @bottom-right {
                  content: "Page " counter(page) " of " counter(pages);
                  padding-bottom:20px;
                  padding-right:40px;
              }   
            }
        </style>

<div>
        <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page4.tif')}" width="100%" height="875px"/>
         <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page5.tif')}" width="100%" height="875px"/>
          <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page6.tif')}" width="100%" height="875px"/>    
           <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page7.tif')}" width="100%" height="875px"/>     
            <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page8.tif')}" width="100%" height="875px"/>       
             <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page9.tif')}" width="100%" height="875px"/>        
              <apex:image url="{!URLFOR($Resource.Brochure, 'Brochure/Page10.tif')}" width="100%" height="875px"/>
    </div>    
</apex:page>

What i mentioned above, i can display header in all pages and page numbers.
Those above images i have to display without header and page numbers. How can i?
Hi Guys,

I put Zipfile in static resource which named as pdfimages.zip and MIME type showed as image/png. In that so many images and  i want to display one by one image in Visualforce PDF pages.  Please help me out this problem.


Regards,
Mahesh.
Hi Guys,
I write one time apex:image it will show in all pages. So i used static resource but it didn't come and often i had to write apex:image. I tried whatever examples in google. So please try in your org and help me out this problem.

Static Resource:
<style type="text/css" media="print">
div.header {
position: running(header);
}
@page
{
margin-top: -0.2in;
margin-left:-0.1in;
margin-right:-0.1in;
@top-center
{ content: element(header);
background-image: url('{!$Resource.Con_Header}');
}
}
</style>
 
Hi Guys,
I want to display header image in all pages in PDF.
I have tried like this. If i call apex:image it came in every page with this styles. In order to call apex:image often i put image in static resource but its not working. Here without mentioned div class in page, styles are working. Please help me out this.
Thanks in Advance.


Static Resource:

<style type="text/css" media="print">
div.header {
position: running(header);
}
@page {
margin-top: -0.2in;
margin-left:-0.1in;
margin-right:-0.1in;
@top-center {
content: element(header);
background-image: url('{!$Resource.Con_Header}'); }
}
</style>

VF Page:

<apex:page>
<apex:stylesheet value="{!URLFOR($Resource.Cont_PDF_Styles)}"/>
<apex:image value="{!$Resource.Con_Header}" />
</apex:page>
 

Hi Guys,

I put one pdf file in static resource. So i need to display that file in vf page. 
How can i call pdf file and help me out this problem.



Thanks,
Mahesh.

Hi Guys,

I have created one PDF page. So i want to add one more PDF into this PDF. Is it possible to do that. If it is possible how can i do that please help me out this problem.


Thanks,
Mahesh.
Hi Guys,
      How to apply horizontal lines each row in PDF(not normal visualforce page). Please help me out this problem.


Thanks,
Mahesh.
  
Hi Guys,

I want to write a validation in one object. I will have to write on picklist(ISPICKVAL) but i need to implement contains function in picklist field and how to write that. Please provide me some examples.

Thanks,
Mahesh.
Hi Guys,

When i click on custom button it will generate the PDF file and insert into attachments. So when i was trying to open the file it was showing  "Failed to Load PDF Document" but its working in firefox. So could you please help me out this problem and find out the attachment.User-added image

Thanks,
Mahesh.
Hi Guys,
Location.href used in custom button, its working in firefox but not working in google chrome.


Thanks,
Gopi.