• Tina0204
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
Hi All,
My use case is that I want to invoke a Flow from a Lightning component. The Flow should return a list of records to the Component and then finally displayed on the component.

Can someone tell me if I can use the 'Get Records' element of the Flow to get the records. Then hpw can I return them to the Component so as to display them.

Any help appreciated..
Thanks!
Hi guys,
I have a use case for REST integration where in I am doing a POST request and sending the json file in the REST request. I am sending the filename as a parameter.
Is it possible to send an additional parameter along with the file name in another key valye pair?

Like the below JS snippet -
formData: { "file": fs.createReadStream("payload.json") "job_type": "property-details", },

I need to send that additional "job_type" : "property=details" along with the file name. Is it possible to do?

Hi there,
Here is an issue I'm facing with Flows.
I had 3 radio buttons on the basis of which one is clicked, the decision executes.
Now I have a requirement as I have to change these options as images. And on the basis of which image is clicked the decision needs to execute.

 

How do I pass the result of the image clicked to the decision box and how do I compare for the decision to execute.

Can someone help with this?

User-added image

Hi,

I am getting the above error while completing hte challenge. Everything is working fine, still I dont know what is being missed.. Can someone help me out.

My code is as below:

BoatSearchForm.cmp
<aura:component controller="BoatDetailsController">
    
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:attribute name="showNewButton" type="Boolean"/>
    <aura:attribute name="boatType" type="BoatType__c[]"/>
    <aura:attribute name='searchOptionToIdMap' type='Map' default="{All:''}" />
    
    <aura:registerEvent name="boatsearch" type="c:boatSearchEvent"/>
    
    
    <lightning:layout horizontalAlign="center">
        <lightning:layoutItem class="slds-grid_vertical-align-center">
        <lightning:select name="Boat Types" label="" aura:id='selectComp'>
            <option value="">All Types</option>
        <aura:iteration items="{!v.boatType}" var="boat">
            <option value="{!boat.Id}" text="{!boat.Name}"></option>
        </aura:iteration>
    </lightning:select>
        </lightning:layoutItem>
        
    <lightning:layoutItem class="slds-grid_vertical-align-center slds-p-horizontal_medium slds-p-top_medium">
        <lightning:button variant="brand" label="Search" onclick="{! c.handleSearch }"/>
        
        
    <aura:if isTrue='{!v.showNewButton}'>
        <lightning:button variant="neutral" label="New" onclick="{! c.createNewRecord }" />
        </aura:if>
     </lightning:layoutItem>
      </lightning:layout>
</aura:component>

BoatSearchFormController:
({
    doInit : function(component, event, helper) {
        var isEnabledcreateRecordEvent = $A.get("e.force:createRecord");
        if(isEnabledcreateRecordEvent){
        console.log("isEnabledcreateRecordEvent--"+isEnabledcreateRecordEvent);
        component.set('v.showNewButton',true);
    }
        helper.getBoatTypes(component, event, helper);
        
    },
    
    createNewRecord : function(component, event, helper) {
        var createRecordEvent = $A.get("e.force:createRecord");
        if(createRecordEvent){
            
            var selected =component.find('selectComp').get('v.value');
            console.log("selected---"+selected);
            
        createRecordEvent.setParams({
        "entityApiName": "Boat__c",
             'defaultFieldValues': {
                            'BoatType__c': selected
                        }
        }); 
        }
            
    createRecordEvent.fire();
    },
    
    handleSearch : function(component, event, helper) {
        var selectedboatType =component.find('selectComp').get('v.value'); 
       var searchEvent = $A.get("e.c:boatSearchEvent"); 
        searchEvent.setParams({
            "boatTypeID" : selectedboatType});        
        searchEvent.fire();       
    }    
})


BoatSearchResults.cmp:
<aura:component controller="BoatSearchResults" implements="flexipage:availableForAllPageTypes" access="global">
     
    <aura:attribute name="boats" type="Boat__c[]"/>
    <aura:attribute name="boatTypeId" type="String"/>
    <aura:attribute name="selectedBoatId" type="Boolean"/>

    <aura:handler name="init" value="{!this}" action="{!c.doSearch}"/>
    <aura:handler event="c:boatSearchEvent" action="{!c.handleBoatSearchEvent}"/>
    
    <lightning:layout horizontalAlign="spread" multipleRows="true">
    <aura:if isTrue="{!v.boats.length > 0}">
    <aura:iteration items="{!v.boats}" var="boat">
         <lightning:layoutitem >
        <c:BoatTile boat="{!boat}" selectedBoatId="{!boat.Id==v.selectedBoatId ? true : false}"/>
        </lightning:layoutitem>
  </aura:iteration>
       
        <aura:set attribute="else">
        <lightning:layoutitem class="slds-align_absolute-center">
             <ui:outputText value="No boats found" />
            </lightning:layoutitem>
        </aura:set>
        </aura:if>
        
    </lightning:layout>
</aura:component>


BoatSearchResultsController:

({  
    search: function(component, event, helper){ 
        var params = event.getParam('arguments'); 
        alert(params.boatTypeId); //<---getting proper value
        alert(component.set("v.boatTypeId", params.boatTypeId)); //<---here I am getting undefined
        var a = component.get('c.doSearch');
        $A.enqueueAction(a); 
    }, 
    doSearch : function (component, event, helper){ 
        alert(component.get("v.boatTypeId")); //<---here I am getting undefined
        helper.onSearch(component); //calling helper method
    },
    
    handleBoatSearchEvent : function(component, event, helper) {
        console.log("In boatSearchEvent handler");
     var id = event.getParam("boatTypeID");
        component.set("v.boatTypeId",id);
    }    
})

BoatSearchResultsHelper:
({
    onSearch : function(component) {
        console.log("onSearch: In onSearch helper");
        
        var action = component.get("c.getBoats");
        action.setParams({boatTypeId:component.get("v.boatTypeId")});
     
        action.setCallback(this, function(response) {
            var state = response.getState();
            console.log("State---"+state);
             if (state === "SUCCESS")
             {
                 console.log('onSearch : inside success state');
                 var boatIds = response.getReturnValue();
                 console.log("When in onSearch boatIds---"+boatIds);
                 component.set("v.boats", boatIds);
             }
        });
        $A.enqueueAction(action);        
    }
})
Hi, I am trying to complete the LEX Rollout specialist and Im stuck at step 8.

I am unable to find "Upcoming Events" component on the left hand side from where we add standard components to the lightning page.
Can someone help me figure this out.
Help appreciated..

Thanks! 
Hi there , can anyone help with the REGEX for time format in the specified format  
HH:MM - HH:MM .

Unable to get the second HH:MM.

Please help
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: COMRPQTW

Can someone tell me why this error. Followed all the steps, tried again in fresh org, still the same error persists
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: COMRPQTW

Can someone tell me why this error. Followed all the steps, tried again in fresh org, still the same error persists
Hi,

I am getting error as below in Lightning Experience Rollout Specialist Challenge #8

The Lightning Knowledge app doesn't have the ability to view either or both: recently-visited primary tabs or subtabs.

Could any one please suggest me?

Thanks
Surya