Quantcast
Channel: Active questions tagged lightning-experience - Salesforce Stack Exchange
Viewing all 2959 articles
Browse latest View live

Hide/Remove items from lightning app menu

$
0
0

Is there any way to remove following items from Lightning App Menu

  1. CMS Workspaces
  2. Chatter
  3. Discover Companies
  4. Email Templates
  5. Enhanced Letterheads
  6. Home
  7. News
  8. Notes
  9. Tasks

So far I had got links that confirm that

  1. Approval Requests
  2. Calendar
  3. Lightning Bolt Solutions

cannot be hidden, but there is no such documentation for above 9 items.

Any help/pointers are appretiable.


Lightning component is not visible in Salesforce 1 App [on hold]

$
0
0

Created a lightning component but it is not showing up in Salesforce1 App in my mobile enter image description here

How to migrate the create new component from classic home to lightning home page

$
0
0

As part of migration from classic to lightning, need to migrate the create new component from classic home page to lighting home page, seems need to create a picklist button in lighting home page.

Am new to lightning, please help me how to do it?

Lightning File preview is not working - *.csv File

$
0
0

I have tried using the following 2 approaches to preview a file from a Lightning quick action modal window. 1.

<lightning:fileCard fileId="{!f.ContentDocumentId}" description="{!f.ContentDocument.title}"/>

2.

<lightning:navigation aura:id="navLink"/>
    <lightning:button label="Open a single file" onclick="{!c.openSingleFile}"/>
*.js:
    openSingleFile: function(component, event, helper) {
    var navLink = component.find("navLink");
    var pageRef = {
        type: 'standard__namedPage',
        attributes: {
            pageName: 'filePreview',
        },
        state : {
            recordIds: '069XXXXXXXXX',
            selectedRecordId: '069XXXXXXXXX'
        }
    };
    navLink.navigate(pageRef, true);

Always shows up the message that "Preview is not available". Are these not supported on Lightning quick action component as documentation does not say anything?

Submit Record Edit Form for every object in Aura iteration

$
0
0

I have a Contact object form with a child form component for Buying Center objects. When I upsert the Contact, I need to submit a list of Buying Centers for this Contact.

Parent Contact component has a child component with ID attribute:

<c:buyingCenter masterRecordId="{!v.contact}" aura:id="buyingCentersComponent"/>

Parent controller calls aura:methods from child component upon onclick on a Save button:

 upsertContact: function (component, event, helper) {
        try {
            component.find("buyingCentersComponent").initialSaveBuyingCentersAndCheckRequiredFields();
            component.find("buyingCentersComponent").saveBuyingCentersFromParent();
            helper.upsertContact(component, contact);
        } catch (e) {
            console.log('There was an error: ' + e);
        }
    }

In child Buying Center component I have recordEditForm inside an aura:iteration:

<aura:attribute name="buyingCenters" type="Buying_Center_Assignment__c[]" default="[]"/>

<aura:method name="initialSaveBuyingCentersAndCheckRequiredFields" action="{!c.initialSaveBuyingCentersAndCheckRequiredFields}" access="PUBLIC">
    <aura:attribute name="foundError" default="false" type="Boolean"/>
</aura:method>

<aura:method name="saveBuyingCentersFromParent" action="{!c.saveBuyingCentersFromParent}" access="PUBLIC"/>

<aura:iteration items="{!v.buyingCenters}" var="buyingCenter">
        <lightning:layout>
            <lightning:layoutItem size="12">
              <lightning:recordEditForm
                      aura:id="buyingCenterEditForm"
                      recordId="{!buyingCenter.Id}"
                      objectApiName="Buying_Center_Assignment__c">

                  <lightning:layout>
                      <lightning:layoutItem size="5">
                                  <lightning:inputField fieldName="Purchase_Unit__c"/>
                      </lightning:layoutItem>
                      <lightning:layoutItem size="5">
                                  <lightning:inputField fieldName="Role__c"/>
                      </lightning:layoutItem>
                  </lightning:layout>

              </lightning:recordEditForm>
            </lightning:layoutItem>
        </lightning:layout>
</aura:iteration>

Now this child component has a method to add Buying Center objects to view. After adding the object the user can select values using recordEditForm:

addBuyingCenter: function (component, event, helper) {
       var buyingCenters = component.get("v.buyingCenters");
       if (buyingCenters == null) {
           buyingCenters = [];
       }
       var buyingCenter = {};
       buyingCenters.push(buyingCenter);
       component.set("v.buyingCenters", buyingCenters);
   }

When user finally clicks Save the list of Buying Centers is supposed to submit before the whole Contact form is also submitted:

initialSaveBuyingCentersAndCheckRequiredFields: function (component, event, helper) {
        var foundCmp = component.find('buyingCenterEditForm');
        console.log('Component to submit: ' + foundCmp);
        for (var i = 0; i < foundCmp.length; i++) {
            foundCmp[i].submit(); 
        }

        //After submitting I try to get the records again to check if submit was successful
       var masterRecordId = component.get("v.masterRecordId");
       helper.loadBuyingCenters(component, event, helper, masterRecordId);

       //This should be assigned by the helper but it's empty
       var buyingCenters = component.get("v.buyingCenters");
       console.log('Buying centers after submit: ' + JSON.stringify(buyingCenters));

        //additional logic to validate required fields      
}

The problem is that the Buying Centersare not submitting. The logs currently show:

Component to submit: SecureComponentRef: markup://lightning:recordEditForm {427:0} {buyingCenterEditForm}{ key: {"namespace":"c"} } buyingCenter.js:100:17
Buying centers after submit: [{}]

The object is correctly added to the view, I can select fields in the Record Edit Form but they are not saving. Is there anything wrong with my logic?

How to quickly switch between Classic and Lightning experience?

$
0
0

As not all of my users have adopted lightning UI, as admin, I need to switch back and forth from the two UI's in order to understand, and help solve issues.

What is the fastest/easiest way to do it?

e.g.:

  • User X notifies me he does not see a field on the Lightning UI
  • At the same time I assist someone else on classic UI
  • I want to see what user X talks about, without login as him or web-conf him.

Some quick sneak peak, and back to classic (or vice versa)

How to handle redirection with force:createRecord

$
0
0

I am working with Lightning Experience. I have used force:createRecord for creating new record, and everything work fine unless the redirection after Save button clicked. (it's redirected to the record page while I hope I could make it stay and only refresh current page).

Could you guy please tell me how to refresh current page after click Save button?

P/s: Save button is a button of a page (look like dialog) when force:createRecord event called

SLDS grid ugly rendering with lightning:outputField

$
0
0

I am trying to display a record using lightning:recordviewform and using slds grid inside it to format columns.

It looks like below when I am using slds-size_3_of_12 When Using slds grid

As you can see, there is still plenty of space left, and it doesn't auto-adjust. Also, it doesn't display label on top and field value below it, as I wanted.

But When I drag and make browser's window smaller, it looks perfect.

Like below,

enter image description here

Any Idea, why CSS overflows like this in fullsize browser window, and make standard component pretty much useless if I have many fields?

Any help will be highly appreciated.

Below is the relevant part of aura markup.

<lightning:layout multipleRows="true">
    <aura:iteration items="{! v.campaignLineItemsWrp }" var="lineItemWrp" indexVar="index">
        <lightning:layoutItem padding="around-small" size="12">
            <div id="tile" class="slds-box">
                <lightning:tile label="{!lineItemWrp.campaignLineItem.Name}">
                    <lightning:recordViewForm recordId="{!lineItemWrp.campaignLineItem.Name.Id}" objectApiName="Obj__c">
                        <div class="slds-grid slds-wrap slds-gutters slds-grid_align-space">
                            <div class="slds-col form-group slds-float_left slds-size_4-of-12">
                                <span>
                                    <lightning:outputField class="slds-form-element_stacked" fieldName="Name" />
                                </span>
                            </div>
                        </div>
                    </lightning:recordViewForm>
                </lightning:tile>
            </div>
        </lightning:layoutItem>
    </aura:iteration>
</lightning:layout>

How to add the hover to the Kanban view when you move the mouse over one record?

$
0
0

We can config the hover in detail page in the compact layout/ mini layout. However, for the kanban view, I think we will need to build the all Kanban in Lightning Component. Please correct me if you have any idea.enter image description here

How does Potential Duplicate Component and Duplicate Record Sets work?

$
0
0

I am planning to create a list view with a column of 'View Duplicates' link or button. Similar to below image from Account record page.

enter image description here

Is it possible to do so with Standard list view or I'll need to develop a Lightning Component? As per my knowledge List views don't support this, but anything that reduces custom developement is welcome.

For custom developement I've looked into the above Potential Duplicate Component which is standard lightning component and Duplicate Record Sets which stores Duplicate Record Items based on Duplicate rule.

But there seems to be no particular relation between these two. Below is a scenario-

I have a Duplicate Record Set with two Items.

enter image description here

But when I navigate to each Account from the list, View Duplicates is not available.

enter image description hereenter image description here

Moreover there are other Duplicate Record Sets with over 30+ records and most of their items don't have 'View Duplicates' option, and for those which do have only show 5 to 6 duplicates and not all within the Duplicate Record Sets.

  • Could someone please explain as how Potential Duplicate Component and Duplicate Record Sets work?
  • What happens to existing Duplicate Record Sets when a Duplicate Rule is changed?
  • Can we create a link or button which would pop up the same window when 'View Duplicates' on record page is clicked?

Please let me know if I've missed out on any details.

Create a Note in Lightning Experience

$
0
0

I enabled the Note tool in my Org and I added the relative related lists in Objects Layout. The problem is when I switch in Lightning Experience I can't take the note but only attach file. How Can I take Note in Lightning Experience?

Below an image on Lead Object of Note Related List: enter image description here

date format displays different in recordeditform

$
0
0

I am creating a form for contact object update. I am using recordeditform to display the field values.

in that i am using the below field

<lightning:inputField fieldName="Birthdate" />

when i select any date for the above field, it is displaying as

Nov 27, 2019

But when we create a new contact which is standard one Birthdate is displayed as 11/21/2019

How can i change the date format for lightning:inputField which is inside

lightning:recordEditForm 

Open a record in sub tab within console app using Flow

$
0
0

I have lightning flow in which I have link which contains record url. When click on record url it is opening to the new tab. But I want open it in sub tab of console application.

I need Parent case email fetch to the sub case using lightning component.. What can i do??????? Please help me

$
0
0

I need Parent case email fetch to the sub case using lightning component.. What can i do??????? Please help me

Component

<aura:attribute name="property" type="Case"/>
<aura:attribute name="indexlst" type="List" />

 <aura:handler name="init" action="{!c.doinit}" value="{!this}" />
<lightning:notificationsLibrary aura:id="notifService"/>
<lightning:navigation aura:id="navService"/>
<lightning:workspaceAPI aura:id="workspace"/>


       <lightning:recordViewForm aura:id="viewForm" recordId="{!v.recordId}" objectApiName="Case">
    <div class="slds-media__body">
        <lightning:layout class="slds-hint-parent">
            <a onclick="{!c.navToRecord}">
                <h3 class="slds-text-heading_small slds-m-bottom_xx-small">{!v.property.ParentId}</h3>
            </a>
            <lightning:buttonIcon iconName="utility:edit" class="slds-col_bump-left" iconClass="slds-button__icon_hint" variant="bare" alternativeText="Edit Record" onclick="{!c.editRecord}"/>
        </lightning:layout>
        <lightning:layout multipleRows="true">
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="ParentId"/>
            </lightning:layoutItem>                   
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Case_Close_Reason__c"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Description"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Status"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Subject"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="RFI_Status__c"/>
            </lightning:layoutItem>
        </lightning:layout>
    </div>
</lightning:recordViewForm>
<lightning:recordEditForm aura:id="editForm" recordId="{!v.recordId}" objectApiName="Case" class="slds-hide">
    <div class="slds-media">
        <div class="slds-media__body">
            <lightning:layout>
                <a onclick="{!c.navToRecord}">
                    <h3 class="slds-text-heading_small slds-m-bottom_xx-small">{!v.property.ParentId}</h3>
                </a>
            </lightning:layout>
            <lightning:layout multipleRows="true">
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="ParentId"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Case_Close_Reason__c"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Description"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Status"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Subject"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="RFI_Status__c"/>
                </lightning:layoutItem>
            </lightning:layout>

    </div>
    </div>
        </lightning:recordEditForm>

    <!--  <lightning:layoutItem padding="around-small" size="4">
                <lightning:input type="radio" name="select" value="copyNone" label="No email copy" onchange="{!c.handleRadioClick}" checked="true"/>
        </lightning:layoutItem>
        <lightning:layoutItem padding="around-small" size="4">
                <lightning:input type="radio" name="select" value="copyLast" label="Copy last incoming email" onchange="{!c.handleRadioClick}" />
        </lightning:layoutItem>
        <lightning:layoutItem padding="around-small" size="4">
                <lightning:input type="radio" name="select" value="copyAll" label="Copy all related emails" onchange="{!c.handleRadioClick}" />
        </lightning:layoutItem> -->

           <lightning:layout horizontalAlign="center" class="slds-m-top_large">
                <lightning:button variant="neutral" label="Cancel" title="Cancel" type="text" onclick="{!c.handleCancel}"/>
                <lightning:button variant="brand" label="Submit" title="Submit" type="save" onclick="{!c.handleSuccess}"/>
            </lightning:layout>

Controller

({

editRecord : function(component, event, helper) {
    helper.showHide(component);
},
     doinit : function(component, event, helper) {
    // Helper function - fetchContacts called for interaction with server
            helper.fetchList(component, event, helper);

    },
 handleSuccess : function(component, event, helper) {
    var toastEvent = $A.get("e.force:showToast");
    toastEvent.setParams({"name": "Success!","message": "SubCase has been created, Successfully.","type": "success"});toastEvent.fire();
    helper.showHide(component);
},
handleCancel : function(component, event, helper) {
    helper.showHide(component);
    event.preventDefault();
},
    saveSubCase: function(cmp, event, helper) {
    event.preventDefault(); // stop form submission

    helper.showSpinner(cmp);

    var eventFields = event.getParam("fields");
    eventFields["RecordTypeId"] = cmp.find('RecordType').get('v.value');

    // Validation rules
    if(eventFields.Type === '' || eventFields.Topics__c === ''){
        helper.hideSpinner(cmp);
    }else{
        var actionCreate = cmp.get("c.createSubCase");

        actionCreate.setParams({
            subCaseFields: eventFields,
            selectedOption: cmp.get("v.selectedOption"),
            currentCaseId : cmp.get('v.recordId')
        });

        actionCreate.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var workspaceAPI = cmp.find("workspace");
                var subCase = response.getReturnValue();
                workspaceAPI.getFocusedTabInfo().then(function(resp) {
                    var focusedTabId = resp.tabId;
                    var subtabObj = {
                        parentTabId : resp.tabId,
                        recordId : "",
                        focus : true
                    };
                    subtabObj.recordId = subCase.Id;
                    workspaceAPI.openSubtab(subtabObj).then(function(response) {
                    });
                    helper.hideSpinner(cmp);
                });

            } else if (state === "ERROR") {
                helper.hideSpinner(cmp);
                var errors = response.getError();
                helper.showToast(cmp, 'error' , 'Error!', errors[0].message );
            }
        });
        $A.enqueueAction(actionCreate);
    }

},
 onError: function(cmp, event, helper) {
    console.log(JSON.stringify(event.getParam("response")));
},

handleRadioClick : function(cmp, evt){
    cmp.set('v.selectedOption', evt.getSource().get('v.value'));
},

handleSelectChange: function(cmp, evt){
    var recordEditForm = cmp.find('SubCaseForm');
    recordEditForm.set('v.recordTypeId',cmp.find('RecordType').get('v.value'));
}

})

Lightning for javascript buttons

$
0
0

I have one custom button with Javascript code in Salesforce classic. In Lightning experience, i can not see this button as lightning doesnt support buttons with js code. What i need to do to convert this button to work in lightning? Code on button is-

{!REQUIRESCRIPT("/soap/ajax/9.0/connection.js")}

var count = '{!Contract.Count__c}';
if(count > 300)
window.parent.location.href = "/apex/page1?id={!Contract.Id}";

else
window.parent.location.href = "/apex/page2?id={!Contract.Id}";

I need parent case email fetch to the sub case using lightning component. What can I do? [on hold]

$
0
0

I need Parent case email fetch to the sub case using lightning component.. What can i do??????? Please help me

Component

<aura:attribute name="property" type="Case"/>
<aura:attribute name="indexlst" type="List" />

 <aura:handler name="init" action="{!c.doinit}" value="{!this}" />
<lightning:notificationsLibrary aura:id="notifService"/>
<lightning:navigation aura:id="navService"/>
<lightning:workspaceAPI aura:id="workspace"/>


       <lightning:recordViewForm aura:id="viewForm" recordId="{!v.recordId}" objectApiName="Case">
    <div class="slds-media__body">
        <lightning:layout class="slds-hint-parent">
            <a onclick="{!c.navToRecord}">
                <h3 class="slds-text-heading_small slds-m-bottom_xx-small">{!v.property.ParentId}</h3>
            </a>
            <lightning:buttonIcon iconName="utility:edit" class="slds-col_bump-left" iconClass="slds-button__icon_hint" variant="bare" alternativeText="Edit Record" onclick="{!c.editRecord}"/>
        </lightning:layout>
        <lightning:layout multipleRows="true">
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="ParentId"/>
            </lightning:layoutItem>                   
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Case_Close_Reason__c"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Description"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Status"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="Subject"/>
            </lightning:layoutItem>
            <lightning:layoutItem size="6">
                <lightning:outputField fieldName="RFI_Status__c"/>
            </lightning:layoutItem>
        </lightning:layout>
    </div>
</lightning:recordViewForm>
<lightning:recordEditForm aura:id="editForm" recordId="{!v.recordId}" objectApiName="Case" class="slds-hide">
    <div class="slds-media">
        <div class="slds-media__body">
            <lightning:layout>
                <a onclick="{!c.navToRecord}">
                    <h3 class="slds-text-heading_small slds-m-bottom_xx-small">{!v.property.ParentId}</h3>
                </a>
            </lightning:layout>
            <lightning:layout multipleRows="true">
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="ParentId"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Case_Close_Reason__c"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Description"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Status"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="Subject"/>
                </lightning:layoutItem>
                <lightning:layoutItem size="6">
                    <lightning:inputField fieldName="RFI_Status__c"/>
                </lightning:layoutItem>
            </lightning:layout>

    </div>
    </div>
        </lightning:recordEditForm>

    <!--  <lightning:layoutItem padding="around-small" size="4">
                <lightning:input type="radio" name="select" value="copyNone" label="No email copy" onchange="{!c.handleRadioClick}" checked="true"/>
        </lightning:layoutItem>
        <lightning:layoutItem padding="around-small" size="4">
                <lightning:input type="radio" name="select" value="copyLast" label="Copy last incoming email" onchange="{!c.handleRadioClick}" />
        </lightning:layoutItem>
        <lightning:layoutItem padding="around-small" size="4">
                <lightning:input type="radio" name="select" value="copyAll" label="Copy all related emails" onchange="{!c.handleRadioClick}" />
        </lightning:layoutItem> -->

           <lightning:layout horizontalAlign="center" class="slds-m-top_large">
                <lightning:button variant="neutral" label="Cancel" title="Cancel" type="text" onclick="{!c.handleCancel}"/>
                <lightning:button variant="brand" label="Submit" title="Submit" type="save" onclick="{!c.handleSuccess}"/>
            </lightning:layout>

Controller

({

editRecord : function(component, event, helper) {
    helper.showHide(component);
},
     doinit : function(component, event, helper) {
    // Helper function - fetchContacts called for interaction with server
            helper.fetchList(component, event, helper);

    },
 handleSuccess : function(component, event, helper) {
    var toastEvent = $A.get("e.force:showToast");
    toastEvent.setParams({"name": "Success!","message": "SubCase has been created, Successfully.","type": "success"});toastEvent.fire();
    helper.showHide(component);
},
handleCancel : function(component, event, helper) {
    helper.showHide(component);
    event.preventDefault();
},
    saveSubCase: function(cmp, event, helper) {
    event.preventDefault(); // stop form submission

    helper.showSpinner(cmp);

    var eventFields = event.getParam("fields");
    eventFields["RecordTypeId"] = cmp.find('RecordType').get('v.value');

    // Validation rules
    if(eventFields.Type === '' || eventFields.Topics__c === ''){
        helper.hideSpinner(cmp);
    }else{
        var actionCreate = cmp.get("c.createSubCase");

        actionCreate.setParams({
            subCaseFields: eventFields,
            selectedOption: cmp.get("v.selectedOption"),
            currentCaseId : cmp.get('v.recordId')
        });

        actionCreate.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var workspaceAPI = cmp.find("workspace");
                var subCase = response.getReturnValue();
                workspaceAPI.getFocusedTabInfo().then(function(resp) {
                    var focusedTabId = resp.tabId;
                    var subtabObj = {
                        parentTabId : resp.tabId,
                        recordId : "",
                        focus : true
                    };
                    subtabObj.recordId = subCase.Id;
                    workspaceAPI.openSubtab(subtabObj).then(function(response) {
                    });
                    helper.hideSpinner(cmp);
                });

            } else if (state === "ERROR") {
                helper.hideSpinner(cmp);
                var errors = response.getError();
                helper.showToast(cmp, 'error' , 'Error!', errors[0].message );
            }
        });
        $A.enqueueAction(actionCreate);
    }

},
 onError: function(cmp, event, helper) {
    console.log(JSON.stringify(event.getParam("response")));
},

handleRadioClick : function(cmp, evt){
    cmp.set('v.selectedOption', evt.getSource().get('v.value'));
},

handleSelectChange: function(cmp, evt){
    var recordEditForm = cmp.find('SubCaseForm');
    recordEditForm.set('v.recordTypeId',cmp.find('RecordType').get('v.value'));
}

})

How to show error on child component field or lookup field in lightning salesforce

$
0
0

below is my lookup field

and below is my controller and component

<div class="slds-form-element slds-size--1-of-3">
    <c:LookupSObject aura:id="processField" label="Process" 
         pluralLabel="Processes" sObjectAPIName="BusinessProcess__c" instanceId="tnxBp"                          
         iconName="utility:process"
         listIconClass="slds-icon-standard-account"
         selectedId="{!v.bizev.BusinessProcess__c}"
         selectedName="{!v.bizev.PName}"
         />
 </div>



 createTnx: function(component){
        var effnamefld = component.find("nameField");

         effnamefld.set("v.errors", null);

        component.set("v.showSaveButton", false);

        var name = effnamefld.get("v.value");
        var haserrors = false;

        if(!name){            
            effnamefld.set("v.errors", [{message:"Provide Name First!"}]);
            haserrors = true;
        }

I am using same to show error on lookup field but not success pls help

navigateToURL not passing the isdtp url parameters from my component

$
0
0

Below is the simple code

({
    gotoURL : function (component) {
        var urlEvent = $A.get("e.force:navigateToURL");
        var urlparam = "isdtp=mn";
        urlEvent.setParams({
          "url": "https://ownsandbox.my.salesforce.com/_ui/chatter/service/ChatterAnswersUi"+'?'+urlparam
        });
        alert(urlEvent);
        urlEvent.fire();
    }
})

I am trying to load the chatter answers with isdtp paramters to hide the headers but the url which gets loaded in the browser is without the isdtp param:

https://ownsandbox.my.salesforce.com/_ui/chatter/service/ChatterAnswersUi

If I use other param (not isdtp) like below, it does load the page with the params in the url:

({
    gotoURL : function (component) {
        var urlEvent = $A.get("e.force:navigateToURL");
        var urlparam = "isdtp1=mn";
        urlEvent.setParams({
          "url": "https://ownsandbox.my.salesforce.com/_ui/chatter/service/ChatterAnswersUi"+'?'+urlparam
        });
        alert(urlEvent);
        urlEvent.fire();
    }
})

https://ownsandbox.my.salesforce.com/_ui/chatter/service/ChatterAnswersUi?isdtp1=mn

Is this is some security issue or we can have some workaround.

Thanks !

How to solve my Integrated Aura Components and Community and JS Client

$
0
0

Welcome everyone in Ohana,

Aura components bring a lot of data replication since the Lightning Out in summer 2019!

I am well placed to know that production costs can quickly become a nightmare.

I use a git repository for my project which can be consulted at the following address:https://github.com/Nashle/lightningout/ You can consult the pages and configs on:https://nashle.github.io/lightningout/

Faut-il que j'ajoute mon composant à la community ou faut-il que je paramétre une Application connectée ? Faut-il forcément passer par des LWC ?

Thank you for any voluntary contribution!

unable to search for lookup objects using lightning:recordEditForm

$
0
0

I am unable to search for lookup objects using lightning:recordEditForm:

<lightning:recordEditForm objectApiName="Contact">
    <lightning:inputField fieldName="Name" />
    <lightning:inputField fieldName="Phone"/>
    <lightning:inputField fieldName="Email" />
   <lightning:inputField fieldName="AccountId" />
</lightning:recordEditForm>

As you can see in the attached image that spinner is continuously loading and I'm unable to search for existing account.

enter image description here

My component is embedded in visualforce page, so that I can use this in lightning and classic both. But unable to fetch lookup records. Is there any workaround for this.

Viewing all 2959 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>