• Egui
  • NEWBIE
  • 40 Points
  • Member since 2011

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

Hi,

I have a custom object in which i have 2 different stages.

I am pulling some fields(type: number, formula) based on 2 different stages in 2 different columns  in a page block table.

In the 3rd column i want to calculate the difference between the 1st two columns.

 

Please let me know how to do this.

 

Thanks in advance.

I can't access my trailhead account.

When I log in I get a trail exprired error message.

Could someone please help me ? I've already emailed trailhead@salesforce.com twice about this but no answer.

Thanks a lot.
  • February 17, 2016
  • Like
  • 0
Hi,

I'm trying to automatically create quote and sync it after opportunity and product lines creation.

Here is my code :
 
Pricebook2 pb = [select Id from Pricebook2 where Name = 'Magasins EuroCave - prix publics'];
        
        Opportunity opp = new Opportunity(
            Name = 'Test',
            CloseDate = System.Today(),
            StageName = 'Prospecting',
            AccountId = accountId
            //Campaign
        );
        insert opp;
        
        Map<Id, PriceBookEntry> pbeMap = new Map<Id, PriceBookEntry>();
        for(PriceBookEntry pbe : [Select Id, Product2Id, UnitPrice From PriceBookEntry Where Product2Id IN: produitsCommandeIds And Pricebook2Id =: pb.Id])
        {
            pbeMap.put(pbe.Product2Id, pbe);
        }
        
        List<OpportunityLineItem> oppLis = new List<OpportunityLineItem>();
        for(ProduitStockMutualiseWrapper pc : produitsCommande)
        {
            OpportunityLineItem oppLineItem = new OpportunityLineItem(
                OpportunityId = opp.Id,
                PricebookEntryId = pbeMap.get(pc.produit.Id).Id,
                Quantity = pc.quantiteCommande,
                Discount = pc.remise,
                UnitPrice = pbeMap.get(pc.produit.Id).UnitPrice,
                Date_prochain_camion__c = pc.dateProchainCamion
            );
            oppLis.add(oppLineItem);
        }
        insert oppLis;
        
        Quote qte = new Quote(
            Name = 'Devis-' + opp.Name,
            OpportunityId = opp.Id
        );
        insert qte;
        
        opp.SyncedQuoteId = qte.Id;
        update opp;
Everything is fine until I try to snyc the quote, the quote is created and sync but the product lines aren't created :(
If I remove the sync the product lines are correctly created.

How can I keep both the sync and the product line creation ?

Thanks for your help.
 
  • January 28, 2016
  • Like
  • 0
Hello all,

I have create a visualforce page showing standard object contract details using apex:details.
When the page is displayed from withing Salesforce (i.e. https://instance.visual.force.com/apex/testContrat?id=XXX)
in the related list NotesAndAttachment both notes and attachment are visible and clickable (cf. below) :
User-added image

But when the page is displayed from Salesforce site (i.e. http://site.force.com/apex/testContrat?id=XXX)
in the related list NotesAndAttachment both notes and attachment are visible BUT NOT clickable (cf. below) :

User-added image
I think this has to do with the profile of user associated with Salesforce site, but I can't figure why.

Could you please advise ?

Thanks you very much.
 
  • November 18, 2014
  • Like
  • 0
Is it possible to dynamically select (on criterias) a queue or queue users when submitting an approval process ?
  • July 15, 2014
  • Like
  • 0
Hello,

I running in a very strange issue, I've written a custom controller and it's working fine when I test it.

But when I try to execute the test I get the following error : CompileFail : line 65, column 47: Constructor not defined: [ALS_REDIRECT_CONTROLLER].<Constructor>(NULL)

and if I try recompile all apex classes, I get this error : line 65, column 47: Constructor not defined: [ALS_REDIRECT_CONTROLLER].<Constructor>(NULL)

I can't manage to find the solution here, could you please advise ?

Thanks a lot.
  • July 01, 2014
  • Like
  • 1

Hello,

 

I need some help with using an url field in a visualforce email template.

 

Here's my code :

 

<messaging:emailTemplate subject="Email subject" recipientType="Contact" relatedToType="Opportunity" 
replyTo="{!$User.Email}" >
<messaging:htmlEmailBody >
<apex:dataTable value="{!relatedTo.OpportunityLineItems}" var="line" width="100%">
<apex:column >
<apex:outputLink value="{!line.PricebookEntry.Product2.WebLink__c}">Link</apex:outputLink>
</apex:column>
</apex:dataTable>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 

In the generated email, if the field WebLink__c doesn't begin with 'http://' Salesforce replaces it with "https://eu3.salesforce.com/email/author/".

 

For exemple, if I have 'http://www.salesforce.com' in the field WebLink__c, I'm correctly redirected.

 

Instead if I have 'www.salesforce.com' in the field WebLink__c, I'm redirected to "https://eu3.salesforce.com/email/author/www.salesforce.com" which leads to the Salesforce login page (https://login.salesforce.com).

 

Is there a way to make work properly for fields without 'http://' (e.g. a param for apex:outputlink) ?

 

Thanks for your help.

  • October 25, 2013
  • Like
  • 0

Hi !

 

I'm currently running in the following issue :

 

I've defined a custom setting, hierachy type and public visibility.


It contains a text field, this field is filled with a value.


In an apex class, I retrieve this custom setting like this :

global class MyClass{
    
    private static String latitudeLongitude = CustomSetting__c.getInstance().TextField1__c;

}

 

Then I use this field in a method of this class and this is working fine, the value is correctly retrieved.


But when I lanch the following test class, a NullPointerException is thrown on the same line that retrieve the custom setting value.

This is odd because custom settings are initiazed in the test class (This is apex v27)

This is the test method :

static testMethod void TestGoogleGeoCodeUpdater(){
        //Création des custom settings pour les tests
        ALTGEOCODE__Geocode__c CS = new ALTGEOCODE__Geocode__c(
            ALTGEOCODE__Champ_coordonnees__c = 'ALTGEOCODE__Geolocation__c'
        );
        insert CS;
        
        Account compte1 = new Account(
            Name              = 'Test',
            BillingStreet     = 'Revaison Street',
            BillingPostalCode = '60000',
            BillingCity       = 'SP',
            BillingState      = 'Rhône',
            BillingCountry    = 'FRANCE'
        );
        insert compte1;
    }

 

I'm really stuck here, help would be appreciated.

 

Thanks a lot.

  • May 31, 2013
  • Like
  • 0

Hi,

 

I've created an UrlFor formula called by a button to prefill some field when creating a new record :

 

On one org I have the following formula :

 

{!URLFOR($Action.ALS_Ligne_de_facture__c.New, null,
[
"p3" = "012Q00000008vJ1",
"retURL" = Opportunity.Id,
"saveURL" = Opportunity.Id,
"save"=1
],
true)}

 Which is leading directly to the record creation screen with the recordtype preselected :

 

https://cs3.salesforce.com/a0T/e?retURL=%2Fservlet%2Fservlet.Integration%3FscontrolCaching%3D1%26lid%3D00bQ0000000EFiE%26eid%3D006Q000000BFQiQ%26ic%3D1&RecordType=012Q00000008vJ1&ent=01IQ00000005Bm0&nooverride=1&saveURL=https%3A%2F%2Fcs3.salesforce.com%2F006Q000000BFQiQ

 

And on another org, I have the following formula :

 

{!URLFOR($Action.DA_Depense__c.New, null,
[
"p3" = "012W00000004QKj",
"retURL" = DA__c.Id,
"saveURL" = DA__c.Id,
"save" = 1
],
true)}

 Which is exctaly the same to me (except for the objects) and is leading to the recordtype selection screen :

 

https://cs13.salesforce.com/setup/ui/recordtypeselect.jsp?ent=01IW00000008mPU&retURL=a0NW00000011Cq7&save_new_url=%2Fa0d%2Fe%3FretURL%3D%252Fservlet%252Fservlet.Integration%253FscontrolCaching%253D1%2526lid%253D00bW0000000Hy2s%2526eid%253Da0NW00000011Cq7%2526ic%253D1&nooverride=1&p3=012W00000004QKj&saveURL=a0NW00000011Cq7&save=1

 

Any idea why the second formula does not have the same behavior than the first one ?

 

They both are on sandbox org with summer '13.

 

Thanks for the help.

 

  • May 17, 2013
  • Like
  • 0

Hello,

 

I'm struggling to write an SOQL query to get all contacts which are alone on their account.

 

In other words get all accounts with only one contact and get those contacts.

 

Help would be very welcome.

 

Thanks !

  • May 14, 2013
  • Like
  • 0

Hello,

 

I'm facing an issue with a custom VF component and custom apex controlleur, the return value when reading attribute from it is still NULL.

 

Here is the VF component :

 

<apex:component controller="customControlleur"> 
    <apex:attribute name="attribute" description="" assignTo="{!attribute}" type="String"></apex:attribute>
</apex:component>

 

And the controlleur :

 

public class customController {
    
    public String  attribute { get; set; }

    public customController() {
        system.debug('&&& attribute ' + attribute );
    }
}

 

I also tried what is described here, but with no more luck :

http://www.salesforce.com/us/developer/docs/pages/Content/pages_comp_cust_elements_controllers.htm

 

Any help would be greatly appreciated.

 

Thanks !

  • May 02, 2013
  • Like
  • 0

Hello,

 

I'm stuck on a SOQL query, I want to get the pricebookentryid in a single query to square some selects.

 

I have this :

 

        Id idProduit       = [SELECT Id, Produit__c
                                 FROM Opportunity
                                 WHERE Id =: opp.id].Produit__c;
        
        String codeProduit = [SELECT Id, ProductCode
                                 FROM Product2
                                 WHERE Id =: idProduit].ProductCode;
        Id idPbe           = [SELECT Id
                                 FROM PriceBookEntry
                                 WHERE ProductCode=: codeProduit
                                 AND CurrencyIsoCode =: opp.CurrencyIsoCode].Id;

 

Is it possible to resume it in a single query ?

 

Thanks for your help.

  • March 29, 2013
  • Like
  • 0

Hi,

 

I'm using a dataTable to display data :

 

<apex:dataTable value="{!relatedTo.OpportunityLineItems}" var="line" width="100%">
            <apex:column headerValue="col1">
                <apex:outputText value="data"/>
            </apex:column>
            <apex:column headerValue="col2">
               <apex:outputText value="data"/>
            </apex:column>
        </apex:dataTable>

 and i would like to have a new line after each line of the table

 

I tried to put some <br/> but this is not working, I also tried with CSS lign-heigt but this is not recognized in mail web clients.

 

Thanks for help.

  • September 29, 2011
  • Like
  • 0

Hi there,

 

I'm using Visualforce and Google Map API, the page used to work well but now I got an error : "Map key state not found in map. "

 

I'm using Google Map API v3 so it doesn't require an API key, so I suppose it's coming from the visualforce but

after hours searching the code and the web, I can't figure it out.

 

I'm using a customized version of Find Nearby AppExchange application.

 

A hand would be great.

 

Thanks for reading.

  • September 15, 2011
  • Like
  • 0

Hi there,

 

I tring to use the HTMLENCODE function documented by Salesforce on a string variable,

 

here is my sample code :

 

address += a.BillingPostalCode == NULL ? '' : ({!HTMLENCODE(a.BillingPostalCode)});

 

but it returns the following error : "Error: Compile Error: unexpected token: '{' "

 

It seems this function is only available when using in an apex component :

 

<apex:outputText value=" {!HTMLENCODE(myTextField)}" escape="false"/>



is that correct ?

 

how this possible to this with a string in a variable ?

 

Any advice would great.

 

Thanks

  • September 01, 2011
  • Like
  • 0

Hi there,

 

We are using the FindNearby App for one of our customer and we have like 200K accounts to geoloc.

Is there any best practices to do that ? Considering google map API has a limitation to 50 000 requests per day. Beyond that it returns a "Google Exhausted" error.

Thanks for advice.


  • September 01, 2011
  • Like
  • 0
Hello,

I running in a very strange issue, I've written a custom controller and it's working fine when I test it.

But when I try to execute the test I get the following error : CompileFail : line 65, column 47: Constructor not defined: [ALS_REDIRECT_CONTROLLER].<Constructor>(NULL)

and if I try recompile all apex classes, I get this error : line 65, column 47: Constructor not defined: [ALS_REDIRECT_CONTROLLER].<Constructor>(NULL)

I can't manage to find the solution here, could you please advise ?

Thanks a lot.
  • July 01, 2014
  • Like
  • 1
I can't access my trailhead account.

When I log in I get a trail exprired error message.

Could someone please help me ? I've already emailed trailhead@salesforce.com twice about this but no answer.

Thanks a lot.
  • February 17, 2016
  • Like
  • 0
Hello,

I running in a very strange issue, I've written a custom controller and it's working fine when I test it.

But when I try to execute the test I get the following error : CompileFail : line 65, column 47: Constructor not defined: [ALS_REDIRECT_CONTROLLER].<Constructor>(NULL)

and if I try recompile all apex classes, I get this error : line 65, column 47: Constructor not defined: [ALS_REDIRECT_CONTROLLER].<Constructor>(NULL)

I can't manage to find the solution here, could you please advise ?

Thanks a lot.
  • July 01, 2014
  • Like
  • 1
I want to create a relationship between two contacts and have the relationship listed in the same related list on both contacts.

I created a relationship junction record using 2 lookup fields to the contact object. When I create the record it wont display the relation in the same related list on each object. In order to do that, upon creating the relationship record I need apex to duplicate the record and at the same time insert the same fields for the lookup but just switch them around, contact "A" and contact "B" should switch positions on the duplicate.

I tried writing some apex put im having trouble withe the creation of a new record, as opposed to an update on the current one.

trigger NewRelationship on Relationship__c (after insert) {

List<relationship__c> RecToInsert = new List <relationship__c> ();

for (relationship__c x : Trigger.new) {

    x.First_person_in_relationship__c = x.Second_person_in_relationship__c;
    x.First_person_is_second_persons__c = x.Second_Person_is_first_persons__c;
    x.Second_person_in_relationship__c = x.First_person_in_relationship__c;
    x.Second_Person_is_first_persons__c = x.First_person_is_second_persons__c;

    RecToInsert.add(x);

    try{

    insert RecToInsert;
    } catch (system.Dmlexception e) {
    system.debug (e);
    }

}
}



I also tried


trigger NewRelationship on Relationship__c (after insert) {

    List<relationship__c> RecToInsert = new List <relationship__c> ();

    for (relationship__c x : Trigger.new) {
        
                        RecToInsert.add(
                                new relationship__c(
        
        First_person_in_relationship__c = x.Second_person_in_relationship__c,
        First_person_is_second_persons__c = x.Second_Person_is_first_persons__c,
        Second_person_in_relationship__c = x.First_person_in_relationship__c,
        Second_Person_is_first_persons__c = x.First_person_is_second_persons__c)
   
  ); }
        INSERT RecToInsert;
       
   

    
}

I created a VF Page so the view for a custom object would show the related list as tabs. The page works great within the full app, but it gives the error "Error occurred while loading a Visualforce page" when any customer portal(coummunity) users tries to view a record in the object.  I turned on debug, but it does not give me any details on the error. 

 

The portal user profile does have the VF page assigned to it. 

 

Below is the code for the page and below that is the debug log. 

 

Any help would be much appreciated.  

 

 

<apex:page standardController="LCM_Services__c" showHeader="true" >
<apex:messages />
    <apex:tabPanel switchType="client"  selectedTab="name" id="theTabPanel">
        <apex:tab label="Project" name="LCM_Services__c" id="tabdetails">
            <apex:detail relatedList="false" title="true"/>
            </apex:tab>
        <apex:tab label="Related Assets" name="LCM_Asset__c" id="tablcmassets">
            <apex:relatedList list="LCMAssets__r"/> 
        </apex:tab>
         <apex:tab label="Trip Reports" name="Trip_Report__c" id="tabtripreports">
            <apex:relatedList list="Trip_Reports__r"/> 
        </apex:tab>
        <apex:tab label="Battery Management" name="Battery_Management__c" id="tabbatterymgmt">
            <apex:relatedList list="Battery_Management__r"/> 
        </apex:tab>
        <apex:tab label="Notes and Attachments" name="NotesAndAttachments" id="tabNoteAtt">
            <apex:relatedList list="NotesAndAttachments" /> 
        </apex:tab>
        <apex:tab label="Activity History" name="ActivityHistory" id="tabActHistory">
            <apex:relatedList list="ActivityHistories" /> 
        </apex:tab>
        <apex:tab label="Open Activities" name="OpenActivities" id="tabOpenAct">
            <apex:relatedList list="OpenActivities" /> 
        </apex:tab>       
    </apex:tabPanel>    
</apex:page>

 

28.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
09:38:10.052 (52510000)|EXECUTION_STARTED
09:38:10.052 (52554000)|CODE_UNIT_STARTED|[EXTERNAL]|066a00000016pcz|VF: /apex/tabbedProject
09:38:10.895 (158993000)|CUMULATIVE_LIMIT_USAGE
09:38:10.895|LIMIT_USAGE_FOR_NS|(default)|
  Number of SOQL queries: 0 out of 100
  Number of query rows: 0 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 0 out of 150
  Number of DML rows: 0 out of 10000
  Number of code statements: 0 out of 200000
  Maximum CPU time: 0 out of 10000
  Maximum heap size: 0 out of 6000000
  Number of callouts: 0 out of 10
  Number of Email Invocations: 0 out of 10
  Number of fields describes: 0 out of 100
  Number of record type describes: 0 out of 100
  Number of child relationships describes: 0 out of 100
  Number of picklist describes: 0 out of 100
  Number of future calls: 0 out of 10

09:38:10.895|CUMULATIVE_LIMIT_USAGE_END

09:38:10.159 (159045000)|CODE_UNIT_FINISHED|VF: /apex/tabbedProject
09:38:10.159 (159056000)|EXECUTION_FINISHED
  • October 25, 2013
  • Like
  • 0

Hi,

I have a custom object in which i have 2 different stages.

I am pulling some fields(type: number, formula) based on 2 different stages in 2 different columns  in a page block table.

In the 3rd column i want to calculate the difference between the 1st two columns.

 

Please let me know how to do this.

 

Thanks in advance.

Hi !

 

I'm currently running in the following issue :

 

I've defined a custom setting, hierachy type and public visibility.


It contains a text field, this field is filled with a value.


In an apex class, I retrieve this custom setting like this :

global class MyClass{
    
    private static String latitudeLongitude = CustomSetting__c.getInstance().TextField1__c;

}

 

Then I use this field in a method of this class and this is working fine, the value is correctly retrieved.


But when I lanch the following test class, a NullPointerException is thrown on the same line that retrieve the custom setting value.

This is odd because custom settings are initiazed in the test class (This is apex v27)

This is the test method :

static testMethod void TestGoogleGeoCodeUpdater(){
        //Création des custom settings pour les tests
        ALTGEOCODE__Geocode__c CS = new ALTGEOCODE__Geocode__c(
            ALTGEOCODE__Champ_coordonnees__c = 'ALTGEOCODE__Geolocation__c'
        );
        insert CS;
        
        Account compte1 = new Account(
            Name              = 'Test',
            BillingStreet     = 'Revaison Street',
            BillingPostalCode = '60000',
            BillingCity       = 'SP',
            BillingState      = 'Rhône',
            BillingCountry    = 'FRANCE'
        );
        insert compte1;
    }

 

I'm really stuck here, help would be appreciated.

 

Thanks a lot.

  • May 31, 2013
  • Like
  • 0

Hi,

 

I created a flow which will updates a lead record based on a search field in lead,which is working good like,when i'm searching for lead it retrieves the record from lead and make some updates to that record too but i used this flow in a VF page and i used that VF page a site then i'm getting folloing error...

 

 I have this field notes__c on lead object but the error msg showing this    

 

Unhandled process fault from Gmail : Test_Flow_For_Lead_Update : interaction.dal.exception.DALExecutionFault: ; nested exception is: common.exception.ApiQueryException: SELECT Lead.Email, Lead.notes__c FROM Lead WHERE (Lead.Ref_ID_File_Number__c ^ ERROR at Row:1:Column:20 No such column 'notes__c' on entity 'Lead'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. (There was a problem executing your command.) > RETRIEVE

 

 

So, here is my situation.

 

Standard object = Lead

Standard object = PostalCode

Standard Object Custom field = Sales Territory

 

Custom Object = Zipcode

Custom Object Field = ZipCode

Custom Object Field = Sales Territory

 

I am trying to write a trigger on the lead (before insert, before update) that takes the PostalCode on the lead, lookups the same Postalcode in my ZipCode custom object and inserts the value of Sales Territory into the lead.


How can I do this?

Hi,

Is there any data loader tool to upload into multiple objects and multiple instance of an object for single record in from a CSV file.

 

My file looks as below:

 

Here based on “Exam S7” and “Exam S9” column I need two separate entry for contact child object (obj1).

 

Based on the entry of “Licenses” column I need to populated another Child object of contact (obj2) with two entries, any recommendations appreciated

 

Exm S7  |    Exm S79    |  Exm S9     |    Licenses (single column)

----------------------------------------------------------------------------

Yes        |      ------         |    Yes         |     S63, S7

 

 

Anoop

  • May 30, 2013
  • Like
  • 0

Hi,

 

I've created an UrlFor formula called by a button to prefill some field when creating a new record :

 

On one org I have the following formula :

 

{!URLFOR($Action.ALS_Ligne_de_facture__c.New, null,
[
"p3" = "012Q00000008vJ1",
"retURL" = Opportunity.Id,
"saveURL" = Opportunity.Id,
"save"=1
],
true)}

 Which is leading directly to the record creation screen with the recordtype preselected :

 

https://cs3.salesforce.com/a0T/e?retURL=%2Fservlet%2Fservlet.Integration%3FscontrolCaching%3D1%26lid%3D00bQ0000000EFiE%26eid%3D006Q000000BFQiQ%26ic%3D1&RecordType=012Q00000008vJ1&ent=01IQ00000005Bm0&nooverride=1&saveURL=https%3A%2F%2Fcs3.salesforce.com%2F006Q000000BFQiQ

 

And on another org, I have the following formula :

 

{!URLFOR($Action.DA_Depense__c.New, null,
[
"p3" = "012W00000004QKj",
"retURL" = DA__c.Id,
"saveURL" = DA__c.Id,
"save" = 1
],
true)}

 Which is exctaly the same to me (except for the objects) and is leading to the recordtype selection screen :

 

https://cs13.salesforce.com/setup/ui/recordtypeselect.jsp?ent=01IW00000008mPU&retURL=a0NW00000011Cq7&save_new_url=%2Fa0d%2Fe%3FretURL%3D%252Fservlet%252Fservlet.Integration%253FscontrolCaching%253D1%2526lid%253D00bW0000000Hy2s%2526eid%253Da0NW00000011Cq7%2526ic%253D1&nooverride=1&p3=012W00000004QKj&saveURL=a0NW00000011Cq7&save=1

 

Any idea why the second formula does not have the same behavior than the first one ?

 

They both are on sandbox org with summer '13.

 

Thanks for the help.

 

  • May 17, 2013
  • Like
  • 0

Hi,

 

Can anyone help me complete a code for a custome button I am creating to copy the same thing the "New Case" button does from the Account object.

 

So basically it has to open a new case with the Account name prefilled. What do I have to add the the line below to accomplish this?

 

https://xxxxxx.my.salesforce.com/500/e?retURL=%2F001A000000yqabv

 

Thank you,

 

M

Hello,

 

I'm facing an issue with a custom VF component and custom apex controlleur, the return value when reading attribute from it is still NULL.

 

Here is the VF component :

 

<apex:component controller="customControlleur"> 
    <apex:attribute name="attribute" description="" assignTo="{!attribute}" type="String"></apex:attribute>
</apex:component>

 

And the controlleur :

 

public class customController {
    
    public String  attribute { get; set; }

    public customController() {
        system.debug('&&& attribute ' + attribute );
    }
}

 

I also tried what is described here, but with no more luck :

http://www.salesforce.com/us/developer/docs/pages/Content/pages_comp_cust_elements_controllers.htm

 

Any help would be greatly appreciated.

 

Thanks !

  • May 02, 2013
  • Like
  • 0

Hi,

I am attempting to send email from apex class using a template. How can I pass values into the merge fields?

 

Thank you, appreciate the help  

  • December 23, 2011
  • Like
  • 0

Hi there,

 

I tring to use the HTMLENCODE function documented by Salesforce on a string variable,

 

here is my sample code :

 

address += a.BillingPostalCode == NULL ? '' : ({!HTMLENCODE(a.BillingPostalCode)});

 

but it returns the following error : "Error: Compile Error: unexpected token: '{' "

 

It seems this function is only available when using in an apex component :

 

<apex:outputText value=" {!HTMLENCODE(myTextField)}" escape="false"/>



is that correct ?

 

how this possible to this with a string in a variable ?

 

Any advice would great.

 

Thanks

  • September 01, 2011
  • Like
  • 0

I'm trying to include related lists for Related Content and Content Deliveries on a VF page and I can't figure out their relationship names. I searched in the docs but couldn't find that info. Can someone help?

Where is that info (list of all standard relationship names) documented?

 

I tried the following and few other names without luck.

 

 

<apex:relatedList list="RelatedContent" />
<apex:relatedList list="Content" />
<apex:relatedList list="ContentDeliveries" />

 

 

Thanks much

  • February 15, 2011
  • Like
  • 0