• kiwitrotter
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies

Hi guys,

 

I'm wondering if anyone can help me out on this one.

 

I have a Visualforce page that displays different fieldsets of checkbox fields. This Visualforce page is embedded in one of our custom object layouts and up until the release of Summer '13 the inline editing functionality was working whereby when we went to view a record we were able to double click the checkboxes displayed by this Visualforce page and save these changes without having to go into the full edit mode of the record itself.

 

My investigations on this so far have revealed in my Sandbox that if I bring up this Visualforce page standalone (outside of the object layout that it's embedded in) this functionality works, but when I view a record that this visual force page is embedded into the inline editing will not work. The only option is to go into the full edit mode of the record itself.

 

Has anyone had a similiar experience or can you suggest any solutions to this problem? Like I said earlier this functionality was working fine up until the release of Summer '13.

 

Many thanks in advance for your help.

 

 

Hi guys,

 

My question is more related to SOQL querying via a query editor rather than using SOQL in Apex.

 

Below is my query and when I run this query through a query editor such as Force.com explore or Real Force Explore the result set that comes back displays the record count for the sub query which you have to click on in order to see the actual records returned.

 

SELECT SFSSDupeCatcher__Duplicate_Warning_Count__c, Name, SFSSDupeCatcher__Scenario_Rule_Count__c, SFSSDupeCatcher__Scenario_Type__c, SFSSDupeCatcher__Potential_Duplicate_Count__c, (Select Name From SFSSDupeCatcher__Scenario_Rules__r) FROM SFSSDupeCatcher__Scenario__c

 

Is there any way to display a Parent-Child's sub query results also in the query results that are returned? I need to be able to export all results to a .csv file.

 

Thanks in advance for any help that you can give me with this.

Hi guys,

 

Just wondering if anyone can help me out with this one. I'm trying to query back the family value of an opportunity product line item so that I can populate a custom field with a value based on the product family that it belongs to. I have tried a few different things but nothing has worked. The closest that I can get is as follows:

 

---

trigger oppLineItemCheck on OpportunityLineItem (after insert) {

    for (OpportunityLineItem oli : Trigger.new)
    {
        String resultName = oli.PricebookEntry.Product2.Name;
        String resultFamily = oli.PricebookEntry.Product2.Family;
        Double lineItemPrice = oli.ListPrice;
        
        
        List <Opportunity> oList = [select name, amount from Opportunity where Id = :oli.OpportunityId];
        System.debug('Inside first for loop...');
        
        for (Opportunity o:oList){
            o.Description = 'Opportunity Product Name is: ' + resultName + ' Opportunity Product family is: ' + resultFamily;
           

            System.debug(o.Description); //prints null values to logs for name and family
            System.debug('Inside second for loop...');
            System.debug('Pricebook2Idb 1 = ' +oli.PriceBookEntryID); //prints PricebookEntryID value to logs
            System.debug('Pricebook2Idb 2 = ' +oli.PriceBookEntry.ID); //prints null
            

            if(resultFamily == 'Products'){
                o.Products_Amount__c = lineItemPrice;
            } else {
                o.Services_Amount__c = lineItemPrice;
            }
        }
    }
}

---

 

However, in my debug logs the values of the Product name and family are null. I'm probably missing something obvious here but if anyone can shed any light on this I would appreciate it.

 

Many thanks in advance.

Hi,

 

Just wondering if anyone can help me. I'm trying to validate the email address field of a lead in my before insert trigger. In my test class I'm simply providing a url as the email address of the test lead and trying to insert it. Thisi s then causing the following validation error to appear in the logs:

 

---

10:23:53.268 (13268597000)|DML_BEGIN|[33]|Op:Insert|Type:Lead|Rows:1
10:23:53.270 (13270063000)|DML_END|[33]
10:23:53.270 (13270191000)|VF_PAGE_MESSAGE|Email: invalid email address: http://www.dodgycompany.com
10:23:53.270 (13270274000)|EXCEPTION_THROWN|[33]|System.DmlException: Insert failed. First exception on row 0; first error: INVALID_EMAIL_ADDRESS, Email: invalid email address: http://www.dodgycompany.com: [Email]
10:23:53.272 (13272426000)|USER_DEBUG|[36]|DEBUG|Email: invalid email address: http://www.dodgycompany.com
10:23:53.272 (13272706000)|EXCEPTION_THROWN|[37]|System.ListException: List index out of bounds: 1
10:23:53.272 (13272884000)|FATAL_ERROR|System.ListException: List index out of bounds: 1

Class.TestDeDupeLead.testForValidEmailAddress: line 37, column 1
10:23:53.272 (13272898000)|FATAL_ERROR|System.ListException: List index out of bounds: 1
------

 

I don't understand why my attempt to insert a test lead with an invalid email address is failing. In my before insert trigger I have code in place to validate the lead's email address. I thought that my before trigger should run before any salesforce field validation takes place however it appears some kind of other field validation is happening before my 'before insert' trigger.

 

Can anyone shed any light on this? Your help is greatly appreciated!

 

Many thanks in advance!