• Alo Sen
  • NEWBIE
  • 45 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 16
    Replies
I have installed Eclipse IDE on my work desktop and my home laptop. In the laptop I can see Aura under the available components to select but do not see it on my desktop. I have run all the force.com updates. Can someone please help me understand why I see this difference? Thank you.
I have used this query in the qurey editor of the Developer Console, got the right results and no error.

Select MetricA_IParent_Id__r.Name, MetricA_IParent_Id__r.ADRC_Total_Allocated_Dol_Expenditure__c, id, Reporting_Month__c, ADRC_Percent_of_allocated_Dol_expended__c,ADRC_Total_Dol_Expended__c  from Metrics_AI__c order by Reporting_Month__c

Here Name, MetricA_IParent_Id__r is the parent(2 fields from parent) and Metrics_AI__c the child.
I was trying to use this in apex class as follows when I get this error - System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Metrics_AI__c.ADRC_Total_Allocated_Dol_Expenditure__c

public class Metrics_rptAIReportController2{
    public List<Metrics_AI__c> ACRecord1 {get; set;}
     
    public Metrics_rptAIReportController2() {
        ACRecord1 = new List<Metrics_AI__c>();
        
        ACRecord1 = [Select MetricA_IParent_Id__r.Name, 
        MetricA_IParent_Id__r.ADRC_Total_Allocated_Dol_Expenditure__c, 
        id, 
        Reporting_Month__c, 
        ADRC_Percent_of_allocated_Dol_expended__c,
        ADRC_Total_Dol_Expended__c  
        from Metrics_AI__c 
        order by Reporting_Month__c DESC LIMIT 12];
     }
}

Thanks in advance. 

series: [{ name: 'Facilities that Started in RRT',
data: [ <apex:repeat value="{!ACRecord}" var="sc">
{!sc.Facilities_Started_in_RRT__c},
</apex:repeat>] },

In the above code I want to say - show the data only when the value of the variable is greater than zero. Is there a way to do this? this code is a part of Highchart using the Series for data.
There are 6 rows returned by the value attribute and I would like to show only 5 rows, since the 6th row is a column total which is required for reporting but does not need to be shown on the visual force page. How do I control this?
We have been successfully using the hightcharts in our apex pages. There is a need for a column range chart and I was just trying to render the page as is from a highchart example. Somehow the apex does not like chart: {
            type: 'columnrange'
}
Other charts like bar, column can be easily rendered.
Here is the code:
<apex:page >
<head>
</head>
 <body>
 <apex:outputLink target="_Blank" value="/apex/test_portfolio" id="theLink" ><apex:image id="ITPR_EnlargeIcon" value="{!$Resource.ITPR_EnlargeIcon}" /></apex:outputLink>
 <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
      <script src="{!URLFOR($Resource.Highcharts)}"></script>
<script>
$(function () {

    $('#container').highcharts({

        chart: {
            type: 'columnrange',
            inverted: true
        },

        title: {
            text: 'Temperature variation by month'
        },

        subtitle: {
            text: 'Observed in Vik i Sogn, Norway, 2009'
        },

        xAxis: {
            categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
        },

        yAxis: {
            title: {
                text: 'Temperature ( °C )'
            }
        },

        tooltip: {
            valueSuffix: '°C'
        },

        plotOptions: {
            columnrange: {
                dataLabels: {
                    enabled: true,
                    formatter: function () {
                        return this.y + '°C';
                    }
                }
            }
        },

        legend: {
            enabled: false
        },

        series: [{
            name: 'Temperatures',
            data: [
                [-9.7, 9.4],
                [-8.7, 6.5],
                [-3.5, 9.4],
                [-1.4, 19.9],
                [0.0, 22.6],
                [2.9, 29.5],
                [9.2, 30.7],
                [7.3, 26.5],
                [4.4, 18.0],
                [-3.1, 11.4],
                [-5.2, 10.4],
                [-13.5, 9.8]
            ]
        }]

    });

});

 </script>
 </body>
</apex:page>
What could be the reason for this code to not work within the apex page? Is there any other suggestions on creating a column range chart?
Here is the link to the actual example in Highchart.
http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/demo/columnrange/

I had originally posted this question to the Salesforce community and Deepak Anand had advised to look for JS errors.

 I do see two same errors 
 Failed to load resource: the server responded with a status of 404 (Not Found) on a .png file. Not that I understand what the actual issue is. 
 
When I tried running the EmailManager code in this trailhead tutorial in the execute anonymous window I got the following error
Static methods cannot be invoked through an object instance: sendMail(String, String, String)
Has anyone else encountered this error?
Looks like I can only execute this as follows:
EmailManager.sendMail('myemail address', 'Trailhead Tutorial', '123 body');
What is the syntax for the style attribute for apex inputfield? I would like to align the date inputfield to the right or the left depending on the input from another field.

<apex:pageBlockSectionItem rendered="{!recurrenceTrue}">
<apex:outputLabel >End Date</apex:outputLabel> <apex:inputfield value="{!newEvent.Date__c}" required="true" id="alo" onchange="checkValue2()" />
</apex:pageBlockSectionItem>

input4 is a checkbox and input5 is a date field

<script>

function checkValue2(){ if(jQuery('[id$=alo]').val() != null && jQuery('[id$=alo]').val() != '')
{
jQuery('[id$=input4]').hide();
jQuery('[id$=input5]').hide();
}

</script>

When a new date is chosen in the newEvent.Date__c field it should hide the checkbox(input4) and another datefield(input5).These elements are under separate PageBlockSectionItem.

The funny part is last evening everything was working and this morning this function is not working and I have not changed anything. Is there a way to see in the log if this function got called and executed? Is there a difference in save and quicksave?
I have other jQuery functions in this vf page as well. I have one question regarding this - should i have this under separate script tag?
 
Our sandbox got the Spring 19 release, we have an application containing multiple lighting component tabs so when we click on one tab and perform some action everything works fine but after that when we clik on other tab the page render the tab content and as soon as you start doing action on that screen the entire page gets refreshed as if someone has explicitly called F5 or Browser reload.

Does anyone faced similar issue? Does anyone have fix or work around for this issue, Please do let me know. Thanks!
Hi All,
Can anyone help me out in writing this test class for this apex class.
public with sharing class DeleteWithCheckboxController {
 
 @AuraEnabled
 public static list < contact > fetchContact() {
  list < contact > returnConList = new List < contact > ();
 
  List < contact > lstCon = [SELECT Name, firstName, LastName, Department, MobilePhone From contact LIMIT 50];
  // play for loop on lstCon and add each contact to returnConList List.
  for (contact c: lstCon) {
   returnConList.add(c);
  }
 // return the List of contacts
  return returnConList;
 }
 
 
 @AuraEnabled
 public static List < String > deleteRecords(List < String > lstRecordId) {
  // for store Error Messages  
  List < String > oErrorMsg = new List < String > ();
  // Query Records for delete where id in lstRecordId [which is pass from client side controller] 
  List < contact > lstDeleteRec = [select Id from contact where id IN: lstRecordId];
  
  // delte contact list with Database.DeleteResult[] database class.
  // It deletes some queried contacts using <samp class="codeph apex_code">Database.<span class="statement">delete</span></samp> 
  // with a false second parameter to allow partial processing of records on failure.
  // Next, it iterates through the results to determine whether the operation was successful or not
  // for each record. and check if delete contact successful so print msg on debug, 
  // else add error message to oErrorMsg List and return the list  
  Database.DeleteResult[] DR_Dels = Database.delete(lstDeleteRec, false);
  // Iterate through each returned result
  for (Database.DeleteResult dr: DR_Dels) {
   if (dr.isSuccess()) {
      system.debug('successful delete contact');
     // Operation was successful
   } else {
    // Operation failed, so get all errors   
    oErrorMsg.add('');
    for (Database.Error err: dr.getErrors()) {
     // add Error message to oErrorMsg list and return the list
     oErrorMsg.add(err.getStatusCode() + ': ' + err.getMessage());
    }
   }
  }
  return oErrorMsg;
 
 }
}
Looking for your help.
Aurora.
 
I am trying to include a conditional logic in my custom Email Template, which includes merge fields.
When I include the following formula in my template:
<br />• Case #: {!IF(Case.RecordType ="Enterprise", {!Case.CaseNumber}, "not enterprise")}

The output in my email template looks as follows:
Case #: , "not enterprise")}

And when I edit the Email Template again, I can see that my code had changed to the following:
<br />• Case #: {!NullValue(IF(Case.RecordType ="Enterprise", "{!Case.CaseNumber")}, "not enterprise")}

Why is that?
Hi,

I am on the "Build Better With UX > UX Prototyping Basics > Iterate On Your Prototype" module, and the Challenge for doing:

Add icons to the rest of card titles for the Contacts and Leads to make it clearer for the user which card is which, using the iconName attribute of the lightning:card base Lightning component.
In the Apex Controller, limit the account, contact and lead SOQL queries to return 5 records.

will not find the code I have *definitely* inputted (the icons and listings are showing up in my playground AOK).

The error I get is:

Challenge Not yet complete... here's what's wrong: 
Could not find the iconName code for contacts in the ResultsSection component.


But from my console:
<h2 class="slds-text-heading--medium slds-p-vertical--medium">Contacts</h2>
      <div class="slds-grid">
        <ul class="slds-col slds-size--1-of-1">
          <aura:iteration items="{!v.contacts}" var="contact" indexVar="index">
            <li class="slds-size--1-of-3 slds-show--inline-block">
              <lightning:card variant="narrow" iconName="standard:user" class="slds-m-around--small">
                <aura:set attribute="title">

It is definitely there.

What's going on here?

Thanks.
I am in the last action where the process builder calls the invocable apex class. When i look for the class it appears with the LabelName
 'Give a Thanks Badge' and the lookups do not show up on the Giver Id and Receiver Id fields. Can someone tell me what am I doing wrong?
User-added image
If i put the apex class name as is shown in the trail it still does not find the Giver Id and Receiver Id values. My apex code has an active status.
User-added image
Thank you.
I have used this query in the qurey editor of the Developer Console, got the right results and no error.

Select MetricA_IParent_Id__r.Name, MetricA_IParent_Id__r.ADRC_Total_Allocated_Dol_Expenditure__c, id, Reporting_Month__c, ADRC_Percent_of_allocated_Dol_expended__c,ADRC_Total_Dol_Expended__c  from Metrics_AI__c order by Reporting_Month__c

Here Name, MetricA_IParent_Id__r is the parent(2 fields from parent) and Metrics_AI__c the child.
I was trying to use this in apex class as follows when I get this error - System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Metrics_AI__c.ADRC_Total_Allocated_Dol_Expenditure__c

public class Metrics_rptAIReportController2{
    public List<Metrics_AI__c> ACRecord1 {get; set;}
     
    public Metrics_rptAIReportController2() {
        ACRecord1 = new List<Metrics_AI__c>();
        
        ACRecord1 = [Select MetricA_IParent_Id__r.Name, 
        MetricA_IParent_Id__r.ADRC_Total_Allocated_Dol_Expenditure__c, 
        id, 
        Reporting_Month__c, 
        ADRC_Percent_of_allocated_Dol_expended__c,
        ADRC_Total_Dol_Expended__c  
        from Metrics_AI__c 
        order by Reporting_Month__c DESC LIMIT 12];
     }
}

Thanks in advance. 

series: [{ name: 'Facilities that Started in RRT',
data: [ <apex:repeat value="{!ACRecord}" var="sc">
{!sc.Facilities_Started_in_RRT__c},
</apex:repeat>] },

In the above code I want to say - show the data only when the value of the variable is greater than zero. Is there a way to do this? this code is a part of Highchart using the Series for data.
There are 6 rows returned by the value attribute and I would like to show only 5 rows, since the 6th row is a column total which is required for reporting but does not need to be shown on the visual force page. How do I control this?
When I tried running the EmailManager code in this trailhead tutorial in the execute anonymous window I got the following error
Static methods cannot be invoked through an object instance: sendMail(String, String, String)
Has anyone else encountered this error?
Looks like I can only execute this as follows:
EmailManager.sendMail('myemail address', 'Trailhead Tutorial', '123 body');
What is the syntax for the style attribute for apex inputfield? I would like to align the date inputfield to the right or the left depending on the input from another field.

<apex:pageBlockSectionItem rendered="{!recurrenceTrue}">
<apex:outputLabel >End Date</apex:outputLabel> <apex:inputfield value="{!newEvent.Date__c}" required="true" id="alo" onchange="checkValue2()" />
</apex:pageBlockSectionItem>

input4 is a checkbox and input5 is a date field

<script>

function checkValue2(){ if(jQuery('[id$=alo]').val() != null && jQuery('[id$=alo]').val() != '')
{
jQuery('[id$=input4]').hide();
jQuery('[id$=input5]').hide();
}

</script>

When a new date is chosen in the newEvent.Date__c field it should hide the checkbox(input4) and another datefield(input5).These elements are under separate PageBlockSectionItem.

The funny part is last evening everything was working and this morning this function is not working and I have not changed anything. Is there a way to see in the log if this function got called and executed? Is there a difference in save and quicksave?
I have other jQuery functions in this vf page as well. I have one question regarding this - should i have this under separate script tag?
 
Hi All,

  Actionfunction and Actionsupport functionality is same why we choose actionfunction though we have actionsupport?

Thanks & Regards
A.Jagadeesh
Hi,

Iam creating a vf page in that vf page i have a checkbox field when i check the checkbox automatically another vf page should be display as popup in my vf page.
Please help me guys,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,