• LitlleNinja
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 10
    Replies
Dear community,

I have created a few visualforce page who can be rendered as .pdf.

It's working well so far.
But i want and i really need to change the font size for one column.

I tried with the <font> attribute but it doesn't work.



here is an extract :



<apex:repeat value="{!Factures__c.Lignes_factures__r}" var="line">
   <tr >
      <td CLASS="MYTABLE" width="6%">{!rowNo}</td>
      <td width="60%" font-size="4px">
      <apex:OutputField value="{!line.Produit_ligne_facture__r.Name}"/><br/>
     <apex:OutputField value="{!line.Produit_ligne_facture__r.Description}" />
    
      
      </td>
      <td width="12%" align="right" ><apex:OutputField value="{!line.Tarif_mensuel_produit__c}"/></td>
      <td width="12%" align="right" ><b><apex:OutputField value="{!line.Nbre_de_mois_factures__c}"/></b></td>
      <td width="10%" align="right" ><apex:OutputField value="{!line.Montant_ligne_produit__c}"/></td>
   </tr>
  <apex:repeat>

I want to reduce the size of those datas :



<td width="60%" font-size="4px">
      <apex:OutputField value="{!line.Produit_ligne_facture__r.Name}"/><br/>
     <apex:OutputField value="{!line.Produit_ligne_facture__r.Description}" />
</td>
Thanks for your help i tried all the different thing that i found on the web but nothing work:/
Greetings,

Hi,

Following this post (made by myself) :

Hi,

I'm trying to make a autocomple with a home component.So far i found a way to it but it's perfect and i want to use parameters.

I tried to improved it, because the limit of Salesforce for an SOQL request is 50k records.

The Code_Postal__c object can have more than 50k of records.

I saw that we can parse item in javascript (i'm pretty bad with this language). The idea is to make a dynamic call of my controller when the user will start typing the postal code ( id of the field = #acc18zip ). But i got an error with my item list, so i came back to use my string but it didn't work. When i tried to find the error with the chrome console or firebug i saw this error into my console :

Uncaught SyntaxError: Unexpected end of input

and when i start typing a postal code:

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

My updated controller is this one :

global class cpSearch2{
    webService static String searchCP() {
        String pickValues='';
        for(Code_Postal__c cp : [Select Commune__c, Code_Postal__c from Code_Postal__c ]){
               pickValues = pickValues +cp.Code_Postal__c+ ' - ' + cp.Commune__c+'+';
        }
        return pickValues;
    }

    webService static string searchCP2(string searchTerm) {
        String pickValues='';
        for(Code_Postal__c cp : [Select Commune__c, Code_Postal__c from Code_Postal__c where Code_Postal__c LIKE :searchTerm]){
                pickValues = pickValues +cp.Code_Postal__c+ ' - ' + cp.Commune__c+'+';
        }
        return pickValues;
    }

    /*
    Function with list of object
    webService static list<Code_Postal__c> searchCP2(string searchTerm) {
        list<Code_Postal__c> matchingCP = new list<Code_Postal__c>();
        for(Code_Postal__c cp : [Select Commune__c, Code_Postal__c from Code_Postal__c where Code_Postal__c LIKE :searchTerm]){
               matchingCP.add(cp);
        }
        return matchingCP;
    }*/
}

and the updated javascript is :

<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="/soap/ajax/15.0/connection.js" type="text/javascript"></script>
<script src="/soap/ajax/15.0/apex.js" type="text/javascript"></script>
<script>
var url = document.URL;
if(url.indexOf('001')!=-1)   
{       
        var sid = document.cookie.match(' sid=([^;]*)')[1];       
        sforce.debug.trace=true;       
        sforce.connection.sessionId = sid;        ;
        var stages;
        var cpObjects;
        var queryTerm;
        $ = jQuery.noConflict();      
        $(function()            
            {                            
                $( "#acc18zip" ).autocomplete({
                       source:function( request, response ) {
                        queryTerm = request.term;
                        stages = sforce.apex.execute("cpSearch2", "searchCP2", {queryTerm,function(result, event)});
                        if(event.type == 'exception') {
                            alert(event.message);
                        } else {
                            cpObjects = stages.toString().split("+");
                            response(cpObjects);
                        }                      
                       },
                        focus: function( event, ui ) {
                            $("#acc18zip").val(selectedArray[0]);
                            $("#acc18city").val(selectedArray[1]);
                            return false;
                        },
                       select: function( event, ui ) {
                       console.log(ui.item);
                       selectedArray = ui.item.split(" - ");
                       $("#acc18zip").val(selectedArray[0]);
                       $("#acc18city").val(selectedArray[1]);
                       return false;
                        }
                });    
            });   
}
</script>

 

Hi,

 

I'm currently looking for the best way to allow an external application to create or requet on Salesforce Leads&Contacts.
I already read all the documentation , i've done the integration_workbook but i still don't understand one thing.

In the workbook or the online documentation they are talking about connected app and consumer key and secret key.

But it's sounds pretty weird for me that we automatically need to set the key to my server for every Salesforce environment.

The only thing that i want it's to let the customer approve (or not) the autorisation my external app to request on Salesforce.

 

My example is Cirrus insight, when the user allow the application(from gmail)  to communicate with Salesforce the user can create lead from this app. Nothing about connected app, remote site or all those kind of things.

Maybe i wasn't looking about the good documentation (rest,soap).

 

Thanks a lot for you help

 

Hi,

I created an home page component made with javascript.

It looks fine except that i don't  how to call my controller from my javascript. When i did from javascript from a visualforce page but from full javascript component it looks like the path is different.

 

I already read this article but it doesn't help( or maybe i just did'nt understand)

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_js_remoting.htm|StartTopic=Content%2Fpages_js_remoting.htm|SkinName=webhelp

 

Note: when i inspected with firebug i saw this message:

 

Uncaught ReferenceError: AutoCompleteController is not defined

 

 

Here my Controller : 

global with sharing class AutoCompleteController {
    private final Movie__c mov; 
       
        // Instance fields
        public String searchTerm {get; set;}
        public String selectedMovie {get; set;}
        
        // Constructor
        public AutoCompleteController() {
                
        }
         public AutoCompleteController(ApexPages.StandardController stdController) {
        this.mov= (Movie__c)stdController.getRecord();
    }
        // JS Remoting action called when searching for a movie name
    @RemoteAction
    global static List<Movie__c> searchMovie(String searchTerm) {
        System.debug('Movie Name is: '+searchTerm );
        List<Movie__c> movies = Database.query('Select Id, Name,BillingPostalCode__c from Movie__c where BillingPostalCode__c like \'%' + String.escapeSingleQuotes(searchTerm) + '%\'');
        return movies;
    }
    
    @RemoteAction
    global static List<Movie__c> searchMovie2(String searchTerm2) {
        System.debug('Movie Name is: '+searchTerm2);
        List<Movie__c> movies = Database.query('Select Id, Name,BillingPostalCode__c from Movie__c where BillingPostalCode__c like \'%' + String.escapeSingleQuotes(searchTerm2) + '%\'');
        return movies;
    }
}

 Here my javascript

 

:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"/>
<script type="text/javascript">
    /*Create a new variable j$ just to avoid any conflicts with other libraries which may be using $.*/
    var j$ = jQuery.noConflict();
    /*Capture the list of countries in a Array.*/
    var countryArray = ['India', 'USA', 'China','FInland','Norway','Netherlands','England','Ukraine','Russia','Japan','Korea','Burma','Srilanka','Iran','Iceland','Canada','Rome','Australia','Armenia','Albania','Afghanisthan'];
    /*on Document ready*/
    j$(document).ready(function(){
        var PLACEHOLDER = 'Enter Movie Name Here'; 
        var movieObjects;
        var queryTerm;
        j$('[id$=00Nb00000063dLB]').autocomplete({
            minLength: 2,
            source: function(request, response) {
                        queryTerm = request.term;
                        
						   AutoCompleteController.searchMovie2(request.term, function(result, event){
                            if(event.type == 'exception') {
                                  alert(event.message);
                            } else {
                                 movieObjects = result;
                                 response(movieObjects);
                            }
                        });
                   },
            focus: function( event, ui ) {
                    j$('[id$=00Nb00000063dLL]').val( ui.item.Name );
                    j$('[id$=00Nb00000063dLB]').val( ui.item.BillingPostalCode__c );
                    return false;
                    },
            select: function( event, ui ) {
                        j$('[id$=00Nb00000063dLL]').val( ui.item.Name );
                        return false;
                    },
         })
         
         .data( "autocomplete" )._renderItem = function( ul, item ) {
            var entry = "<a>" + item.Name + " " +item.BillingPostalCode__c;
           
            entry = entry + "</a>";
            entry = entry.replace(queryTerm, "<b>" + queryTerm + "</b>");
            return j$( "<li></li>" )
                .data( "item.autocomplete", item )
                .append( entry )
                .appendTo( ul );
        };
            
        /* Add or remove placeholder values*/
        j$('[id$=00Nb00000063dLL]').val(PLACEHOLDER);
       j$('[id$=00Nb00000063dLL]').on("focus",  function(event){
            j$tgt = j$(event.target);
            if(j$tgt.val() === PLACEHOLDER ){
                j$tgt.val('');
                j$tgt.removeClass('placeHolder');
            }
        });
        j$('[id$=00Nb00000063dLL]').on( "blur",  function(event){
            j$tgt = j$(event.target);
            if(j$tgt.val() === '' ){
                j$tgt.val(PLACEHOLDER);
                j$tgt.addClass('placeHolder');
            }
        });
		
    });
</script>  

 

 

Hi,

 

I know how to use apex but I really need help with javascript/Visualforce.

 

The main idea is to autocomplete two fields on a object (during editing) using a onther custom object on my organization.

After some days of search, i found a way to do it with visualforce/apex/js

 

The fact is that i don't want to create an other edit page for my object.

I saw this article talking about the  the homepage component.

I'm trying to call my controller who is making the request using the same js previously coded on my visual force page.

 

Initial page :

 

<apex:page standardController="Movie__c" extensions="AutoCompleteController" >
       <apex:stylesheet value="{!URLFOR($Resource.AutoCompleteWithModal, '/JQueryUI/css/ui-lightness/jquery-ui-1.8.17.custom.css')}"/>
<apex:includeScript value="{!URLFOR($Resource.AutoCompleteWithModal, '/JQueryUI/js/jquery-1.7.1.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.AutoCompleteWithModal, '/JQueryUI/js/jquery-ui-1.8.17.custom.min.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.AutoCompleteWithModal, '/JQueryModal/css/basic.css')}"/>
 

        <style>
                .displayNone { 
            display:none; 
        }
        .displayBlock {
            display:block;
        }
        .ui-autocomplete-loading { 
            background: white url(/img/loading32.gif) right center no-repeat;
            background-size:15px 15px; 
        }
                .placeHolder {
            font-style: italic;
        }
        </style>
        
        <apex:form id="autoCompleteForm" >
                

                     <apex:inputText id="movieTextBox" value="{!searchTerm}" styleClass="placeHolder"/>
                     <apex:inputHidden id="searchMovieId" value="{!selectedMovie}" />
                     <apex:inputText id="moviePC" value="{!searchTerm}" styleClass="placeHolder"/>
                     <apex:outputText id="id" value="{!Id}" />

                
        </apex:form>
        
        <script type="text/javascript">
        var PLACEHOLDER = 'Enter Movie Name Here'; 
        var movieObjects;
        var queryTerm;
        
        
             $('[id$=moviePC]').autocomplete({
            minLength: 2,
            source: function(request, response) {
                        queryTerm = request.term;
                        AutoCompleteController.searchMovie2(request.term, function(result, event){
                            if(event.type == 'exception') {
                                  alert(event.message);
                            } else {
                                 movieObjects = result;
                                 response(movieObjects);
                            }
                        });
                   },
            focus: function( event, ui ) {
                    $('[id$=movieTextBox]').val( ui.item.Name );
                    $('[id$=moviePC]').val( ui.item.moviePC__c );
                    return false;
                    },
            select: function( event, ui ) {
                        $('[id$=movieTextBox]').val( ui.item.Name );
                        $('[id$=searchMovieId]').val( ui.item.Id );
                        return false;
                    },
         })

        $('[id$=moviePC]').autocomplete({
            minLength: 2,
            source: function(request, response) {
                        queryTerm = request.term;
                        AutoCompleteController.searchMovie2(request.term, function(result, event){
                            if(event.type == 'exception') {
                                  alert(event.message);
                            } else {
                                 movieObjects = result;
                                 response(movieObjects);
                            }
                        });
                   },
            focus: function( event, ui ) {
                    $('[id$=movieTextBox]').val( ui.item.Name );
                    $('[id$=moviePC]').val( ui.item.moviePC__c );
                    return false;
                    },
            select: function( event, ui ) {
                        $('[id$=movieTextBox]').val( ui.item.Name );
                        $('[id$=searchMovieId]').val( ui.item.Id );
                        return false;
                    },
         })
         
         .data( "autocomplete" )._renderItem = function( ul, item ) {
            var entry = "<a>" + item.Name + " " +item.moviePC__c;
           
            entry = entry + "</a>";
            entry = entry.replace(queryTerm, "<b>" + queryTerm + "</b>");
            return $( "<li></li>" )
                .data( "item.autocomplete", item )
                .append( entry )
                .appendTo( ul );
        };
            
        // Add or remove placeholder values
        $('[id$=movieTextBox]').val(PLACEHOLDER);
        $('[id$=movieTextBox]').on("focus",  function(event){
            $tgt = $(event.target);
            if($tgt.val() === PLACEHOLDER ){
                $tgt.val('');
                $tgt.removeClass('placeHolder');
            }
        });
        $('[id$=movieTextBox]').on( "blur",  function(event){
            $tgt = $(event.target);
            if($tgt.val() === '' ){
                $tgt.val(PLACEHOLDER);
                $tgt.addClass('placeHolder');
            }
        });
    </script>

</apex:page>

 Controller :

 

 

 

/*
* Controller to implement the auto-complete feature on the Visualforce page
*/
global with sharing class AutoCompleteController {
    private final Movie__c mov; 
       
        // Instance fields
        public String searchTerm {get; set;}
        public String selectedMovie {get; set;}
        
        // Constructor
        public AutoCompleteController() {
                
        }
         public AutoCompleteController(ApexPages.StandardController stdController) {
        this.mov= (Movie__c)stdController.getRecord();
    }
        // JS Remoting action called when searching for a movie name
    @RemoteAction
    global static List<Movie__c> searchMovie(String searchTerm) {
        System.debug('Movie Name is: '+searchTerm );
        List<Movie__c> movies = Database.query('Select Id, Name,BillingPostalCode__c from Movie__c where BillingPostalCode__c like \'%' + String.escapeSingleQuotes(searchTerm) + '%\'');
        return movies;
    }
    
    @RemoteAction
    global static List<Movie__c> searchMovie2(String searchTerm2) {
        System.debug('Movie Name is: '+searchTerm2);
        List<Movie__c> movies = Database.query('Select Id, Name,BillingPostalCode__c from Movie__c where BillingPostalCode__c like \'%' + String.escapeSingleQuotes(searchTerm2) + '%\'');
        return movies;
    }
}

 

 

 

 

 

Dear community,

I have created a few visualforce page who can be rendered as .pdf.

It's working well so far.
But i want and i really need to change the font size for one column.

I tried with the <font> attribute but it doesn't work.



here is an extract :



<apex:repeat value="{!Factures__c.Lignes_factures__r}" var="line">
   <tr >
      <td CLASS="MYTABLE" width="6%">{!rowNo}</td>
      <td width="60%" font-size="4px">
      <apex:OutputField value="{!line.Produit_ligne_facture__r.Name}"/><br/>
     <apex:OutputField value="{!line.Produit_ligne_facture__r.Description}" />
    
      
      </td>
      <td width="12%" align="right" ><apex:OutputField value="{!line.Tarif_mensuel_produit__c}"/></td>
      <td width="12%" align="right" ><b><apex:OutputField value="{!line.Nbre_de_mois_factures__c}"/></b></td>
      <td width="10%" align="right" ><apex:OutputField value="{!line.Montant_ligne_produit__c}"/></td>
   </tr>
  <apex:repeat>

I want to reduce the size of those datas :



<td width="60%" font-size="4px">
      <apex:OutputField value="{!line.Produit_ligne_facture__r.Name}"/><br/>
     <apex:OutputField value="{!line.Produit_ligne_facture__r.Description}" />
</td>
Thanks for your help i tried all the different thing that i found on the web but nothing work:/
Greetings,

Hi,

Following this post (made by myself) :

Hi,

I'm trying to make a autocomple with a home component.So far i found a way to it but it's perfect and i want to use parameters.

I tried to improved it, because the limit of Salesforce for an SOQL request is 50k records.

The Code_Postal__c object can have more than 50k of records.

I saw that we can parse item in javascript (i'm pretty bad with this language). The idea is to make a dynamic call of my controller when the user will start typing the postal code ( id of the field = #acc18zip ). But i got an error with my item list, so i came back to use my string but it didn't work. When i tried to find the error with the chrome console or firebug i saw this error into my console :

Uncaught SyntaxError: Unexpected end of input

and when i start typing a postal code:

event.returnValue is deprecated. Please use the standard event.preventDefault() instead.

My updated controller is this one :

global class cpSearch2{
    webService static String searchCP() {
        String pickValues='';
        for(Code_Postal__c cp : [Select Commune__c, Code_Postal__c from Code_Postal__c ]){
               pickValues = pickValues +cp.Code_Postal__c+ ' - ' + cp.Commune__c+'+';
        }
        return pickValues;
    }

    webService static string searchCP2(string searchTerm) {
        String pickValues='';
        for(Code_Postal__c cp : [Select Commune__c, Code_Postal__c from Code_Postal__c where Code_Postal__c LIKE :searchTerm]){
                pickValues = pickValues +cp.Code_Postal__c+ ' - ' + cp.Commune__c+'+';
        }
        return pickValues;
    }

    /*
    Function with list of object
    webService static list<Code_Postal__c> searchCP2(string searchTerm) {
        list<Code_Postal__c> matchingCP = new list<Code_Postal__c>();
        for(Code_Postal__c cp : [Select Commune__c, Code_Postal__c from Code_Postal__c where Code_Postal__c LIKE :searchTerm]){
               matchingCP.add(cp);
        }
        return matchingCP;
    }*/
}

and the updated javascript is :

<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="/soap/ajax/15.0/connection.js" type="text/javascript"></script>
<script src="/soap/ajax/15.0/apex.js" type="text/javascript"></script>
<script>
var url = document.URL;
if(url.indexOf('001')!=-1)   
{       
        var sid = document.cookie.match(' sid=([^;]*)')[1];       
        sforce.debug.trace=true;       
        sforce.connection.sessionId = sid;        ;
        var stages;
        var cpObjects;
        var queryTerm;
        $ = jQuery.noConflict();      
        $(function()            
            {                            
                $( "#acc18zip" ).autocomplete({
                       source:function( request, response ) {
                        queryTerm = request.term;
                        stages = sforce.apex.execute("cpSearch2", "searchCP2", {queryTerm,function(result, event)});
                        if(event.type == 'exception') {
                            alert(event.message);
                        } else {
                            cpObjects = stages.toString().split("+");
                            response(cpObjects);
                        }                      
                       },
                        focus: function( event, ui ) {
                            $("#acc18zip").val(selectedArray[0]);
                            $("#acc18city").val(selectedArray[1]);
                            return false;
                        },
                       select: function( event, ui ) {
                       console.log(ui.item);
                       selectedArray = ui.item.split(" - ");
                       $("#acc18zip").val(selectedArray[0]);
                       $("#acc18city").val(selectedArray[1]);
                       return false;
                        }
                });    
            });   
}
</script>

 

Hi,

 

I'm currently looking for the best way to allow an external application to create or requet on Salesforce Leads&Contacts.
I already read all the documentation , i've done the integration_workbook but i still don't understand one thing.

In the workbook or the online documentation they are talking about connected app and consumer key and secret key.

But it's sounds pretty weird for me that we automatically need to set the key to my server for every Salesforce environment.

The only thing that i want it's to let the customer approve (or not) the autorisation my external app to request on Salesforce.

 

My example is Cirrus insight, when the user allow the application(from gmail)  to communicate with Salesforce the user can create lead from this app. Nothing about connected app, remote site or all those kind of things.

Maybe i wasn't looking about the good documentation (rest,soap).

 

Thanks a lot for you help

 

Hi,

I created an home page component made with javascript.

It looks fine except that i don't  how to call my controller from my javascript. When i did from javascript from a visualforce page but from full javascript component it looks like the path is different.

 

I already read this article but it doesn't help( or maybe i just did'nt understand)

http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_js_remoting.htm|StartTopic=Content%2Fpages_js_remoting.htm|SkinName=webhelp

 

Note: when i inspected with firebug i saw this message:

 

Uncaught ReferenceError: AutoCompleteController is not defined

 

 

Here my Controller : 

global with sharing class AutoCompleteController {
    private final Movie__c mov; 
       
        // Instance fields
        public String searchTerm {get; set;}
        public String selectedMovie {get; set;}
        
        // Constructor
        public AutoCompleteController() {
                
        }
         public AutoCompleteController(ApexPages.StandardController stdController) {
        this.mov= (Movie__c)stdController.getRecord();
    }
        // JS Remoting action called when searching for a movie name
    @RemoteAction
    global static List<Movie__c> searchMovie(String searchTerm) {
        System.debug('Movie Name is: '+searchTerm );
        List<Movie__c> movies = Database.query('Select Id, Name,BillingPostalCode__c from Movie__c where BillingPostalCode__c like \'%' + String.escapeSingleQuotes(searchTerm) + '%\'');
        return movies;
    }
    
    @RemoteAction
    global static List<Movie__c> searchMovie2(String searchTerm2) {
        System.debug('Movie Name is: '+searchTerm2);
        List<Movie__c> movies = Database.query('Select Id, Name,BillingPostalCode__c from Movie__c where BillingPostalCode__c like \'%' + String.escapeSingleQuotes(searchTerm2) + '%\'');
        return movies;
    }
}

 Here my javascript

 

:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css"/>
<script type="text/javascript">
    /*Create a new variable j$ just to avoid any conflicts with other libraries which may be using $.*/
    var j$ = jQuery.noConflict();
    /*Capture the list of countries in a Array.*/
    var countryArray = ['India', 'USA', 'China','FInland','Norway','Netherlands','England','Ukraine','Russia','Japan','Korea','Burma','Srilanka','Iran','Iceland','Canada','Rome','Australia','Armenia','Albania','Afghanisthan'];
    /*on Document ready*/
    j$(document).ready(function(){
        var PLACEHOLDER = 'Enter Movie Name Here'; 
        var movieObjects;
        var queryTerm;
        j$('[id$=00Nb00000063dLB]').autocomplete({
            minLength: 2,
            source: function(request, response) {
                        queryTerm = request.term;
                        
						   AutoCompleteController.searchMovie2(request.term, function(result, event){
                            if(event.type == 'exception') {
                                  alert(event.message);
                            } else {
                                 movieObjects = result;
                                 response(movieObjects);
                            }
                        });
                   },
            focus: function( event, ui ) {
                    j$('[id$=00Nb00000063dLL]').val( ui.item.Name );
                    j$('[id$=00Nb00000063dLB]').val( ui.item.BillingPostalCode__c );
                    return false;
                    },
            select: function( event, ui ) {
                        j$('[id$=00Nb00000063dLL]').val( ui.item.Name );
                        return false;
                    },
         })
         
         .data( "autocomplete" )._renderItem = function( ul, item ) {
            var entry = "<a>" + item.Name + " " +item.BillingPostalCode__c;
           
            entry = entry + "</a>";
            entry = entry.replace(queryTerm, "<b>" + queryTerm + "</b>");
            return j$( "<li></li>" )
                .data( "item.autocomplete", item )
                .append( entry )
                .appendTo( ul );
        };
            
        /* Add or remove placeholder values*/
        j$('[id$=00Nb00000063dLL]').val(PLACEHOLDER);
       j$('[id$=00Nb00000063dLL]').on("focus",  function(event){
            j$tgt = j$(event.target);
            if(j$tgt.val() === PLACEHOLDER ){
                j$tgt.val('');
                j$tgt.removeClass('placeHolder');
            }
        });
        j$('[id$=00Nb00000063dLL]').on( "blur",  function(event){
            j$tgt = j$(event.target);
            if(j$tgt.val() === '' ){
                j$tgt.val(PLACEHOLDER);
                j$tgt.addClass('placeHolder');
            }
        });
		
    });
</script>