• Extentia IT
  • NEWBIE
  • 25 Points
  • Member since 2016

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi,
Can anyone review the codes quickly and check why the component is not showing on the list of available components on the lightning app builder although it has force:appHostable? Thanks!

COMPONENT
<aura:component controller="NonUserAccountTeamController" 
implements="force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes">

	<aura:attribute name="nonUserAccountTeamMembers" type="Non_User_Account_Team__c[]" />
	<aura:attribute name="employees" type="Employee__c[]" />
	
	<aura:handler name="updateNonUserAccountTeam" event="c:updateNonUserAccountTeamUser"
        action="{!c.handleUpdateNonUserAccountTeam}"/>
			
	<aura:handler name="init" action="{!c.doInit}" value="{!this}" />
    
    <div class="slds">
 
      <div class="slds-page-header">
        <div class="slds-grid">
          <div class="slds-col slds-has-flexi-truncate">
            <p class="slds-text-heading--label">Coverage Team</p>
              <div class="slds-grid">
                <div class="slds-grid slds-type-focus slds-no-space">
                  <h1 class="slds-text-heading--medium slds-truncate" title="Coverage Team">
                  {!'Coverage Team Members ' + '(' + 'Non_User_Account_Team__c[].size' +')'}
                  </h1>
                </div>
                <ui:button aura:id="button" buttonTitle="Manage the employees handling this account" 
                class="button" label="Add Coverage Team Members" press="{!c.clickAdd}"/>
              </div>
           </div>
         </div>
       </div> <!-- End of Header -->
		</div> <!-- End of SLDS -->
    <c:NonUserAccountTeamListItem nonUserAccountTeams="nonUserAccountTeamMembers" employees="employees"/>
    
    <ui:button aura:id="button" buttonTitle="View all the members of this team" 
    class="button" label="View All" press="{!c.clickViewAll}"/>
     

	
</aura:component>

CONTROLLER: 
({
	doInit : function(component, event, helper) {
		// Prepare the action to load account record
		var action = component.get("c.getUsers");
		action.setParams({
			"recordId" : component.get("v.recordId")
		});
		// Configure response handler
		action.setCallback(this, function(response) {
			var state = response.getState();
			if(component.isValid() && state === "SUCCESS") {
				component.set("v.nonUserAccountTeamMembers", response.getReturnValue());
			} else {
				console.log('Problem getting account, response state: ' + state);
			}
		});
		$A.enqueueAction(action);
	},
	
	clickAdd : function (component, event, helper) {
	    var createRecordEvent = $A.get("e.force:createRecord");
	    createRecordEvent.setParams({
	        "entityApiName": "Non_User_Account_Team__c"
	    });
	    createRecordEvent.fire();
	},
	
	clickViewAll : function (component, event, helper) {
	    var relatedListEvent = $A.get("e.force:navigateToRelatedList");
	    relatedListEvent.setParams({
	        "relatedListId": "nonUserAccountTeamMembers",
	        "parentRecordId": component.get("v.recordId")
	    });
	    relatedListEvent.fire();
	},
	
	handleUpdateNonAccountUserTeam: function(component, event, helper) {
		//Update the new expense
		var updatedUser = event.getParam("nonUserAccountTeamMember");
		helper.updateUser(component, updatedUser);
	},
	
})

HELPER:
({
	saveUser: function(component, user, callback) {
	    var action = component.get("c.saveUser");
	    action.setParams({
	        "user": user
	    });
	    if (callback) {
	        action.setCallback(this, callback);
	    }
	    $A.enqueueAction(action);
	},

	
	createUser: function(component, user) {
	    this.saveExpense(component, user, function(response){
	        var state = response.getState();
	        if (component.isValid() && state === "SUCCESS") {
	            var users = component.get("v.nonUserAccountTeamMembers");
	            expenses.push(response.getReturnValue());
	            component.set("v.nonUserAccountTeamMembers", users);
	        }
	    }); 
	},
	
	updateUser: function(component, user) {
	    this.saveExpense(component, user);
	},
	
})

 
Hai All,I  am new to salesforce how to add 3,6,9,12 before text  i need output like that 3 Anand,6 Anand
Hi,
Can anyone review the codes quickly and check why the component is not showing on the list of available components on the lightning app builder although it has force:appHostable? Thanks!

COMPONENT
<aura:component controller="NonUserAccountTeamController" 
implements="force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes">

	<aura:attribute name="nonUserAccountTeamMembers" type="Non_User_Account_Team__c[]" />
	<aura:attribute name="employees" type="Employee__c[]" />
	
	<aura:handler name="updateNonUserAccountTeam" event="c:updateNonUserAccountTeamUser"
        action="{!c.handleUpdateNonUserAccountTeam}"/>
			
	<aura:handler name="init" action="{!c.doInit}" value="{!this}" />
    
    <div class="slds">
 
      <div class="slds-page-header">
        <div class="slds-grid">
          <div class="slds-col slds-has-flexi-truncate">
            <p class="slds-text-heading--label">Coverage Team</p>
              <div class="slds-grid">
                <div class="slds-grid slds-type-focus slds-no-space">
                  <h1 class="slds-text-heading--medium slds-truncate" title="Coverage Team">
                  {!'Coverage Team Members ' + '(' + 'Non_User_Account_Team__c[].size' +')'}
                  </h1>
                </div>
                <ui:button aura:id="button" buttonTitle="Manage the employees handling this account" 
                class="button" label="Add Coverage Team Members" press="{!c.clickAdd}"/>
              </div>
           </div>
         </div>
       </div> <!-- End of Header -->
		</div> <!-- End of SLDS -->
    <c:NonUserAccountTeamListItem nonUserAccountTeams="nonUserAccountTeamMembers" employees="employees"/>
    
    <ui:button aura:id="button" buttonTitle="View all the members of this team" 
    class="button" label="View All" press="{!c.clickViewAll}"/>
     

	
</aura:component>

CONTROLLER: 
({
	doInit : function(component, event, helper) {
		// Prepare the action to load account record
		var action = component.get("c.getUsers");
		action.setParams({
			"recordId" : component.get("v.recordId")
		});
		// Configure response handler
		action.setCallback(this, function(response) {
			var state = response.getState();
			if(component.isValid() && state === "SUCCESS") {
				component.set("v.nonUserAccountTeamMembers", response.getReturnValue());
			} else {
				console.log('Problem getting account, response state: ' + state);
			}
		});
		$A.enqueueAction(action);
	},
	
	clickAdd : function (component, event, helper) {
	    var createRecordEvent = $A.get("e.force:createRecord");
	    createRecordEvent.setParams({
	        "entityApiName": "Non_User_Account_Team__c"
	    });
	    createRecordEvent.fire();
	},
	
	clickViewAll : function (component, event, helper) {
	    var relatedListEvent = $A.get("e.force:navigateToRelatedList");
	    relatedListEvent.setParams({
	        "relatedListId": "nonUserAccountTeamMembers",
	        "parentRecordId": component.get("v.recordId")
	    });
	    relatedListEvent.fire();
	},
	
	handleUpdateNonAccountUserTeam: function(component, event, helper) {
		//Update the new expense
		var updatedUser = event.getParam("nonUserAccountTeamMember");
		helper.updateUser(component, updatedUser);
	},
	
})

HELPER:
({
	saveUser: function(component, user, callback) {
	    var action = component.get("c.saveUser");
	    action.setParams({
	        "user": user
	    });
	    if (callback) {
	        action.setCallback(this, callback);
	    }
	    $A.enqueueAction(action);
	},

	
	createUser: function(component, user) {
	    this.saveExpense(component, user, function(response){
	        var state = response.getState();
	        if (component.isValid() && state === "SUCCESS") {
	            var users = component.get("v.nonUserAccountTeamMembers");
	            expenses.push(response.getReturnValue());
	            component.set("v.nonUserAccountTeamMembers", users);
	        }
	    }); 
	},
	
	updateUser: function(component, user) {
	    this.saveExpense(component, user);
	},
	
})

 
I am new to using Salesforce and need some help please. A few people have left our organisation but their email is still being used to send opportunity emails and also to other void email addresses in the organisation. How do I change the emails coming from the opportunity change in status?
Thanks
I want to open an lightning page when we click on the button on Opportunity layout.

One way is create a VF page and embedded the lightning component in it.Is there any other way we can acheive this