Adding Lightning Components Tab To The Existing Sales App

I have created a lightning components tab and wanted to surface it to users by adding to the Sales app but users are not seeing it. However If they go to App Launcher–> Other Items, they see the tab. However If I create a new custom app and add the tab, they see the tab as part of the custom app.

Can’t we add Lightning Components Tab to existing apps like Sales? Should we always a custom app to surface lightning components tabs.

Would appreciate any feedback.

Identify Events created by Lightning for Gmail

I am implementing Lightning Sync for my org (via Gmail), and one concern I have is the number of events that will be added into the system. I am looking into writing a process to clean up past events created through the integration. Is there any way to identify if a particular event is created by Lightning Sync?

Lightning component: highlighting wrong element on hover

I have a progress bar component, split into 5 segments. For some reason, when I hover on a segment, the next segment is highlighted instead of the current segment. You can’t see my cursor, but it’s hovering on the 2nd checkmark:

progbar

component:

    
    

        
            
            
                
            
            
                
            

            
             

        
    

css:

.THIS.slds-is-active .label-complete {
    display: inline;
}

.THIS .label-complete {
display: none;
}

/* Prevent random ellipsis when the screen is zoomed in */
.THIS.slds-is-complete:not(.slds-is-active) .slds-path__title { /*not = everything other than the specified element*/
    text-overflow: clip;
}

Lightning component quick action – send parameters to the lightning component

I have a lightning component that is available for use as lightning component quick action.

I need to use this component from various object actions, for example, I will add a lightning component quick action to account object and to contact object.

Now on the lightning component itself, I want to know if it was invoked from the account object or from the contact object, but I cannot find a way to do that.

I have found a way to get the record Id by adding (see code snippet below)

It is working but not good enough.

What I really need is to send a parameter from the lightning component quick action invocation:
enter image description here

And get it in my component:


    
    

Is this possible?

And if not – any workaround for achieving that?

Lightning Component – data binding not working for Object[] after I call function

I have component which holds Object[] attribute. On init action I am loading data in it and showing that for user interaction. All works well and update on input field gets bonded properly with original attribute.

I then call controller function on button click and performs some validations on each element of Object[] and display some error message. After that if I am updating/correcting the values in input field then that value is not getting bind to original Object[] elements.

Maincomponent.cmp:


Here Object[] is list of wrapper class.

PGP_VariationMilestone.cmp


    

    

MainComponentController.js

saveVariation: function(component, event, helper) {
    var milestoneArray = component.get('v.milestones') ;
    console.log('------in saveVariation milestone-----' + JSON.stringify(component.get('v.milestones')));

    var isValid;
    var milestonenames = '';
    var deliberablenames = '';
    var i, j;
    // deliverables is a list of wrapper class. each milestoneArray element has list of  deliverables[]

    for (i = 0; i < milestoneArray.length; i++) {
        if (!milestoneArray[i].description ||
            !milestoneArray[i].dueDate ||
            (!milestoneArray[i].mpifund && milestoneArray[i].miletype == 'Payment')) {
            isValid = false;
            milestonenames = milestonenames + milestoneArray[i].name + ', ';
        }

        for (j = 0; j < milestoneArray[i].deliverables.length; j++) {
            console.log('------for loop deliverable data----' + JSON.stringify(milestoneArray[i].deliverables[j]));
            if (!milestoneArray[i].deliverables[j].dueDate ||
                !milestoneArray[i].deliverables[j].startDate ||
                !milestoneArray[i].deliverables[j].name ||
                !milestoneArray[i].deliverables[j].description) {
                isValid = false;
                deliberablenames = deliberablenames + milestoneArray[i].deliverables[j].name + ', ';
            }
        }
    }

    console.log('----isValid----' + isValid);

    if (isValid == true) {
        helper.saveVariationHelper(component);
    } else {
        console.log('------in else of isValid error-----');
        $A.createComponents([
                ["ui:message", {
                    "title": "Error",
                    "severity": "error",
                    "closable": false
                }],
                ["ui:outputText", {
                    "value": 'Please correct the errors for Miletones:- ' + milestonenames + 'and Deliverables:- ' + deliberablenames,
                }]
            ],
            function(components, status) {
                if (status === "SUCCESS") {
                    var message = components[0];
                    var outputText = components[1];
                    // set the body of the ui:message to be the ui:outputText
                    message.set("v.body", outputText);
                    var saveconfirmation = component.find("saveconfirmation");
                    // Replace div body with the dynamic component
                    saveconfirmation.set("v.body", message);
                }
            }
        );
    }
}

No error in console. Removing ui:message also didnt worked.

Hope I am clear in explaining the issue. I looked this post also but not sure when fix will be available.

Binding to object values and arrays of objects in Lightning Locker

Does lightning:recordEditForm works for wrapper classes with an sObject?

I have a wrapper class which can hold a custom object record and some variables. However I want to leverage this out of the box lightning:recordEditForm for displaying the wrapper class records (custom object record and the variables) as a table. Is this really possible?

I gave it a test with the below code. However all the fields are displaying as read only fields though I used lightning:inputField.


                    
                    

$A.createComponents() with lightning:buttonMenu and lightning:menuItem

Having some problems dynamically creating a lightning:buttonMenu using $A.createComponents(). Creating the buttonMenu works fine but as soon as I try to add a lightning:menuItem I get the following when I click the menu:

error:

Uncaught Assertion Failed!: Descriptor for Config required for registration : undefined  throws at ...

helper method from component:

createFilterMenu: function(cmp) {
    var options = cmp.get('v.filterOptions')
    var menuOptions = [
        [
            'lightning:buttonMenu', {
                'aura:id': 'filterMenu',
                'iconName': 'utility:filterList',
                'alternativeText': 'Filter Selection',
                'value': cmp.getReference('v.filter'),
                'onselect': cmp.getReference('c.filterChange')
            }
        ],
        [
            'lightning:menuItem',{
                'label': 'test',
                'value': 'test'
            }
        ]
    ]
    $A.createComponents(
        menuOptions,
        function(components, status, errorMessage) {
            if (status === 'SUCCESS') {
                var menuDiv = cmp.find('menu')
                var menu = components[0]
                var item = components[1]
                menu.set('v.body',item)
                menuDiv.set('v.body', menu)
            } else if (status === 'INCOMPLETE') {
                console.log('No response from server or client is offline.')
            } else if (status === 'ERROR') {
                console.log('Error: ' + errorMessage)
            }
        }
    )
}

Dynamically update Lightning path (Chevron)

My Lightning/Salesforce Path was displaying the Chevron based on the Case Pick list field which has 15 pick list options. Every Case is unique and doesn’t require all the 15 options, how can I make my Chevron dynamic with limited options.

i.e Case 1 needs 5 pick list options out of 15 then I need to show only 5 options in 5 the chevron.

Unable to redirect to a VF Page or external page using Lightning component in community Builder

How to use a Visualforce page as a Component Lightning Community page?

Hello ,
I have a button in Lightning component and on click of it I want to redirect to a VF page.
I am able to do that in App view , But when I drag the component into the community builder , it gives 404 error. and it does not work the way it should

Component Code


    

Controller Code
window.open(“MyURL”);

Issue is not with href or window.open , Issue is with community builder not allowing to open external pages .

Any suggestions/solutions

Is Approval Process supported in Salesforce Lightning?

I have created an approval process for Opportunity object. But I couldn’t find the “Submit for Approval” button in Lightning environment when my Opportunity records met the approval process’ entry criteria.

I then switched it to Salesforce Classic environment and I’m able to perform the approval process. Am I missing any setting to enable approval process in Lightning environment?