• Armoury
  • NEWBIE
  • 214 Points
  • Member since 2014

  • Chatter
    Feed
  • 7
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 5
    Questions
  • 63
    Replies
I am getting the following error for the code below while attempting to complete a change set. How can I correct this? 

"One or more components failed Version Compatibility Check.This change set contains components that require the "36.0" or higher platform version. Please select an organization with a platform version of "36.0" or higher, or remove all incompatible components.​"
 
global class myHandler implements Messaging.InboundEmailHandler { global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) { Messaging.InboundEmailResult result = new Messaging.InboundEmailresult(); return result; } 

Thanks in Advance!! 
I have an issue with creating tests for a class that calculates a number and stores it i my salesforce database.  I have a cstom object called "Application," which is related to a Contact object.  I created a custom field in the Application object that will store the numberical value of a students for finacial aid purposes.  I created an apex class to update the value of this number, and I am using that class through an after update trigger on the Application object.  The API name for the Application object is EnrollmentrxRx__Enrollment_Opportunity__c.  Here is the error that I'm getting:
System.DmlException: Update failed. First exception on row 0 with id a0Bo00000047ZJSEA2; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, ApplicationTrigger: execution of AfterUpdate
caused by: System.FinalException: Record is read-only
Class.CalculateFinAidIndex.updateIndex: line 67, column 1
Class.CalculateFinAidIndex.updateIndexFromApplication: line 26, column 1
Trigger.ApplicationTrigger: line 14, column 1: []

The stack trace says "Class.TestCalculateFinAidIndex.updateIndexFromApplicationTest: line 12, column 1," which points to the update apps line in the following code.  My Test class is below:
@isTest(SeeAllData=true)
public class TestCalculateFinAidIndex {
    static testMethod void updateIndexFromApplicationTest() {
        List<EnrollmentrxRx__Enrollment_Opportunity__c> apps = new List<EnrollmentrxRx__Enrollment_Opportunity__c>();
        apps.addall([SELECT Financial_Aid_Index__c,EnrollmentrxRx__Applicant__c,EnrollmentrxRx__Admissions_Status__c,Active_Application__c,Max_ACT_Composite__c,SAT_Superscore__c,EnrollmentrxRx__GPA__c,First_Generation__c FROM EnrollmentrxRx__Enrollment_Opportunity__c WHERE EnrollmentrxRx__Admissions_Status__c = 'Admit' AND Active_Application__c = true LIMIT 10]);
        System.assert(apps != null);
        System.assert(apps.size() > 0);
        for (EnrollmentrxRx__Enrollment_Opportunity__c app : apps) {
            app.Date_Last_Updated_Auto_FinAidIndex__c = Date.today();
        }
        update apps; // this will call the trigger
        for (Integer i = 0; i < apps.size(); i++) {
            System.assert(apps[i].Financial_Aid_Index__c != null);
            System.assert(apps[i].Financial_Aid_Index__c > 0);
        }
    }
}

Here's my code for the class that I need to test:
public class CalculateFinAidIndex {
    public static void updateIndexFromApplication(EnrollmentrxRx__Enrollment_Opportunity__c[] apps) {
        for (EnrollmentrxRx__Enrollment_Opportunity__c app : apps) {
            updateIndex(app);
        }
        update apps;
    }
    
    public static void updateIndex(EnrollmentrxRx__Enrollment_Opportunity__c app) {
            if (app.Active_Application__c &&
                ((app.EnrollmentrxRx__Admissions_Status__c == 'Applied') || (app.EnrollmentrxRx__Admissions_Status__c == 'Complete') || (app.EnrollmentrxRx__Admissions_Status__c == 'Admit'))) {
                    Integer finIndex = 0;
                    Double act = app.Max_ACT_Composite__c;
                    Double sat = app.SAT_Superscore__c; // or is it app.EnrollmentrxRx__Total_SAT_Score__c
                    Double gpa = 0; // 25
                    Integer gender = 0; // 10
                    Integer race = 0; // 10
                    Integer legacy = 0; // 10
                    Integer firstGen = 0; // 10
                    Double testValue = 0;
                    if (sat != null) sat = (sat / 2400) * 25; // assuming that the max is 2400
                    else sat = 0;
                    if (act != null) act = (act / 36) * 25; //assuming that the max is 36
                    else act = 0;
                    if (sat > act) testValue = sat;
                    else testValue = act;
                    Contact c = new Contact();//app.EnrollmentrxRx__Applicant__c;
                    if (c.EnrollmentrxRx__Gender__c == 'Male') gender = 10;
                    if (app.EnrollmentrxRx__GPA__c != null) {
                        gpa = (app.EnrollmentrxRx__GPA__c / 4) * 25;
                        if (gpa > 25) gpa = 25;
                    }
                    if (c.Race__c != 'White') race = 10;
                    if (app.First_Generation__c) firstGen = 10;
                    if (c.Legacy_Relationship__c != null) legacy = 10;
                    finIndex += (Integer)testValue + (Integer)gpa + gender + race + legacy + firstGen;
                    app.Financial_Aid_Index__c = finIndex;
                    System.debug('Logging from UpdateIndex: ' + finIndex);
            }
        }
}

Thank you for your help!
Hi, 

 We have a custom object with name Territory_Lookup__c field inside this object are name, zip_start, zip_end

We have values inside this table like 
  
 Name     Zip_Start  Zip_End
 APAC           1         10
 NAM             11        20

If we pass 2 to soql it must APAC if user pass 12 it must show NAM
 
I tried below query its not working Please suggest me how to modify the query

SELECT name,zip_start,zip_end FROM territory_lookup__c where Zip_Start__c >= 2  or   Zip_End__c <=2 

Thanks
Sudhir
I have a request to block our sales team from selecting certain values on the lead status. 
Only marketing should be able to select Prospect, Marketing Qualified, Engaged
Sales can select Sales Accepted and Not Qualified

When I try and create the validation rule I was running into a problem because once the lead status is at Marketing Qualified the sales rep is not able to convert the lead since the validation rule is triggering.  I'm only interested in blocking them from selecting the value but want to allow them to edit the rest of the data or change the lead status to one of thier allowed values:  Sales Accepted or Not Qualified.

AND(
$Profile.Name <> "Marketing",
$Profile.Name <> "Marketing User",
$Profile.Name <> "Marketo-Salesforce Sync",
OR(
ISPICKVAL(PRIORVALUE( Status) , "Sales Accepted"),
ISPICKVAL(PRIORVALUE( Status) , "Not Qualified"),
ISPICKVAL(PRIORVALUE( Status) , "Could Not Connect")
))
 
Hi All,

I have requirement to generate letter(in paper form) for all campaign members (we use campaigns more like events, so those letters are supposed to be invitations). So I added custom button on the layout that should render the information as pdf. I also added rich text field where the text for the letter is stored. See below code:

apex:page standardController="Campaign" showHeader="false" renderAs="pdf" applyBodyTag="false">
  <apex:repeat value="{!Campaign.CampaignMembers}" var="line">
    <div style="page-break-after:always;">
  <span style="font-family: Arial Unicode MS">
  {!line.Contact.Oslovujeme__c}, <br/><br/>
    <apex:outputText value="{!Campaign.Campaign_Letter_Rich__c}" escape="false"/>
    </span>
  </div>
    </apex:repeat>
</apex:page> 

The problem is.. that we have special characters in my language, such as ř,ě,ň, etc. These characters are generated correctly on pdf only for my custom field on contact Oslovujeme__c. But if any of these characters are in Campaign_Letter_Rich__c, they are missing on pdf. I suppose it has something to do with "escape" attribute. If I dont use it characters are rendered fine but with all the code around.. Can anyone help me please?
Thank you very much
Hi,

Is there any way to have multiple picklists always have the same data in different objects?   For example, we have a wine business so data such as appellation or wine variety is the same but is in different objects such as products, samples, etc.  Is there anyway to designate it all comes from one source so I don't have to update it in multiple places each time it changes.

Thanks,
As per topic, how do I create an account with RecordType -> Corporate using Sforce enterprise wsdl?
I am using the latest Enterprise WSDL generated via Setup -> Develop -> API ​-> generate WSDL button.
Is "Volunteer/Individual Donor" a default recordtype in Salesforce?
I can write into Salesforce $sObject->RecordType->Name = "Volunteer/Individual Donor" successfully but for $sObject->RecordType->Name = "Corporate", it always fail to write into Salesforce. Is there any missing step that I have missed out?

Please advise, thanks.
Hello,

I created a custom field and set the help text with the line breaks and when it is hovered in the detail page it displays as 
First Line
Second Line
When I checked the html page generated by Salesforce the code looks like below.
sfdcPage.setHelp('xxxx', 'FirstLine\r\u003Cbr\u003ESecondLine');
which i assume is complicated version of 
sfdcPage.setHelp('xxxx', 'FirstLine\r\nSecondLine');
Now when I added a translated text in Setup -> Translation Workbench -> Translate for another language and given the value as 
First Line_FR\r\nSecond Line_FR
but in the UI, it displays everything in a single line and there is no line break but instead it displays all the characters entered above. When looked at the html page generated by Salesforce this is what I see
sfdcPage.setHelp('xxxx', 'First line_FR \\r\\n Second line_FR');
SF automatically inserts another escape sequence character '\' so that it displays what we enter in the translated text. I tried replacing '\r\n' with the actual value which SF used '\r\u003Cbr\u003E' in the translation workbench but still no luck. Is there any other way to display the line break?
Hello,

I have a piece of test code to create and publish the articles and it goes as below..
 
Product_Info__kav  testArticle = new Product_Info__kav ();
testArticle .Title = 'Test Prod Info';
testArticle .Summary = 'Test Summary';
testArticle .URLName = 'Test Prod Info';
insert testArticle ;

Product_Info__kav insertedTestArticle = [SELECT KnowledgeArticleId FROM Product_Info__kav WHERE ID = :testArticle.Id];
            
KbManagement.PublishingService.publishArticle(insertedTestArticle.KnowledgeArticleId, true);  

The issue is this test code works fine in 3 sandboxes but it is failing in one particular sandbox and I am getting the below exception in Line #9.
 
System.HandledException: You can't perform this action. Be sure the action is valid for the current state of the article, and that you have permission to perform it.

I checked the knowledge settings, permission set access for the article types and everything looks fine but unable to find out why this error is happening and that too for just one sandbox. Any help is appreciated
Hi.. I just came noticed an unknown behavior (to me) in Apex.
I used the below query to pull the data from Case Object.
Select Id, Account.PersonMailingPostalCode from Case
And the below are my System.debug statements..
System.debug('********** Account = ' + caseList[0].Account);
System.debug('********** PersonMailingPostalCode = ' + caseList[0].Account.PersonMailingPostalCode);
The debug logs shows as below without any exception..
'********** Account = null
*********** PersonMailingPostalCode = null
which means that the account is not associated to the case yet. So the caseList[0].Account is null
So how come the second statement to fetch the postal code from Account doesnt throw Null pointer exception but still prints as null. Is this because of the way I query the record??
 
We are implementing Live Agent functionality in Salesforce. We have a requirement to capture if the chat is originated from a desktop or mobile device. I have searched for out of the box features but couldn’t find one to support this requirement. 

Would appreciate inputs related to resolving this issue.
Hi,

We have a service console app enabled and on the right side bar there are two 'Custom Console Components' which is mapped to two different VF pages. 
Now on my left console screen lets say I have a field and based on the value provided in this field - i have to switch the focus between the two VF pages on my right side bar.
For Ex., 
On my left screen lets say i have a text field called 'Page Name'. On my right side bar I have two tabs with 'VF-1' and 'VF-2' as the custom console components.
So if i enter the text as 'VF-1' in Page Name field on the left screen, the focus of the tab on the right side console component should be 'VF-1' and it should display the contents of the corresponding page. Similary for 'VF-2'..
I checked the console toolkit integration methods but there is nothing relevant to this. Can anyone help me on this feasability of this requirement.?
Thanks.
Hi.. I just came noticed an unknown behavior (to me) in Apex.
I used the below query to pull the data from Case Object.
Select Id, Account.PersonMailingPostalCode from Case
And the below are my System.debug statements..
System.debug('********** Account = ' + caseList[0].Account);
System.debug('********** PersonMailingPostalCode = ' + caseList[0].Account.PersonMailingPostalCode);
The debug logs shows as below without any exception..
'********** Account = null
*********** PersonMailingPostalCode = null
which means that the account is not associated to the case yet. So the caseList[0].Account is null
So how come the second statement to fetch the postal code from Account doesnt throw Null pointer exception but still prints as null. Is this because of the way I query the record??
 
Hello,

I created a custom field and set the help text with the line breaks and when it is hovered in the detail page it displays as 
First Line
Second Line
When I checked the html page generated by Salesforce the code looks like below.
sfdcPage.setHelp('xxxx', 'FirstLine\r\u003Cbr\u003ESecondLine');
which i assume is complicated version of 
sfdcPage.setHelp('xxxx', 'FirstLine\r\nSecondLine');
Now when I added a translated text in Setup -> Translation Workbench -> Translate for another language and given the value as 
First Line_FR\r\nSecond Line_FR
but in the UI, it displays everything in a single line and there is no line break but instead it displays all the characters entered above. When looked at the html page generated by Salesforce this is what I see
sfdcPage.setHelp('xxxx', 'First line_FR \\r\\n Second line_FR');
SF automatically inserts another escape sequence character '\' so that it displays what we enter in the translated text. I tried replacing '\r\n' with the actual value which SF used '\r\u003Cbr\u003E' in the translation workbench but still no luck. Is there any other way to display the line break?
Hello guys,

How to redired on below page after click the button. I want to redirect on following page after click their page page. How to get id of this page?

User-added image
Hi.. I just came noticed an unknown behavior (to me) in Apex.
I used the below query to pull the data from Case Object.
Select Id, Account.PersonMailingPostalCode from Case
And the below are my System.debug statements..
System.debug('********** Account = ' + caseList[0].Account);
System.debug('********** PersonMailingPostalCode = ' + caseList[0].Account.PersonMailingPostalCode);
The debug logs shows as below without any exception..
'********** Account = null
*********** PersonMailingPostalCode = null
which means that the account is not associated to the case yet. So the caseList[0].Account is null
So how come the second statement to fetch the postal code from Account doesnt throw Null pointer exception but still prints as null. Is this because of the way I query the record??
 
I am getting the following error for the code below while attempting to complete a change set. How can I correct this? 

"One or more components failed Version Compatibility Check.This change set contains components that require the "36.0" or higher platform version. Please select an organization with a platform version of "36.0" or higher, or remove all incompatible components.​"
 
global class myHandler implements Messaging.InboundEmailHandler { global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope) { Messaging.InboundEmailResult result = new Messaging.InboundEmailresult(); return result; } 

Thanks in Advance!! 
I use Workbench to run some SOQL queries to get data from my ContentDocument table. My first query simply lists all the records: 
"Select Id, Title from ContentDocument"
The number of records matchs what's returned by the SOQL API. However, if I select to include "Deleted and Archived Records" from the console, I see a couple more data. I am new to SFDC so this is a bit strange for me. But that wasn't the strangest part - the strangest part is by accident I ran into some DocumentIDs that were NOT included in the table, but if I search for them specifically, Workbench returns them! 

"Select Id, Title from ContentDocument where Id=<foo>"

I double-checked several times, using Title and ID so it's not my eyes. Plus there are more than 1 records missing.

So I have 2 questions: 
1> What do I need in my SOQL query to get everything from the table? I will only use API for production 
2> Why do I not see some records with a statement that should return everything (I come from vanilla SQL camp)?










 

 
Hello,

I've read that upsert operation accepts the standard ID field as the matching field, or any external ID field if present. However, when I attempt to export some Lead records and directly upsert the generated .csv file into SF, I get the below error:
User-added image

When I open the .csv file with an editor, ID field is present:

User-added image

Moreover, when I do the same operation for Account object which has an external ID field, the matching field window has the text "no external ID found, dataloader will use the Id field". But below that text, the external field is selected as the matching field and is greyed out.

Why does DataLoader ignore my standard ID fields? I tried a custom object, and standard ID field is still ignored.

Thanks in advance.
Dear Salesforce Community,

I am currently working on a report and was wondering if there is a way where we could make a customized column for account numbers. For instance if one looks at the picture below I have the columns for the account name date modified etc.I would like to create a column for "Account Numbers" that corresponds to each account name. Request if you could pelase assist and advise.
 For each of the account names there is an account number affiliated.

Thank You.
I am building a 'List<SelectOption>' and populating it with 'new SelectOption's, then using it in an apex:selectCheckboxes construct to output a set of checkboxes on a VF page. When Salesforce generates the checkboxes, I see the <input> and <label> tags as I expect. However, some of the labels in a list are very long, and I want to disable the functionality of clicking the labels to change the status of the associated checkbox. It can lead to inadvertent setting or unsetting of the checkbox values. How can I disable the clickability? In straight HTML coding, I can set the onclick handler to return false, which prevents it from altering the checkbox value, but I have not been able to figure out how to implement that in this case, since I don't seem to have access to parameters of the <label> command.

Example coding from the controller:
dynamicSEPOptions = new List<SelectOption>();
dynamicSEPOptions.Add(new SelectOption('First', '</label>Short normal label<label>'));
dynamicSEPOptions.Add(new SelectOption('Second', '</label>This is a very long label, which should point out that it could lead to inadvertent setting of the checkbox value<label>'));
dynamicSEPOptions.Add(new SelectOption('Third', '</label>This is an even longer label, wrapping over several lines, which, regardless of the content of the text, should not be clickable to set the checkbox value because it doesn\'t conform to current web experience standards and can result in incorrect checkbox values<label>'));

Example code from the VF page:
<apex:selectCheckboxes value="<field name>" layout="pageDirection" >
     <apex:selectOptions value="{!dynamicSEPOptions}" />
</apex:selectCheckboxes>

Output checkbox list on the page:
Output example of checkboxes
I have two picklists. One controls the other.
In my visualforce edit page, the dependent field always shows all options no matter what is selected in the controlling field.
I am confused if this is something I need to code for.
Some links seem indicate that regular apex:inputfield should handle the restrictions.
Examples:
http://salesforce.stackexchange.com/questions/5439/how-can-we-write-dependent-picklist-through-apex-code/
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_dependent_picklists.htm

Am I misunderstanding this?

My simple test page always shows all choices available in the dependent field.

    
<apex:page standardController="Opportunity">
        <apex:form >
            <apex:pageBlock mode="edit">
                <apex:pageBlockButtons >
                    <apex:commandButton action="{!save}" value="Save"/>
                </apex:pageBlockButtons>
                <apex:pageBlockSection title="Dependent Picklists" columns="2">
                <apex:inputField value="{!Opportunity.Global_Entity_Type__c}"/>
                <apex:inputField value="{!Opportunity.SubType__c}"/>
                </apex:pageBlockSection>
            </apex:pageBlock>
        </apex:form>
    </apex:page>
  • January 15, 2016
  • Like
  • 0
I have a scenario where too many calculations to be done with large volume of data to load a custom visualforce page report. I have almost avoided unnecessary loop in Apex code. Since it is more than 100k records, calculation is taking long time which is exceeding limit of 10000ms. So it is hitting CPU Limit Exceeded error. Is there a way to increase CPU time?
I have an issue with creating tests for a class that calculates a number and stores it i my salesforce database.  I have a cstom object called "Application," which is related to a Contact object.  I created a custom field in the Application object that will store the numberical value of a students for finacial aid purposes.  I created an apex class to update the value of this number, and I am using that class through an after update trigger on the Application object.  The API name for the Application object is EnrollmentrxRx__Enrollment_Opportunity__c.  Here is the error that I'm getting:
System.DmlException: Update failed. First exception on row 0 with id a0Bo00000047ZJSEA2; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, ApplicationTrigger: execution of AfterUpdate
caused by: System.FinalException: Record is read-only
Class.CalculateFinAidIndex.updateIndex: line 67, column 1
Class.CalculateFinAidIndex.updateIndexFromApplication: line 26, column 1
Trigger.ApplicationTrigger: line 14, column 1: []

The stack trace says "Class.TestCalculateFinAidIndex.updateIndexFromApplicationTest: line 12, column 1," which points to the update apps line in the following code.  My Test class is below:
@isTest(SeeAllData=true)
public class TestCalculateFinAidIndex {
    static testMethod void updateIndexFromApplicationTest() {
        List<EnrollmentrxRx__Enrollment_Opportunity__c> apps = new List<EnrollmentrxRx__Enrollment_Opportunity__c>();
        apps.addall([SELECT Financial_Aid_Index__c,EnrollmentrxRx__Applicant__c,EnrollmentrxRx__Admissions_Status__c,Active_Application__c,Max_ACT_Composite__c,SAT_Superscore__c,EnrollmentrxRx__GPA__c,First_Generation__c FROM EnrollmentrxRx__Enrollment_Opportunity__c WHERE EnrollmentrxRx__Admissions_Status__c = 'Admit' AND Active_Application__c = true LIMIT 10]);
        System.assert(apps != null);
        System.assert(apps.size() > 0);
        for (EnrollmentrxRx__Enrollment_Opportunity__c app : apps) {
            app.Date_Last_Updated_Auto_FinAidIndex__c = Date.today();
        }
        update apps; // this will call the trigger
        for (Integer i = 0; i < apps.size(); i++) {
            System.assert(apps[i].Financial_Aid_Index__c != null);
            System.assert(apps[i].Financial_Aid_Index__c > 0);
        }
    }
}

Here's my code for the class that I need to test:
public class CalculateFinAidIndex {
    public static void updateIndexFromApplication(EnrollmentrxRx__Enrollment_Opportunity__c[] apps) {
        for (EnrollmentrxRx__Enrollment_Opportunity__c app : apps) {
            updateIndex(app);
        }
        update apps;
    }
    
    public static void updateIndex(EnrollmentrxRx__Enrollment_Opportunity__c app) {
            if (app.Active_Application__c &&
                ((app.EnrollmentrxRx__Admissions_Status__c == 'Applied') || (app.EnrollmentrxRx__Admissions_Status__c == 'Complete') || (app.EnrollmentrxRx__Admissions_Status__c == 'Admit'))) {
                    Integer finIndex = 0;
                    Double act = app.Max_ACT_Composite__c;
                    Double sat = app.SAT_Superscore__c; // or is it app.EnrollmentrxRx__Total_SAT_Score__c
                    Double gpa = 0; // 25
                    Integer gender = 0; // 10
                    Integer race = 0; // 10
                    Integer legacy = 0; // 10
                    Integer firstGen = 0; // 10
                    Double testValue = 0;
                    if (sat != null) sat = (sat / 2400) * 25; // assuming that the max is 2400
                    else sat = 0;
                    if (act != null) act = (act / 36) * 25; //assuming that the max is 36
                    else act = 0;
                    if (sat > act) testValue = sat;
                    else testValue = act;
                    Contact c = new Contact();//app.EnrollmentrxRx__Applicant__c;
                    if (c.EnrollmentrxRx__Gender__c == 'Male') gender = 10;
                    if (app.EnrollmentrxRx__GPA__c != null) {
                        gpa = (app.EnrollmentrxRx__GPA__c / 4) * 25;
                        if (gpa > 25) gpa = 25;
                    }
                    if (c.Race__c != 'White') race = 10;
                    if (app.First_Generation__c) firstGen = 10;
                    if (c.Legacy_Relationship__c != null) legacy = 10;
                    finIndex += (Integer)testValue + (Integer)gpa + gender + race + legacy + firstGen;
                    app.Financial_Aid_Index__c = finIndex;
                    System.debug('Logging from UpdateIndex: ' + finIndex);
            }
        }
}

Thank you for your help!
Hi,


I am geting an error that zone is missing. but i am defaulting that in Class but still error

 
Page:
<apex:page standardController="idea">
<apex:form >
<apex:pageBlock title="New Idea">
<apex:pageBlockButtons >
 <apex:commandButton action="{!Save}" value="Save"/>
 <apex:commandButton value="Cancel" action="{!Cancel}" />
</apex:pageBlockButtons>
<apex:pageBlockSection title="Idea Details" columns="1">
<apex:inputField style="width:250px" value="{!idea.title}"/>
<apex:inputField required="true" style="width:600px" value="{!idea.body}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
            

Class:

public with sharing class ideaExtension {
Private final Idea idea;
public ideaExtension(ApexPages.StandardController stdController) {
this.idea = (Idea)stdController.getRecord();
}
public String getCommunityId() {
return idea.CommunityId ='012G0000000nJvqINO';
}
}

 
trigger CountSpeakerEvaluationsnew on Speaker_Evaluation_AEGR__c(after insert, after delete, after undelete) {

    List<id> accIdList = new List<id>();
    if(Trigger.isInsert || Trigger.isUndelete){
        For(Speaker_Evaluation_AEGR__c con1 : Trigger.new){
            accIdList.add(con1.Medical_Event_vod__c.id);
        }
    }
    if(Trigger.isDelete){
        For(Speaker_Evaluation_AEGR__c con1 : Trigger.old){
            accIdList.add(con1.Medical_Event_vod__c.id);
        }
    }
    List<Account> accUpdateList = new List<Account>();
    For(Medical_Event_vod__c acc : [SELECT  No_of_Speaker_Evaluations__c,(SELECT id FROM Speaker_Evaluations__r) FROM Medical_Event_vod__c WHERE id =: accIdList]){
        acc.No_of_Speaker_Evaluations__c = acc.Speaker_Evaluations__c.size();
        accUpdateList.add(acc);
    }
    try{
        update accUpdateList;
    }Catch(Exception e){
        System.debug('Exception :'+e.getMessage());
    }
}
Error: Compile Error: Invalid foreign key relationship: Speaker_Evaluation_AEGR__c.Medical_Event_vod__c at line 6 column 27
I have some custom fields in Leads
1.  Assigned To with a pick list of contractors (they are not users)
2.  Date and Time to be used for when they are scheduled to go to customers house
3.  Description Box used to explain the problem and what needs to be looked at.

Is it possible to have all that information as well as the customers name, address, phone, etc automatically sent to the calendar as a meeting for the date and time I put in rather than having to do a second step and creating an appointment and having to input all that info manually agian? Which ultimatley will all tranfer to the Google calendar which is what the contractors use.  

 
Where i can find Analytics SAQL Editor??? 
Anyone know what the CSS is for styling content to look like the updated service cosole?  Specifically like how related lists look like on a side component.  It has a clean, white look without much borders.  I would like to use such a CSS for my Flow's that I am planning on making.

Hi I'm wondering if there is a dashboard in the works / an APP that we could use or as an add-on / or anyway to scan the databse of Service Cloud cases raised by the help desk agentsfor trending topics so that we have a real-time heat map of what our customers are talking about. This would give us a tool to link & triage issues quicker

I think in my head I had vision of a word heat map that you could click on and see a list of cases that mention those words and then decide if you need to create a HT and link them. Something that would look like this: 

User-added image

This is something that we would really benefit from if we were able to develope it. I know the technology exists, just not sure how to work it with the databas of cases that are being created. 

Currently we are really struggling having agents at desks around the world understanding when single cases are a trending / larger issue, and this would be a huge win for us to have a tool like this in place.