• Dave The Ghost
  • NEWBIE
  • 85 Points
  • Member since 2015

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 3
    Likes Given
  • 2
    Questions
  • 7
    Replies
Hi Guys,

I'm trying to build a lightning component which will be used on Opportunity lightning UI. The component is placed in the right panel. The component loads pretty well on any Opportunity record view.

The problem here is when I try to update the opportunity record (which comes as popup block) the component in the right panel is not getting refreshed. By this the updated values are not showing up on the lightint component.

Need to find a way to refresh the lightning component on record save.

Any help would be appreciated!! 

Thanks
Shravan 
We've opened a case with salesforce already but wanted to see if anyone else has experienced slowness in their sandboxes since Winter 17 release. Our deploy's were taking 30 minutes with unit tests and now are taking in excess of 2 hours. Using the migration tool to deploy it will often hang for 5 - 10 minutes before. Just wanted to check as it has been a painful week.
I am working with the force:editRecord event to handle the edit of a list of objects in a lightning component. I am able to return and display the list of objects each list item has an edit button that calls a function like what is displayed in this article:
https://developer.salesforce.com/docs/atlas.en-us.200.0.lightning.meta/lightning/ref_force_editRecord.htm (https://developer.salesforce.com/docs/atlas.en-us.200.0.lightning.meta/lightning/ref_force_editRecord.htm" target="_blank)
I've only been able to get this to work in a developer org if I add the component to an object page.

The problem is I need to update the list with the newley updated values but haven't been able to find any reference to handling the save event on the editRecord Modal popup. Any assistance would be great. 

https://developer.salesforce.com/docs/atlas.en-us.198.0.lightning.meta/lightning/ref_force_recordSaveSuccess.htm

Here is basic example of what I am trying to do. Adding the component to the account page I can click the button edit the record and hit save. The Account compact data  in the top of the page updates but what's in the component does not.

Component Code:
<aura:component controller="editRecordSimulationController"
                implements="force:appHostable,
                            flexipage:availableForAllPageTypes,
                            force:hasRecordId">
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:dependency resource="markup://force:editRecord" type="EVENT" />
    <aura:handler name="handleEdit" event="force:editRecord" action="{!c.doInit}" />
    <aura:handler name="handleSaveSuccess" event="force:recordSaveSuccess" action="{!c.doInit}" />
    
    <aura:attribute name="recordId" type="string" />
    <aura:attribute name="accType" type="String" />
    
    
    <ui:inputText label="Record Id" value="{!v.recordId}" required="true"/>
	<ui:button class="btn" label="Submit" press="{!c.setOutput}"/>
    
    <br />
    <br />
    <br />
    Account Type: <ui:outputText value="{!v.accType}" />
</aura:component>

Component Controller Code:
({
    doInit : function(component, event, helper) {
        var recordId = component.get("v.recordId");
        var action = component.get("c.getTypeFromAccount");
        action.setParams({
            	recordId: recordId
        });
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                var accType = response.getReturnValue();
                component.set("v.accType", accType);
            }
        });
        
        $A.enqueueAction(action);
    },
	setOutput : function(component, event, helper) {
        var editRecordEvent = $A.get("e.force:editRecord");
        editRecordEvent.setParams({
             "recordId": component.get("v.recordId")
        });
        editRecordEvent.fire();
	}
})

Apex Controller:
public class editRecordSimulationController {

    @AuraEnabled
    public static string getTypeFromAccount(string recordId)
    {
        Account acc = [select Type from Account Where Id = :recordId limit 1];
        return acc.Type;
    }
}




 
We've opened a case with salesforce already but wanted to see if anyone else has experienced slowness in their sandboxes since Winter 17 release. Our deploy's were taking 30 minutes with unit tests and now are taking in excess of 2 hours. Using the migration tool to deploy it will often hang for 5 - 10 minutes before. Just wanted to check as it has been a painful week.
We've opened a case with salesforce already but wanted to see if anyone else has experienced slowness in their sandboxes since Winter 17 release. Our deploy's were taking 30 minutes with unit tests and now are taking in excess of 2 hours. Using the migration tool to deploy it will often hang for 5 - 10 minutes before. Just wanted to check as it has been a painful week.
I'm trying my hand using Lightning components and I need help as to why the SVG image on the button, which in this case is the down arrow, won't show up unless I hover on it as indicated by the yellow marker in the screenshot.

Missing Down Arrow

The code I have is as follows:
 
<div aura:id="options"
	 class="slds-dropdown-trigger slds-dropdown-trigger--clicked" aria-expanded="true">
	<button class="slds-button slds-button--icon-border-filled" aria-haspopup="true"
			onclick="{!c.toggleShowOptions}">
		<c:svgIcon svgPath="/resource/slds100/assets/icons/utility-sprite/svg/symbols.svg#down" 
				   category="utility" 
				   size="x-small" 
				   name="down" 
				   class="slds-button__icon slds-button__icon--hint" />
		<span class="slds-assistive-text">Show More</span>
	</button>
	<div class="slds-dropdown slds-dropdown--right">
		<ul class="dropdown__list" role="menu">
			<li class="slds-dropdown__item">
				<a href="#void" role="menuitem"
				   data-contactid="{!roCertifiedOperator.Id}"
				   onclick="{!c.deleteROCertifiedOperator}">
					<p class="slds-truncate">Delete</p>
				</a>
			</li>
		</ul>
	</div>
</div>




Please help.




 
Hi Guys,

I'm trying to build a lightning component which will be used on Opportunity lightning UI. The component is placed in the right panel. The component loads pretty well on any Opportunity record view.

The problem here is when I try to update the opportunity record (which comes as popup block) the component in the right panel is not getting refreshed. By this the updated values are not showing up on the lightint component.

Need to find a way to refresh the lightning component on record save.

Any help would be appreciated!! 

Thanks
Shravan 
It seems bizarre that in lightning when you open Accounts, Leads or contacts the default is not to open in the details tab but in another less useful one.  Is there any way of changing this default?  

We moved to Lightnng to help encourage users by making it simpler and more obvious.  This strange default makes it less obvious.
I am working with the force:editRecord event to handle the edit of a list of objects in a lightning component. I am able to return and display the list of objects each list item has an edit button that calls a function like what is displayed in this article:
https://developer.salesforce.com/docs/atlas.en-us.200.0.lightning.meta/lightning/ref_force_editRecord.htm (https://developer.salesforce.com/docs/atlas.en-us.200.0.lightning.meta/lightning/ref_force_editRecord.htm" target="_blank)
I've only been able to get this to work in a developer org if I add the component to an object page.

The problem is I need to update the list with the newley updated values but haven't been able to find any reference to handling the save event on the editRecord Modal popup. Any assistance would be great. 

https://developer.salesforce.com/docs/atlas.en-us.198.0.lightning.meta/lightning/ref_force_recordSaveSuccess.htm

Here is basic example of what I am trying to do. Adding the component to the account page I can click the button edit the record and hit save. The Account compact data  in the top of the page updates but what's in the component does not.

Component Code:
<aura:component controller="editRecordSimulationController"
                implements="force:appHostable,
                            flexipage:availableForAllPageTypes,
                            force:hasRecordId">
    
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:dependency resource="markup://force:editRecord" type="EVENT" />
    <aura:handler name="handleEdit" event="force:editRecord" action="{!c.doInit}" />
    <aura:handler name="handleSaveSuccess" event="force:recordSaveSuccess" action="{!c.doInit}" />
    
    <aura:attribute name="recordId" type="string" />
    <aura:attribute name="accType" type="String" />
    
    
    <ui:inputText label="Record Id" value="{!v.recordId}" required="true"/>
	<ui:button class="btn" label="Submit" press="{!c.setOutput}"/>
    
    <br />
    <br />
    <br />
    Account Type: <ui:outputText value="{!v.accType}" />
</aura:component>

Component Controller Code:
({
    doInit : function(component, event, helper) {
        var recordId = component.get("v.recordId");
        var action = component.get("c.getTypeFromAccount");
        action.setParams({
            	recordId: recordId
        });
        action.setCallback(this, function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                var accType = response.getReturnValue();
                component.set("v.accType", accType);
            }
        });
        
        $A.enqueueAction(action);
    },
	setOutput : function(component, event, helper) {
        var editRecordEvent = $A.get("e.force:editRecord");
        editRecordEvent.setParams({
             "recordId": component.get("v.recordId")
        });
        editRecordEvent.fire();
	}
})

Apex Controller:
public class editRecordSimulationController {

    @AuraEnabled
    public static string getTypeFromAccount(string recordId)
    {
        Account acc = [select Type from Account Where Id = :recordId limit 1];
        return acc.Type;
    }
}




 
Is there a way to order the field list that is displayed on list view filters so that they are sorted alphabetically?
  • April 08, 2016
  • Like
  • 1
Hi Guys,

I'm trying to build a lightning component which will be used on Opportunity lightning UI. The component is placed in the right panel. The component loads pretty well on any Opportunity record view.

The problem here is when I try to update the opportunity record (which comes as popup block) the component in the right panel is not getting refreshed. By this the updated values are not showing up on the lightint component.

Need to find a way to refresh the lightning component on record save.

Any help would be appreciated!! 

Thanks
Shravan 
In spring 16, we have the ability to configure lightning experience nagivation menu. do we have a way to export our configuration as metadata?