• Priyankar PakhiraPP
  • NEWBIE
  • 50 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 9
    Replies
Hi All,

How to fix an Account Hierarchy in Lighting Exp. In my developer org, I can able to see the "Account Hierarchy" option, please check out this link (https://www.screencast.com/t/61X35XYI8). Whereas in my production org, I can't able to see the (little upside down triangle) option, check this link (https://www.screencast.com/t/QUEqGOEWXS).

Looks pretty weird, am I missing anything here? If this issue because of winter '17 or spring '17 release, then please suggest me any workarounds?

Thank you all!
Hi All,

How to fix an Account Hierarchy in Lighting Exp. In my developer org, I can able to see the "Account Hierarchy" option, please check out this link (https://www.screencast.com/t/61X35XYI8). Whereas in my production org, I can't able to see the (little upside down triangle) option, check this link (https://www.screencast.com/t/QUEqGOEWXS).

Looks pretty weird, am I missing anything here? If this issue because of winter '17 or spring '17 release, then please suggest me any workarounds?

Thank you all!
I am  getting technical error  while implementing the 39.0 version for lightning project.
Its happening while I am saving logs using the savelog() function. 

Error Message from salesforce: 
=========================================================================
"This page has an error. You might just need to refresh it. First, would you give us some details? (We're reporting this as error ID: -863164446)."
=========================================================================
Technical Error description from salesforce:
=========================================================================
Uncaught Error in $A.getCallback() [Cannot read property 'record' of null]
Callback failed: serviceComponent://ui.force.components.controllers.recordGlobalValueProvider.RecordGvpController/ACTION$createRecord
throws at https://liveopstest2-dev-ed.lightning.force.com/auraFW/javascript/uUttwQR-pk5rKvOBHB6bAQ/aura_prod.js:2:15
Object.eval()@libraries/force/recordLibrary/crud.js:12:306
=========================================================================

Can someone please help me to resolve this issue. 


Regards,
Alok Garg
Hi,
when i click an action button on my account detail page it should redirect to a URL and close the action modal page. But the problem is the modal page is still there. Only redirection is happening.

this is my controller code,
({
    myAction : function(component, event, helper) {
        var recordId = component.get("v.recordId");
        var urlEvent = $A.get("e.force:navigateToURL");
        urlEvent.setParams({
            "url": "http://google.com&SalesforceRecordId="+recordId
        });
        urlEvent.fire();
        var dismissActionPanel = $A.get("e.force:closeQuickAction");
        dismissActionPanel.fire();
    }
})

I used 'closequickaction' method to close the modal window. But it is not working. Any idea..?

Thanks in advance..

Regards,
Vivek
I am trying to open another component on click of button but i am getting error as "Cannot read property 'newComponentAsync' of undefined".

Below is my code-

Component-
<button class="slds-button slds-button--neutral" onclick="{!c.gotoURL}">Open Another Component</button>

Controller-
gotoURL : function(component, event, helper) {
        var destination ="markup://c:SampleComponent";
        $A.componentService.newComponentAsync(this,
            function(view) {
              var content = component.find("content");
              content.set("v.body", view);
              }, 
              {
                 componentDef: destination,
                          }, component);
    }

Please help. 
Need an urgent help. I have created a standard object named Engagement and created a Calendar from the object to see only the Engagement items in it; but I want to create a Calendar from that object for all users and set it as the default one, so that any user can just login and go to the calendar to see the Calendar items on the Engagement object.
Any Idea on how to do so?
  • February 19, 2017
  • Like
  • 0
Component:-
<aura:component controller="searchAccountController">
   <ltng:require styles="{! $Resource.SLDS24+ '/assets/styles/salesforce-lightning-design-system.css'}"/>
    <aura:attribute name="wrappers" type="wrapperaccount"> </aura:attribute>
    <aura:attribute name="accounts" type="Account" />
    <aura:attribute name="searchResult" type="List" description="use for store and display account list return from server"/>
   <aura:attribute name="searchKeyword" description="use for input" type="string" ></aura:attribute>
    <aura:attribute name="Message" type="boolean" default="false" description="use for display no record found message"/>
    <div class="slds-m-around--large">
       <form class="slds-form--inline"> 
         <div class="slds-form-element"> 
            <label class="slds-form-element__label" for="Search">Account Search</label>  
              <div class="slds-form-element__control" >
                <ui:inputtext aura:id="searchId" value="{!v.searchKeyword}" placeholder="Type Account Name"  class="slds-input"></ui:inputtext>
              </div>
            </div> 
             <div class="slds-form-element">
                 <button type="Button" onclick="{!c.SearchJS}" class="slds-button slds-button--brand">Search</button>
                 </div>
        </form>   
         <table class="slds-table slds-table--bordered slds-table--cell-buffer">
            <thead>
                <tr class="slds-text-title--caps">
                    <th scope="col">
                         <div class="slds-truncate" title=" Name"> ID</div>
                    </th>
                    <th scope="col">
                         <div class="slds-truncate" title=" Name"> Name</div>
                    </th>   
                     <th scope="col">
                          <div class="slds-truncate" title="Type">Type</div>
                       </th>
                       <th scope="col">
                          <div class="slds-truncate" title="Industry">Industry</div>
                       </th>
                       <th scope="col">
                          <div class="slds-truncate" title="Phone">Phone</div>
                       </th>
                       <th scope="col">
                          <div class="slds-truncate" title="Fax">Fax</div>
                       </th>
                </tr>
            </thead>
            <tbody>
                 <aura:if isTrue="{!v.Message}">
               <div class="slds-text-color--error"> No Result Found...</div>
            </aura:if>
                <aura:iteration items="{!v.wrappers}" var="Wrap"> 
              <tr>
                  <td>
                     <div class="slds-truncate">{!Wrap.acc.Id}</div>
                  </td>
               <!--  <td>
                     <div class="slds-truncate">{!Wrap.acc.name}</div>
                  </td>
                  <td>
                     <div class="slds-truncate">{!Wrap.acc.Type}</div>
                  </td>
                  <td>
                     <div class="slds-truncate">{!Wrap.acc.industry}</div>
                  </td>
                    <td>
                     <div class="slds-truncate">{!Wrap.acc.Phone}</div>
                  </td>
                    <td>
                     <div class="slds-truncate">{!Wrap.acc.fax}</div>
                  </td> -->
              </tr>
                </aura:iteration>     
            </tbody>
        </table> 
      </div>     
     
</aura:component>
JS :-
({
    SearchJS : function(component, event, helper) {
        var searchKeyId=component.find("searchId"); 
        var searchKey=component.get('v.searchKeyword');
        alert('==searchKeyword'+searchKey);
        if(searchKey == '' || searchKey == null)
        {
            alert('--enter');
          //  searchKeyId.set("v.errors",[{message: "Enter search Keyword" }]);
             $A.util.addClass(searchKeyId,'errorClassAdd');
            //$A.util.removeClass(searchKeyId,'errorClassRemove');
        }
        else{
             $A.util.addClass(searchKeyId, 'errorClassRemove');
             $A.util.removeClass(searchKeyId, 'errorClassAdd');
            helper.searchHelper(component,event);
        } 
    },
})
Helper :- 
({
    searchHelper: function(component, event) {
        var action = component.get("c.searchmethod");
        alert('====key'+component.get("v.searchKeyword"));
        action.setParams({
            'searchKeyword': component.get("v.searchKeyword")         
        });
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var storeResponse = response.getReturnValue();
                // if storeResponse size is 0 ,display no record found message on screen.
                if (storeResponse.length == 0) {
                    component.set("v.Message", true);
                } else {
                    component.set("v.Message", false);
                
                }
                var wrappers=new Array();
                for (var idx=0; idx<storeResponse.length; idx++) {
                   var wrapper = { 'acc' : storeResponse[idx],
                   'selected' : false
                            };
                    
               wrappers.push(wrapper);
                    alert('--wrapper--'+wrappers);
            } 
                 // component.set("v.searchResult", storeResponse);
                   component.set('v.wrappers', wrappers);
                    alert('==='+component.set("v.searchResult", storeResponse));
                
            } 
 
        });
        $A.enqueueAction(action);
 
    },
})

Apex:- 

public class searchAccountController {

 @AuraEnabled
  public static list<account> searchmethod(string searchKeyword)
  {
    system.debug('--enter --'+searchKeyword);
    String searchKey=searchKeyword + '%';
    system.debug('--enter =--'+searchKey);
    list<account> returnList =new list<account>();
    list<account> AccList=[select id,name,type,industry,phone,fax from account where name like: searchKey];
    for(account acc:AccList)
    {
    returnList.add(acc);
       }
    return returnList;
    
  }
    
    public class wrapperaccount{
       
        @AuraEnabled
        public Account acc {get; set;}
        @AuraEnabled
        public Boolean selected {get; set;}
    }
}

I have follwed this link  http://bobbuzzard.blogspot.in/2015/12/lightning-component-wrapper-classes.html

I am getting this error

User-added image
I'm having trouble with one of the trailhead modules, Lightning Components Basics Input Data Using Forms https://developer.salesforce.com/trailhead/lex_dev_lc_basics/lex_dev_lc_basics_forms

In a previous module I set up the SLDS static resource and now in this module I'm asked to acess it and I'm not getting the custom styling that is supposed to be implimented. I copy-pasted the code exactly as it is shown in the module and only changed the name of the static resource.

expensesApp.app
<aura:application>
 
    <!-- Include the SLDS static resource (adjust to match package version) -->
    <ltng:require styles="{!$Resource.SLDS201 +
         '/assets/styles/salesforce-lightning-design-system-ltng.css'}"/>
 
    <!-- Add the "scoping" element to activate SLDS on components
         that we add inside it. -->
    <div class="slds">
       
        <!-- This component is the real "app" -->
        <c:expenses/>
       
    </div>
    <!-- / SLDS SCOPING DIV -->
 
</aura:application>
expenses.cmp
<aura:component>

    <!-- PAGE HEADER -->
    <div class="slds-page-header" role="banner">
      <div class="slds-grid">
        <div class="slds-col">
          <p class="slds-text-heading--label">Expenses</p>
          <h1 class="slds-text-heading--medium">My Expenses</h1>
        </div>
      </div>
    </div>
    <!-- / PAGE HEADER -->

    <!-- NEW EXPENSE FORM -->
    <div class="slds-col slds-col--padded slds-p-top--large">


        <!-- [[ expense form goes here ]] -->


    </div>
    <!-- / NEW EXPENSE FORM -->

</aura:component>

I've tried uninstalling and re-uploading the resource as well as changing the filepath but I can't seem to figure out how to acces this file.
Any help would be really appreciated.
 
Hey there!

Can we use eclipse IDE for lightning development?
When I tried, don't see any technologies related to lightning like component, controllers, renderer etc.

We also use SVN for version tracking and finding hard time in new project which requires lightning framework completely.

Thanks in advance for y.ur response