• loneboat
  • NEWBIE
  • 123 Points
  • Member since 2012

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

We have our sandbox upgraded to Winter '12, but our production environment is still on the old version. The following code prints "false" on our sandbox, but "true" on production. I can't seem to find mention of this on line, but it looks like they work differently!

 

Set<Id> x = new Set<Id>{
     '012A0000000qv2wIAA'
    ,'012A0000000qv2xIAA'
    ,'012A0000000qv2yIAA'
    ,'012A0000000qv2zIAA'
};

System.debug(x.contains('012A0000000qv2z'));

Note that the Set contains 18-character IDs, and we're asking if it .contains() a 15-character ID.  I don't mind it working one way or the other;  just weird that it's behaving differently.

I'm querying ActivityHistory, and it seems that you can only query it as the object of a SUBQUERY against some other object. That's fine - I changed my query to query against the Account object, with ActivityHistory in a subquery. Seemed to work fine. But in testing, I found a case where the ActivityHistory subquery returned MORE than 200 results. I started getting this error:

 

    FATAL_ERROR|System.QueryException: entity type ActivityHistory does not support query

 

... in the debug logs.  It seems to be only an issue where an Account has more than 199 related entries in the ActivityHistory object. To see if this was the cause, I tried putting a LIMIT 199 and a LIMIT 200 clause in the subquery. Sure enough, when I use 199 (or anything lower) it works fine. Using 200 (or anything higher) results in the error above.

 

My code is below. One thing to note is that the query is in a FOR loop. One theory I have as to why it's producing the error for high values of the LIMIT clause is that perhaps 200 is the point where the FOR loop is batching the query into separate chunks - maybe the second chunk doesn't qualify as a 'subquery' (since it's running separately?) - and SalesForce isn't liking that.

 

Oh, and one more thing: The same code seems to run fine in the Anonymous Apex editor (though I had to make a few modifications - replacing the inline variables with explicit values). Weird that the anon editor is perfectly happy with it, but the SFDC servers don't like it.

 

Anyway, I'm off to do some more troubleshooting. Anyone have any insights?

 

Thanks!

 

Code:

    //  ActivityHistory's on Account
    for (Account a : [  //  you can't query ActivityHistory directly; only in a subquery against another object type
        SELECT
             Id
            ,Name
            ,( SELECT
                    ActivityDate
                   ,ActivityType
                   ,CRM_Meeting_Type__c
                   ,Description
                   ,CreatedBy.Name
                   ,Status
                   ,WhatId
                FROM ActivityHistories
                WHERE ActivityType IN :included_activity_history_types
                //LIMIT 200
            )
        FROM Account WHERE Id = :accountId
    ]) {
     for (ActivityHistory ah : a.ActivityHistories) {
        if ( ah.WhatId==null ) { continue; }  //  skip adding activities without a WhatId

        if (((string)ah.WhatId).startsWith('001')) { //  only add ActivityHistory's tied directly to an Account (the query above pulls back all ActivityHistory's on related Oppty's as well)
            activities.add(new ActivityWrapper(ah));
        }
     }
    }

Here's my query:

        SELECT 
              Id
            , Name
            , UserRole.Name
            , Profile.Name
            ,(  SELECT
                     Id
                    ,CRM_Territory_Type__c
                FROM Territories__r 
                WHERE CRM_Inactive__c=false 
            )
        FROM User
WHERE Territories__r.null
        ORDER BY Name

Is there any way to get this query to ONLY return results where the subquery has results?

 

Thanks!

I have a VF page [A] which I would like to have open another page [B].  [A] needs to send some information to [B] (a few ID's).  I can do what I want just fine by using getParameters().put('param1', 'param1 value') on the PageReference I'm creating in [A].  The problem is that the values are being sent as url parameters ('?param1=param1 value').  This makes my URL ugly, and also is a bit misleading, because the values I'm sending in are only for INITIAL values (which change as the user interacts with the page).  Seeing them persist in the browser's address bar is confusing.

 

So my question is:  Is there any way to pass a value from [A] to [B] such that they do not show up in the browser's bar?  I guess I could just really quickly shove the values into a cookie, but that seems like a weird way to do it.

I have a JSON string which represents a List<String>, but I can't figure out how to deserialize it - I don't know what to put for the deserialization type argument.

 

List<String> myList = (List<String>)System.JSON.deserialize(json_string, ????);

 

I've tried putting "List<String>" as the arg, but I get an error about an "unexpected token".

In my dataTable, the following WORKS how I expect:

 

                    <apex:column value="{!a.maxStage}">
                        <apex:facet name="header">
                            <apex:commandLink action="{!sortAccounts_maxStage}" value="Stage" reRender="accountTable" status="accountsTableAjaxStatus" />                            
                        </apex:facet>
                    </apex:column>

 

However, if I add even a SINGLE character after the commandLink, the whole commandLink stops rendering:

 

                     <apex:column value="{!a.maxStage}">
                        <apex:facet name="header">
                            <apex:commandLink action="{!sortAccounts_maxStage}" value="Stage" reRender="accountTable" status="accountsTableAjaxStatus" />
                            x
                        </apex:facet>
                    </apex:column>

 

Note the added "x".  Same behavior if I wrap the "x" in a SPAN tag or apex:outputText/etc.

 

Any ideas why?  I already tried forcing rendering with rendered="true" on the facet.

Can someone point me to the documentation for SOQL's "WHERE x IN :y" syntax, where y is a collection type (list, set, map).  I've tried searching for it, but "where" and "in" are such generic terms that my searches are essentially as useful as just searching for "soql" alone.

 

Thanks!

I'm trying to pick through some debug logs.  I would REALLY LIKE to be able to filter the verbosity of the logs.  I tried changing the settings for everything to "Error", but I'm still seeing a lot of junk in the logs (e.g. validation rules).  See screenshot.

 

 

Why am I seeing everything, despite having set the logging levels to Error?

 

Note that I'm seeing this behavior in both the Developer Console in my browser AND in the Force.com IDE Apex Test Runner pane.

The whole code is below, but I'm specifically talking about the begining of the method 'case_1()'. 

 

Just for some background:  DCS_Commission__c.CRM_Opportunity__c is a LOOKUP field to Opportunity.  DCS_Commission__c.CRM_Contract_Truck_Count__c is a number-type FORMULA field, which contains the following for the formula:  [CRM_Opportunity__c.CRM_Contract_Truck_Count__c].

 

In the beginning of case_1(), I'm changing the value on the Opportunity to which the formula refers.  But when I debug commission.CRM_Contract_Truck_Count, it is not updated in the formula.  In fact, all three debug values on lines 84-86 output 'null'.

 

How come?

 

Let me know if I need to provide additional information.

 

 

@isTest
private class CRM_DCS_Commission_Extension_Test {
    //  IDs
    private static ID userId, accountId, opportunityId, commissionId;
    
    //  sObjects
    private static User                 user;
    private static Account              account;
    private static Opportunity          opportunity;
    private static DCS_Commission__c    commission;
    private static List<DCS_Commission_SoldBy_Junction__c> 
                                        soldBys;
    
    static testMethod void testCalculateCommission() {
        Profile p = [SELECT Id from Profile WHERE Name='CRM SysAdmin'];
        
        //  create test user (can reuse the same one on several soldBys)
        user   = [SELECT Id, Name FROM User u LIMIT 1];  //  Which user doesn't really matter
        userId = user.Id;
        
        //  create test account
    	account   = new Account(
    	    Name                       = 'TestAccount'
    	   ,CRM_DCS_Relationship__c    = 'Customer'
    	);
    	//accountId = account.Id;
    	insert account;
    	
        //  create test opportunity
        opportunity   = new Opportunity(
	        accountId = accountId
	        ,Name = 'TestOpportunity'
	        ,CRM_DCS_Op_City__c = 'Happyville'
	        ,CRM_Op_State__c = 'AR'
	        ,StageName = 'Stage 1'
	        ,CloseDate = Date.valueOf('2012-01-01')
	        ,CRM_Contract_Terms__c = '5 Years'
        );
        insert opportunity;
	    opportunityId = opportunity.Id;
        
        //  create test commission
        commission   = new DCS_Commission__c();
        commission.CRM_Opportunity__c = opportunityId;
        insert commission;
        commissionId = commission.Id;
        
        case_1();
        //  configure test opportunity (fields which Commission looks at)
        
        //  configure test commission  (fields which SoldBy looks at)
        //  configure test soldBys
        //  calculateCommissions()
        //  System.assert() utility functions
        //  System.assert() commission results (incl. multipliers, payments1-3, calculated commission)
        //  (repeat for various configurations)
    }
    
    static void case_1() {
        resetSoldBys(3);
        opportunity.CRM_Contract_Truck_Count__c = 15.00;
        opportunity.CRM_Contract_Revenue__c = 15000000;
        opportunity.CRM_Contract_Margin__c  = 12.30;
        opportunity.CRM_ROIC__c             = 15.70;
        opportunity.CRM_Contract_Terms__c   = '10 years';
        
        soldBys[0].CRM_Type__c              = 'BDE';
        soldBys[0].CRM_TTM_Sold_Revenue__c  = 27000000;
        
        soldBys[1].CRM_Type__c              = 'BDE';
        soldBys[1].CRM_TTM_Sold_Revenue__c  = 1000000;
        
        soldBys[2].CRM_Type__c              = 'LEAD';
        
        //commission.Name = 'asdf';
        
        update opportunity;
        update commission;  //  TODO: do we need this, or should the formula fields automatically update??
        update soldBys;
        
        system.debug(opportunity.Id);
        system.debug(commission.CRM_Opportunity__c);
        
        system.debug(opportunity.CRM_Contract_Truck_Count__c);
        system.debug(commission.CRM_Truck_Count__c);
        system.debug(soldBys[0].CRM_Gross_Commission__c);
        
        ApexPages.StandardController sc  = new ApexPages.StandardController(commission);
        CRM_DCS_Commission_Extension ext = new CRM_DCS_Commission_Extension(sc);
        
        ext.calculateCommission_action();
        
        system.Assert(soldBys[0].CRM_Gross_Commission__c            ==  56250.00    );
        //system.Assert(soldBys[0].CRM_Multiplier__c                  ==      0.0038  );
        //system.Assert(soldBys[0].CRM_Applied_Margin_Multiplier__c   ==      1.00    );
        //system.Assert(soldBys[0].CRM_Applied_Margin_Commission__c   ==  28125.00    );
        //system.Assert(soldBys[0].CRM_ROIC_Multiplier__c             ==      1.30    );
        //system.Assert(soldBys[0].CRM_ROIC_Commission__c             ==  36562.50    );
        //system.Assert(soldBys[0].CRM_Contract_Term_Multiplier__c    ==      1.35    );
        //system.Assert(soldBys[0].CRM_Payment_1_Amount__c            == 130742.19    );
        //system.Assert(soldBys[0].CRM_Top_Performer_Multiplier__c    ==      1.50    );
        //system.Assert(soldBys[0].CRM_Calculated_Commission__c       == 130742.19    );
    }
    
    static void resetSoldBys(Integer numSoldBys) {
        //  create test soldBys
        soldBys = new List<DCS_Commission_SoldBy_Junction__c>();
        for (Integer i=0; i<numSoldBys; i++) {
        	DCS_Commission_SoldBy_Junction__c s = new DCS_Commission_SoldBy_Junction__c(
               CRM_DCS_Commission__c = commission.Id
            );
            soldBys.add(s);
        }
        
        insert soldBys;
    }
}

 

Suppose I have an object type A with fields A.Id, A.a, A.b, A.c.

 

If I want to update ONLY field A.a, do I have to select ALL the fields if I want to retain their present values?

 

E.g.:

 

A x = [SELECT Id, a FROM A WHERE A.Id=:someIdValue];
x.a='asdf';
update x;

 

Would this wipe out x.b and x.c, since they were not selected and were thus empty when I called "update"?

 

Also, can I change values which were NOT selected:

 

A x = [SELECT Id, a FROM A WHERE A.Id=:someIdValue];
x.a='asdf';
x.b='qwer';
x.c='zxcv';
update x;

 

Thanks!

I have two custom object types, call them [Type_A__c] and [Type_B__c].  A has a lookup field to B.

 

I have a controller extension I'm writing for type A.  The basic class looks like this:

 

 

public with sharing class Type_A_Extension {

    public Type_A__c objA { get; private set; }
    public Type_B__c objB { get; private set; }
    
    public Type_A_Extension(ApexPages.StandardController stdController) {
        objA = (Type_A__c)stdController.getRecord();
        
        //  objB = objA.Lookup_To_B__c;
    }
}

 

 

The last line is throwing an error in the IDE, and from what I can gather, it's because objB is actually of type [Type_B__c], whereas objA.Lookup_To_B__c is of type [ID].

 

I know that I could do a SOQL query like

 

List<Type_B__c> objB_list = [SELECT fieldA, fieldB, fieldC ... FROM Type_B__c WHERE Id = :objA.Lookup_To_B__c ];
objB = objB_list[0];  //  only if I'm sure there is a result!

 But this seems pretty verbose, especially if there are a lot of fields on type B.  Is there any way to just grab a record and cast it to a known type if I have the ID via a lookup field from another object?  Like a cast or some Database method?

 

Something like:

//  I know this won't really work; it's just what I WISH would work;
Database.getRecord(objA.Lookup_To_B__c);

 or even:

objB = (Type_B__c)objA.Lookup_To_B__c;

 

Is there some simple way to add a component directly to a page layout?  From what I'm currently reading through, it looks like I can build a custom component, then add it to a VF page, then add that page to a standard page layout.  This is unappealing to me because I have to specify the height of the embedded VF page explicitly (even though I don't know it ahead of time).

 

What I'd like to do is just add the component directly.

 

Is this possible?

 

Thanks!

 

Note:  I found this thread:  http://boards.developerforce.com/t5/General-Development/Apex-Components-in-Default-Page-Layouts/m-p/121316/highlight/true#M28194

 

... but it's from 2009, and I feared it might be out of date.

Relatively new to Salesforce, so I'm studying the docs trying to make sense of it all. I found the ERDs here:

http://www.salesforce.com/us/developer/docs/api/Content/data_model.htm

... which are very helpful. But I cannot find in them how standard objects are related to profiles/page layouts. Don't they need to be in order to link a record type to a page layout?

Thanks!

I have a JSON string which represents a List<String>, but I can't figure out how to deserialize it - I don't know what to put for the deserialization type argument.

 

List<String> myList = (List<String>)System.JSON.deserialize(json_string, ????);

 

I've tried putting "List<String>" as the arg, but I get an error about an "unexpected token".

Can someone point me to the documentation for SOQL's "WHERE x IN :y" syntax, where y is a collection type (list, set, map).  I've tried searching for it, but "where" and "in" are such generic terms that my searches are essentially as useful as just searching for "soql" alone.

 

Thanks!

We have our sandbox upgraded to Winter '12, but our production environment is still on the old version. The following code prints "false" on our sandbox, but "true" on production. I can't seem to find mention of this on line, but it looks like they work differently!

 

Set<Id> x = new Set<Id>{
     '012A0000000qv2wIAA'
    ,'012A0000000qv2xIAA'
    ,'012A0000000qv2yIAA'
    ,'012A0000000qv2zIAA'
};

System.debug(x.contains('012A0000000qv2z'));

Note that the Set contains 18-character IDs, and we're asking if it .contains() a 15-character ID.  I don't mind it working one way or the other;  just weird that it's behaving differently.

I have a JSON string which represents a List<String>, but I can't figure out how to deserialize it - I don't know what to put for the deserialization type argument.

 

List<String> myList = (List<String>)System.JSON.deserialize(json_string, ????);

 

I've tried putting "List<String>" as the arg, but I get an error about an "unexpected token".

In my dataTable, the following WORKS how I expect:

 

                    <apex:column value="{!a.maxStage}">
                        <apex:facet name="header">
                            <apex:commandLink action="{!sortAccounts_maxStage}" value="Stage" reRender="accountTable" status="accountsTableAjaxStatus" />                            
                        </apex:facet>
                    </apex:column>

 

However, if I add even a SINGLE character after the commandLink, the whole commandLink stops rendering:

 

                     <apex:column value="{!a.maxStage}">
                        <apex:facet name="header">
                            <apex:commandLink action="{!sortAccounts_maxStage}" value="Stage" reRender="accountTable" status="accountsTableAjaxStatus" />
                            x
                        </apex:facet>
                    </apex:column>

 

Note the added "x".  Same behavior if I wrap the "x" in a SPAN tag or apex:outputText/etc.

 

Any ideas why?  I already tried forcing rendering with rendered="true" on the facet.

Can someone point me to the documentation for SOQL's "WHERE x IN :y" syntax, where y is a collection type (list, set, map).  I've tried searching for it, but "where" and "in" are such generic terms that my searches are essentially as useful as just searching for "soql" alone.

 

Thanks!

I'm trying to pick through some debug logs.  I would REALLY LIKE to be able to filter the verbosity of the logs.  I tried changing the settings for everything to "Error", but I'm still seeing a lot of junk in the logs (e.g. validation rules).  See screenshot.

 

 

Why am I seeing everything, despite having set the logging levels to Error?

 

Note that I'm seeing this behavior in both the Developer Console in my browser AND in the Force.com IDE Apex Test Runner pane.

The whole code is below, but I'm specifically talking about the begining of the method 'case_1()'. 

 

Just for some background:  DCS_Commission__c.CRM_Opportunity__c is a LOOKUP field to Opportunity.  DCS_Commission__c.CRM_Contract_Truck_Count__c is a number-type FORMULA field, which contains the following for the formula:  [CRM_Opportunity__c.CRM_Contract_Truck_Count__c].

 

In the beginning of case_1(), I'm changing the value on the Opportunity to which the formula refers.  But when I debug commission.CRM_Contract_Truck_Count, it is not updated in the formula.  In fact, all three debug values on lines 84-86 output 'null'.

 

How come?

 

Let me know if I need to provide additional information.

 

 

@isTest
private class CRM_DCS_Commission_Extension_Test {
    //  IDs
    private static ID userId, accountId, opportunityId, commissionId;
    
    //  sObjects
    private static User                 user;
    private static Account              account;
    private static Opportunity          opportunity;
    private static DCS_Commission__c    commission;
    private static List<DCS_Commission_SoldBy_Junction__c> 
                                        soldBys;
    
    static testMethod void testCalculateCommission() {
        Profile p = [SELECT Id from Profile WHERE Name='CRM SysAdmin'];
        
        //  create test user (can reuse the same one on several soldBys)
        user   = [SELECT Id, Name FROM User u LIMIT 1];  //  Which user doesn't really matter
        userId = user.Id;
        
        //  create test account
    	account   = new Account(
    	    Name                       = 'TestAccount'
    	   ,CRM_DCS_Relationship__c    = 'Customer'
    	);
    	//accountId = account.Id;
    	insert account;
    	
        //  create test opportunity
        opportunity   = new Opportunity(
	        accountId = accountId
	        ,Name = 'TestOpportunity'
	        ,CRM_DCS_Op_City__c = 'Happyville'
	        ,CRM_Op_State__c = 'AR'
	        ,StageName = 'Stage 1'
	        ,CloseDate = Date.valueOf('2012-01-01')
	        ,CRM_Contract_Terms__c = '5 Years'
        );
        insert opportunity;
	    opportunityId = opportunity.Id;
        
        //  create test commission
        commission   = new DCS_Commission__c();
        commission.CRM_Opportunity__c = opportunityId;
        insert commission;
        commissionId = commission.Id;
        
        case_1();
        //  configure test opportunity (fields which Commission looks at)
        
        //  configure test commission  (fields which SoldBy looks at)
        //  configure test soldBys
        //  calculateCommissions()
        //  System.assert() utility functions
        //  System.assert() commission results (incl. multipliers, payments1-3, calculated commission)
        //  (repeat for various configurations)
    }
    
    static void case_1() {
        resetSoldBys(3);
        opportunity.CRM_Contract_Truck_Count__c = 15.00;
        opportunity.CRM_Contract_Revenue__c = 15000000;
        opportunity.CRM_Contract_Margin__c  = 12.30;
        opportunity.CRM_ROIC__c             = 15.70;
        opportunity.CRM_Contract_Terms__c   = '10 years';
        
        soldBys[0].CRM_Type__c              = 'BDE';
        soldBys[0].CRM_TTM_Sold_Revenue__c  = 27000000;
        
        soldBys[1].CRM_Type__c              = 'BDE';
        soldBys[1].CRM_TTM_Sold_Revenue__c  = 1000000;
        
        soldBys[2].CRM_Type__c              = 'LEAD';
        
        //commission.Name = 'asdf';
        
        update opportunity;
        update commission;  //  TODO: do we need this, or should the formula fields automatically update??
        update soldBys;
        
        system.debug(opportunity.Id);
        system.debug(commission.CRM_Opportunity__c);
        
        system.debug(opportunity.CRM_Contract_Truck_Count__c);
        system.debug(commission.CRM_Truck_Count__c);
        system.debug(soldBys[0].CRM_Gross_Commission__c);
        
        ApexPages.StandardController sc  = new ApexPages.StandardController(commission);
        CRM_DCS_Commission_Extension ext = new CRM_DCS_Commission_Extension(sc);
        
        ext.calculateCommission_action();
        
        system.Assert(soldBys[0].CRM_Gross_Commission__c            ==  56250.00    );
        //system.Assert(soldBys[0].CRM_Multiplier__c                  ==      0.0038  );
        //system.Assert(soldBys[0].CRM_Applied_Margin_Multiplier__c   ==      1.00    );
        //system.Assert(soldBys[0].CRM_Applied_Margin_Commission__c   ==  28125.00    );
        //system.Assert(soldBys[0].CRM_ROIC_Multiplier__c             ==      1.30    );
        //system.Assert(soldBys[0].CRM_ROIC_Commission__c             ==  36562.50    );
        //system.Assert(soldBys[0].CRM_Contract_Term_Multiplier__c    ==      1.35    );
        //system.Assert(soldBys[0].CRM_Payment_1_Amount__c            == 130742.19    );
        //system.Assert(soldBys[0].CRM_Top_Performer_Multiplier__c    ==      1.50    );
        //system.Assert(soldBys[0].CRM_Calculated_Commission__c       == 130742.19    );
    }
    
    static void resetSoldBys(Integer numSoldBys) {
        //  create test soldBys
        soldBys = new List<DCS_Commission_SoldBy_Junction__c>();
        for (Integer i=0; i<numSoldBys; i++) {
        	DCS_Commission_SoldBy_Junction__c s = new DCS_Commission_SoldBy_Junction__c(
               CRM_DCS_Commission__c = commission.Id
            );
            soldBys.add(s);
        }
        
        insert soldBys;
    }
}

 

Suppose I have an object type A with fields A.Id, A.a, A.b, A.c.

 

If I want to update ONLY field A.a, do I have to select ALL the fields if I want to retain their present values?

 

E.g.:

 

A x = [SELECT Id, a FROM A WHERE A.Id=:someIdValue];
x.a='asdf';
update x;

 

Would this wipe out x.b and x.c, since they were not selected and were thus empty when I called "update"?

 

Also, can I change values which were NOT selected:

 

A x = [SELECT Id, a FROM A WHERE A.Id=:someIdValue];
x.a='asdf';
x.b='qwer';
x.c='zxcv';
update x;

 

Thanks!

I have two custom object types, call them [Type_A__c] and [Type_B__c].  A has a lookup field to B.

 

I have a controller extension I'm writing for type A.  The basic class looks like this:

 

 

public with sharing class Type_A_Extension {

    public Type_A__c objA { get; private set; }
    public Type_B__c objB { get; private set; }
    
    public Type_A_Extension(ApexPages.StandardController stdController) {
        objA = (Type_A__c)stdController.getRecord();
        
        //  objB = objA.Lookup_To_B__c;
    }
}

 

 

The last line is throwing an error in the IDE, and from what I can gather, it's because objB is actually of type [Type_B__c], whereas objA.Lookup_To_B__c is of type [ID].

 

I know that I could do a SOQL query like

 

List<Type_B__c> objB_list = [SELECT fieldA, fieldB, fieldC ... FROM Type_B__c WHERE Id = :objA.Lookup_To_B__c ];
objB = objB_list[0];  //  only if I'm sure there is a result!

 But this seems pretty verbose, especially if there are a lot of fields on type B.  Is there any way to just grab a record and cast it to a known type if I have the ID via a lookup field from another object?  Like a cast or some Database method?

 

Something like:

//  I know this won't really work; it's just what I WISH would work;
Database.getRecord(objA.Lookup_To_B__c);

 or even:

objB = (Type_B__c)objA.Lookup_To_B__c;

 

Is there some simple way to add a component directly to a page layout?  From what I'm currently reading through, it looks like I can build a custom component, then add it to a VF page, then add that page to a standard page layout.  This is unappealing to me because I have to specify the height of the embedded VF page explicitly (even though I don't know it ahead of time).

 

What I'd like to do is just add the component directly.

 

Is this possible?

 

Thanks!

 

Note:  I found this thread:  http://boards.developerforce.com/t5/General-Development/Apex-Components-in-Default-Page-Layouts/m-p/121316/highlight/true#M28194

 

... but it's from 2009, and I feared it might be out of date.

Relatively new to Salesforce, so I'm studying the docs trying to make sense of it all. I found the ERDs here:

http://www.salesforce.com/us/developer/docs/api/Content/data_model.htm

... which are very helpful. But I cannot find in them how standard objects are related to profiles/page layouts. Don't they need to be in order to link a record type to a page layout?

Thanks!

Is it possible not to render apex:component in SPAN,  just let it rendered whatever I've coded

So, I tried to use a map with an Enum object (which I am told I can use as a datatype in the documentation), but it does not work.

 

 

Declaration in the class definition:

 

public enum Season {WINTER, SPRING}

 

Definition of Map in the constructor:

 

 

Map<Season,String> heatMap = new Map<Season,String> ();

 

 Error:

 

 

 

 

 

Error: Compile Error: Map by CustomCon.Season not allowed at line 27 column 37