• Max Paq
  • NEWBIE
  • 55 Points
  • Member since 2014
  • Senior Developer
  • Goby LLC

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 15
    Replies
Hello,

I started this new superbadge yesterday and I am wondering if there is an issue with step 7: Set up reporting for sales managers in Lightning Experience.

I believed to have done everything right () report was created, added to Account, Dashboard was created. But I received the following error: 
   
ERROR: The Opportunities Pipeline report must: 
        1. Display data for all time, 
        2. Show opportunities by stage, 
        3. Contain a funnel chart, 
        4. Provide the information required by the dashboard.
I am trying to understand it, but the requirements and point 4 in the error message makes it a little unspecific (I can dismiss error 1,2,3 easily)... What information do they want to show on the Dashboard? I created all 3 charts but I guess I am not displaying the correct metrics...    
  • September 06, 2017
  • Like
  • 0
In a lightning component, I am trying to use the values in 1 array to set the values for a field in a second array. But for whatever reason I always end up with the last value of my array as the field value.

Here is the component:
<aura:attribute name="spaceTypeList" type="string[]" default="Conference/Focus Room,Copy Area,Kitchenette,Loading Dock,Electrical Room,Exterior Building,Janitorial Closet,Mothers Room,Office Area,Parking Garage,Restrooms/Locker Rooms,Stairs/Elevators,Carpet Spots/Vacuuming/Flooring,Lobbies/Corridors"/>
    <aura:attribute name="detailRecord" type="Inspection_Area_Detail__c" 
                        default="{'Inspection_Area__c':'',
                                 'Space_Subset__c':'',
                                 'Rating__c':'0',
                                 }"/>
    <aura:attribute name="detailList" type="Inspection_Area_Detail__c[]"/>
    
    <ui:button label="loop test" press="{!c.loop}"/>
    
    <aura:iteration items="{!v.detailList}" var="det">
        <p> Space {!det.Space_Subset__c}</p>
    </aura:iteration>



And here is the controller:

    
({
        loop: function(component, event, helper) {
            
            var spaceList = component.get("v.spaceTypeList");
            var detail = component.get("v.detailRecord");
            var List =component.get("v.detailList");
            
            for(i in spaceList){
                var space =spaceList[i];
                detail.Space_Subset__c = space;
                console.log("detail space subset "+detail.Space_Subset__c);
                List.push(detail);
                
            }
            component.set("v.detailList",List);
            
        },
    })





Thank you for your help.

Hello everyone,

Is there a way to get all the values from an aura:iteration element? Both output and input value? I have the following code in my component and I would like to get all the values in the inputNumber field, the {!subset} value and match them together.

<aura:iteration items="{!v.spaceSubsets}" var="subset">
      <p>{!subset}  <ui:inputNumber aura:id="detailRating" label='Rating'/></p>
</aura:iteration>

The end goal here would be to click on a button and have the component insert multiple records into the database.

Bonus point if you could help me figure out how to only create record when a value is entered for one of the iteration.

 

Thank you all.

Hello everyone,

I need to have my lightning components work in a Salesforce community, both on the desktop and SF1 app and I was wondering if anyone had any insight on what was the best way to implement this. My community is a Salesforce Tab+visualforce page community. In this community type, does all lightning components need to be in a Visualforce page?


 
Hey everyone,

I am hoping someone can point to me what I am doing something wrong. I have 3 UI:inputSelect field in a lightning component and they all show data correctly. However, whenever I select an option in my second and third field the value never change.


Thank you for your help,
<ui:inputSelect aura:id="buildingList" change="{!c.onBuildingSelection}">
     <ui:inputSelectOption label="Please Select a building"/>
     <aura:iteration items="{!v.buildings}" var="building">
          <ui:inputSelectOption label="{!building.Name}" text="{!building.Id}" />
      </aura:iteration>
</ui:inputSelect>

<ui:inputSelect aura:id="inspectionList" change="{!c.onInspectionSelection}">
     <ui:inputSelectOption label="Please Select an Inspection"/>
     <aura:iteration items="{!v.inspections}" var="inspection">
           <ui:inputSelectOption label="{!inspection.Name}" text="{!inspection.id}"/>
     </aura:iteration>
</ui:inputSelect>
        
<ui:inputSelect aura:id="spaceList">
     <ui:inputSelectOption label="Please Select a Space"/>
     <aura:iteration items="{!v.spaces}" var="space">
                    <ui:inputSelectOption label="{!space}"/>
     </aura:iteration>
</ui:inputSelect>

 

Hi everyone,

I am trying to write a Lightning component bundle that would allow me to display to display a list or record and when a record is clicked it "opens" a form to enter data.

An example of what I am trying to achieve would be

1. A user select an account.
2. A list of contact associated with thi account is displayed (currently done with <aura:iteration>).
3. When the user click on a contact it opens a form.
4. The user enter data in the form press save and a record (related to the contact) is created.
5. When the record is created the form is closed and the user is back to the screen with the account and the list of contacts.

I think I have 1,2 and 4 down but I am lost on how to have 3 and 5 work.

Thank you for your help,

Max

 

Hi everyone,

I was hoping someone would have an answer to a bug I am seeing in the Salesforce1 app.

I created a flow with a date field and created a VF page to host the flow. Everything works fine but when accessing the page in the Salesforce1 mobile app I see a random calendar at the bottom of the screen. I know this is linked to my date field but I can't figure out how to remove it from there.

thank you for your help,

Max

random calendar 
Hi everyone,

We are running into some limitations when using the Analytics API where we only get the first 2000 records of a report. I have talked with one of our developer and he told me it was a limitation of the API. Is there any way around this limitation? We need to run reports via the API on much more than 2000 records.

Thank you for your help,

Max

 
Hello everyone,

We are running into a weird problem in our Salesforce org. We have some code that run on a child object and update the parent object and everything seemed to be working just fine. However, today, when trying to insert records via dataloader.io our insert failed because of a validation rule being triggered on the parent object. But here is the fun part, the validation rule should not have been triggered! I checked it and everything was fine, I deactivated it and then another validation rule was triggered on the parent object (also should not have triggered). And when manually inserting a child record everything worked just fine.

Am I missing something in regard to validation rules and triggers?

Thank you for your help.
Hello everyone,

I am trying to do some data manipulation over records in a list. I was able to correctly build my list but now I am stuck with the calculations that I want to see happen.

Let's say I have record 1 and record 2 in my list. I want to grab a field called meter readings on both record and subtract the value of record 2 from the value from record 1 to get the actual energy use.

record 1 energy use = record 1 meter reading - record 2 meter reading.

And obvisouly I would like to repeat that for every records in my list except for the last one (since I would not have a second meter reading to do the calculation).

At first I thought of using a variable to control the for loop but I keep getting the following error message: "System.ListException: List index out of bounds: 15" 

Here is the part of the code that is causing me trouble
List<Item__c> currentItemList = meterToItemMap.get(currentMeter);
  
        For( Integer i =0; i <currentItemList.size(); i++){
         if(currentItemList.size()>1){
         currentItemList[i].Item_Use__c =(currentItemList[i].Meter_readings__c - currentItemList[i+1].meter_readings__c)*currentItemList[i].Meter_Multiplier__c;
        }
        }
I am quite new to APEX and coding so any help is welcome.
Thank you

  • September 18, 2014
  • Like
  • 0

Hello everyone,

Is there a way to get all the values from an aura:iteration element? Both output and input value? I have the following code in my component and I would like to get all the values in the inputNumber field, the {!subset} value and match them together.

<aura:iteration items="{!v.spaceSubsets}" var="subset">
      <p>{!subset}  <ui:inputNumber aura:id="detailRating" label='Rating'/></p>
</aura:iteration>

The end goal here would be to click on a button and have the component insert multiple records into the database.

Bonus point if you could help me figure out how to only create record when a value is entered for one of the iteration.

 

Thank you all.

Hello,

I started this new superbadge yesterday and I am wondering if there is an issue with step 7: Set up reporting for sales managers in Lightning Experience.

I believed to have done everything right () report was created, added to Account, Dashboard was created. But I received the following error: 
   
ERROR: The Opportunities Pipeline report must: 
        1. Display data for all time, 
        2. Show opportunities by stage, 
        3. Contain a funnel chart, 
        4. Provide the information required by the dashboard.
I am trying to understand it, but the requirements and point 4 in the error message makes it a little unspecific (I can dismiss error 1,2,3 easily)... What information do they want to show on the Dashboard? I created all 3 charts but I guess I am not displaying the correct metrics...    
  • September 06, 2017
  • Like
  • 0
Hello, there. I'm working on very first Lightning application, and I'm noticing some strange behavior. I'm using a VF page with <apex:includeLightning /> and a script to load a component from an app like so:
 
$Lightning.use("c:OpportunityProductApp", function() {
    $Lightning.createComponent("c:PricebookSelector", {}, "pricebookSelector", function(cmp) {
        console.log('loaded component ...');
	    // do some stuff here
    });
});
The Lightning application is very simple:
 
<aura:application access="GLOBAL" extends="ltng:outApp">
    <c:PricebookSelector />
</aura:application>
The lightning component is as equally simple:
<aura:component controller="PricebookSelectorController">
    <aura:attribute name="pricebooks" type="List" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
</aura:component>
The component controller looks like this:
({
    doInit : function(component, event, helper) {
        helper.getPricebooks(component);
    }
})
Finally, the component helper looks like this:
({
    getPricebooks: function(component) {
        var action = component.get("c.getPricebooks");

	    var self = this;
	    action.setCallback(this, function(actionResult) {
		    console.log(actionResult);
	    });

	    $A.enqueueAction(action);
    }
})
The problem:

When I load up the VF page, I get a debug to the console that the component has finished loading (as expected). However, I get two separate, but identical, log messages with the action result. Why are two calls made to the server??

Thanks so much. =)




 
Hello everyone,

I need to have my lightning components work in a Salesforce community, both on the desktop and SF1 app and I was wondering if anyone had any insight on what was the best way to implement this. My community is a Salesforce Tab+visualforce page community. In this community type, does all lightning components need to be in a Visualforce page?


 
Hey everyone,

I am hoping someone can point to me what I am doing something wrong. I have 3 UI:inputSelect field in a lightning component and they all show data correctly. However, whenever I select an option in my second and third field the value never change.


Thank you for your help,
<ui:inputSelect aura:id="buildingList" change="{!c.onBuildingSelection}">
     <ui:inputSelectOption label="Please Select a building"/>
     <aura:iteration items="{!v.buildings}" var="building">
          <ui:inputSelectOption label="{!building.Name}" text="{!building.Id}" />
      </aura:iteration>
</ui:inputSelect>

<ui:inputSelect aura:id="inspectionList" change="{!c.onInspectionSelection}">
     <ui:inputSelectOption label="Please Select an Inspection"/>
     <aura:iteration items="{!v.inspections}" var="inspection">
           <ui:inputSelectOption label="{!inspection.Name}" text="{!inspection.id}"/>
     </aura:iteration>
</ui:inputSelect>
        
<ui:inputSelect aura:id="spaceList">
     <ui:inputSelectOption label="Please Select a Space"/>
     <aura:iteration items="{!v.spaces}" var="space">
                    <ui:inputSelectOption label="{!space}"/>
     </aura:iteration>
</ui:inputSelect>

 

Hi everyone,

I am trying to write a Lightning component bundle that would allow me to display to display a list or record and when a record is clicked it "opens" a form to enter data.

An example of what I am trying to achieve would be

1. A user select an account.
2. A list of contact associated with thi account is displayed (currently done with <aura:iteration>).
3. When the user click on a contact it opens a form.
4. The user enter data in the form press save and a record (related to the contact) is created.
5. When the record is created the form is closed and the user is back to the screen with the account and the list of contacts.

I think I have 1,2 and 4 down but I am lost on how to have 3 and 5 work.

Thank you for your help,

Max

 

Hi everyone,

We are running into some limitations when using the Analytics API where we only get the first 2000 records of a report. I have talked with one of our developer and he told me it was a limitation of the API. Is there any way around this limitation? We need to run reports via the API on much more than 2000 records.

Thank you for your help,

Max

 
I've got an Sobject collection variable in a flow, and I would like to display a list of values from the collection in a display text field.

If I use the varaible resource, it displays the IDs, along the lines of [Id1, Id2, Id3].

Is there any way to get the flow to produce something along the lines of:

Name1, Value1
Name2, Value2,
Name3, Value3,

in a display text field?

If not possible in the flow itself, I'm guessing if I embed the flow in a visualforce page I could pull it off, but would appreciate any tips on going about that.

Thanks

(Cross post from success: https://success.salesforce.com/answers?id=90630000000Cr4J)
Hello everyone,

We are running into a weird problem in our Salesforce org. We have some code that run on a child object and update the parent object and everything seemed to be working just fine. However, today, when trying to insert records via dataloader.io our insert failed because of a validation rule being triggered on the parent object. But here is the fun part, the validation rule should not have been triggered! I checked it and everything was fine, I deactivated it and then another validation rule was triggered on the parent object (also should not have triggered). And when manually inserting a child record everything worked just fine.

Am I missing something in regard to validation rules and triggers?

Thank you for your help.
Hello everyone,

I am trying to do some data manipulation over records in a list. I was able to correctly build my list but now I am stuck with the calculations that I want to see happen.

Let's say I have record 1 and record 2 in my list. I want to grab a field called meter readings on both record and subtract the value of record 2 from the value from record 1 to get the actual energy use.

record 1 energy use = record 1 meter reading - record 2 meter reading.

And obvisouly I would like to repeat that for every records in my list except for the last one (since I would not have a second meter reading to do the calculation).

At first I thought of using a variable to control the for loop but I keep getting the following error message: "System.ListException: List index out of bounds: 15" 

Here is the part of the code that is causing me trouble
List<Item__c> currentItemList = meterToItemMap.get(currentMeter);
  
        For( Integer i =0; i <currentItemList.size(); i++){
         if(currentItemList.size()>1){
         currentItemList[i].Item_Use__c =(currentItemList[i].Meter_readings__c - currentItemList[i+1].meter_readings__c)*currentItemList[i].Meter_Multiplier__c;
        }
        }
I am quite new to APEX and coding so any help is welcome.
Thank you

  • September 18, 2014
  • Like
  • 0