• Dharanee K
  • NEWBIE
  • 5 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I am new to LWC I found Playground (https://developer.salesforce.com/docs/component-library/tools/playground) is useful to develope components quickly but I am not able to use org data from my prod or dev org. I tried link you org which is just showing my org custom components.
I am working on Lightning component and implementing the CSS but its not working. can anyone help me out in sorting out this issue.

In my below component, I want to change the colour and size of Label "Search Campaign by Name", my code is below
<aura:component Controller="CampaignMemberController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
	    <aura:handler name="init" value="{! this }" action="{! c.init }"/>
    
    <aura:attribute name="mydata" type="Object"/>
    <aura:attribute name="mycolumns" type="List"/>
    <aura:attribute name="inputKey" type="String"/>
    <aura:attribute name="sortedBy" type="String"/>
    <aura:attribute name="sortedDirection" type="String"/>
    <aura:attribute name="defaultSortDirection" type="String"/>
  <form class="slds-form--inline">
      <div class="slds-form-element">
    <lightning:input aura:id="searchId" type="search" label="Search Campaign by Name" name="searchName" value="{!v.inputKey}"/>
          </div>
      <div class="slds-form-element">
        <lightning:button label="Search" onclick="{!c.doSearch}"/>
      </div>
    </form>
    <lightning:datatable class="{table-test}"
                         sortedBy="{! v.sortedBy }"
                         sortedDirection="{! v.sortedDirection }"
                         defaultSortDirection="{! v.defaultSortDirection }"
                         onsort="{! c.updateColumnSorting }"
                         data="{! v.mydata }" 
                         columns="{! v.mycolumns }" 
                         keyField="Id"
                         onrowaction="{! c.handleRowAction }"/>
</aura:component>
I also want to change the column header styling too.
({
    init: function (cmp, event, helper) {
        var actions = [{ label: 'Show details', name: 'show_details'}];
        
        cmp.set('v.mycolumns', [
            { type: 'action', typeAttributes: { rowActions: actions } },
            {label:"Campaign Name", fieldName:"Campaign_Name__c",class:"table-test",type:"Formula(Text)"},
            {label:"Last Activity Date", fieldName:"Last_Activity_Date__c",sortable:true, type:"Formula(Date)"},
            {label:"Name",sortable:true, fieldName: 'linkName', type: 'url', 
            typeAttributes: {label: { fieldName: 'LastName' }, target: '_blank'}},
            {label:"Phone", fieldName:"Phone", type:"phone"},
            {label:"Company(Account)", fieldName:"CompanyOrAccount", type:"Text(255)"},
            {label:"Email", fieldName:"Email", type:"Email",sortable:true},
            {label:"Status", fieldName:"Status", type:"Picklist"},
            {label:"Owner", fieldName:"Owner__c", type:"Formula(Text)"}
        ]);
    },
    
    handleRowAction : function(cmp,event,helper){
        var action = event.getParam('action');
        var row = event.getParam('row');
        // navigate to sObject detail page     
        var navEvt = $A.get("e.force:navigateToSObject");
        navEvt.setParams({
            "recordId": row.Id,
            "slideDevName": "detail"
        });
        navEvt.fire();
    },
    
    doSearch : function(cmp,event,helper){
        var src = cmp.get("v.inputKey");
        var action=cmp.get('c.getCampaignMember');
        if (src == '' || src == null) {
            // display error message if input value is blank or null
            alert('Enter search keyword');
        }
        action.setParams({Keys:src});
        action.setCallback(this,$A.getCallback(function(response){
            var state=response.getState();
            if(state==="SUCCESS"){
                var oResponse=response.getReturnValue();
                cmp.set("v.mydata",oResponse);
                                var records =response.getReturnValue();
                records.forEach(function(record){
                    record.linkName = '/'+record.Id;
                    cmp.set("v.mydata",records);
                })
            }else if(state==="ERROR"){
                var errors=response.getError();console.error(errors);
            }
        }
                                              ));
        $A.enqueueAction(action);
    },
        updateColumnSorting: function (cmp, event, helper) {
        var fieldName = event.getParam('fieldName');
        var sortDirection = event.getParam('sortDirection');
        cmp.set("v.sortedBy", fieldName);
        cmp.set("v.sortedDirection", sortDirection);
        helper.sortData(cmp, fieldName, sortDirection);
    }
    
})


 
I had my actual Gmail on Webassessor.com. I am doing Trailhead using Myname@companyname.com(not Actual email just a login name). But I verified Myname@companyname.com account using actual Gmail id(Which  I use on Webassessor).  So, I have question

1. Whatever I will complete on  Myname@companyname.com trailhead then It must show on my webassessor account then What I have to do.
2. Before using Myname@companyname account, I had done many badges using an old Email address which is not exist so can I merge that account on here.

Hi,

Is it possible to make aura:id dynamic? because when I try to get the aura:id in the controller using getLocalID I'm getting 
{!'index' + index}.

<aura:iteration indexVar="index" items="{!v.actions}" var="obj">
     <tr aura:id="{!'index' + index}">                                    
          <td>
              <ui:inputCheckbox aura:id="{!'index' + index}" change="{!c.changeCheckbox}" >
                   {!'index' + index}
               </ui:inputCheckbox>
         </td>
         <td>
              {!obj.Summary__c}
         </td>
         <td>
              {!obj.Due_Date__c}
         </td>
         <td>
              {!obj.User__c}
          </td>
     </tr>                                    
</aura:iteration>
  • October 13, 2015
  • Like
  • 0
I have follewed the steps listed below:
To set predefined field values:
  • Click the name of an action in the Buttons, Links, and Actions list or the Global Actions list.
  • On the action detail page, click New in the Predefined Field Values list.
  • Select the field you want to predefine a value for.
  • Specify the value for the field.
However whne I click NEW

There is no option listed to choose.
Click Save.
 
The challenge is:

You've been given a requirement to keep Contact addresses in sync with the Account they belong to. Use Process Builder to create a new process that updates all child Contact addresses when the address of the Account record is updated. This process:Can have any name.
Must be activated.
Must update Contact mailing address fields (Street, City, State, Post Code, Country) when the parent Account shipping address field values are updated.

I start with Accounts when records is created or edited.
Filter criteria where accounts shipping address (street, city, state, zip code) is changed (used "or" logic).

I am stuck on the next step "add action".  I started with action type "Update Records".
On objects, I can't seem to change Accounts to Contacts.  Why?