• Team CodEngine.in
  • SMARTIE
  • 710 Points
  • Member since 2017


  • Chatter
    Feed
  • 22
    Best Answers
  • 0
    Likes Received
  • 3
    Likes Given
  • 1
    Questions
  • 304
    Replies
I have an issue with lightning bottom menu item's that is within a data table whereby the menu items are not visible if the menu item appears as the last record of the data table (see the 2nd image) or if the data table consists of only 1 record (see the last image). Below is the sample code of the data table with the lightning button menu

Sample Code
<div class="slds-table--header-fixed_container" style="height: 100%">
        <div class="slds-card__body slds-card__body_inner slds-scrollable--y" style="height: 100%">
    
            <table class="slds-table slds-table--bordered slds-table--header-fixed">
                <thead>
                <tr class="slds-text-title--caps">
                    <aura:iteration items="{!v.columns}" var="col">
                        <th scope="col">
                            <div onclick="{!c.updateColumnSorting}"
                                 class="slds-truncate slds-cell-fixed"
                                 title="{! col.fieldName}" data-field="{! col.fieldName}">
                                {! col.label }
                                <span>
                                    <aura:if isTrue="{!v.sortedBy == col.fieldName}">
                                            {! v.sortAsc ? '&#8593;' : '&#8595;'}
                                    </aura:if>
                                </span>
                            </div>
                        </th>
                    </aura:iteration>
                    <th scope="col"></th>
                </tr>
                </thead>
                <tbody>
                <aura:iteration items="{!v.data}"
                                var="record" indexVar="indexVar">
                    <tr>
                        <th data-label="Title" class="{! 'popover_'+record.Id +' cell-solution-title-width'}">
                            <div class="slds-truncate cell-solution-title-width" title="{!record.Solution_Title__c}"
                                 data-recordid="{!record.Id}" data-record="{! record}">
                                {!record.Solution_Title__c}
                            </div>
                        </th>
                        <th data-label="Category" class="{! 'popover_'+record.Id +' cell-solution-number-width'}">
                            <div class="slds-truncate cell-solution-number-width" title="{! record.Solution_Sub_Category__c}"
                                 data-recordid="{!record.Id}" data-record="{! record.Solution_Sub_Category__c}">
                                {! record.Solution_Sub_Category__c}
                            </div>
                        </th>
                        <th data-label="Status" class="{! 'popover_'+record.Id}">
                            <div class="slds-truncate" title="{!record.Status__c}"
                                 data-recordid="{!record.Id}" data-record="{! record}">
                                {!record.Status__c}
                            </div>
                        </th>
                        <th data-label="Author" class="{! 'popover_'+record.Id}">
                            <div class="slds-truncate" title="{!record.CreatedBy.Name}"
                                 data-recordid="{!record.Id}" data-record="{! record}">
                                {!record.CreatedBy.Name}
                            </div>
                        </th>
                        <th>
                            <lightning:buttonMenu aura:id="menu" onselect="{! c.handleSelect }"
                                                  alternativeText="Menu" value="{!record.Id}" menuAlignment="right">
                                <lightning:menuItem value="{! 'E,'+record.Id +','+indexVar}" label="Edit"/>
                                <lightning:menuItem value="{! 'A,'+record.Id +','+indexVar}" label="Approve"/>
                            </lightning:buttonMenu>
                        </th>
                    </tr>
                </aura:iteration>
                </tbody>
            </table>
    
        </div>
    </div>

User-added image
User-added imageUser-added image
Hi 
Greetings of the day...

I am designing a Lightning component using Developer console and on adding it to Lightning App Builder, I am not finding any custom tab to add my component to the Lightning page.


User-added image


Plz. help us to add a lightning component in the custom section.
Hi, 

I'm a green Salesforce Admin.

I'm trying to close this Booking (Opportunity) by changing the stage fom 'Closed Won' to 'Closed', but gettign the error: 

Object (id = 0060I00000dElwv) is currently in trigger OpportunityTrigger, therefore it cannot recursively update itself

I can see the Apex Trigger in the Object Manager, but I don't have any experience with development, so I can;t tell why this error is occuring. 

 
Hi Team,

In my project i have the urgent requirement.

At the lookup Field we have an option to create New Record in Lightning View.  
Creating the New Record at Look-Up Field is a Standard Salesforce Out of the box functionality.
1)How can i restrict the user while trying to create the Record at Look-Up in lightning View ?

FYI:

User-added imageThanks in Advance...

Thanks,
Venkat.
I am trying to create a view to show activity information. However the below code is not displaying any information, only header is showing. Please help.
HTML Component :

<template>
    <lightning-card class="slds-text-title_bold"  title = "Activity Information">
        <div class="slds-p-around_medium lgc-bg" style="height: 300px;">
            <lightning-datatable
                    key-field="id"
                    data={data}
                    columns={columns}>
            </lightning-datatable>
        </div>
    </lightning-card>
</template>
 
JS File:

import { LightningElement,api,wire,track} from 'lwc';
import ActivitySearchController from '@salesforce/apex/ActivityLeadPage.ActivitySearchController'

const columns = [
    { label: 'Subject', fieldName: 'Subject' },
    { label: 'Due Date', fieldName: 'ActivityDate' },
    { label: 'Status', fieldName: 'Status' },
];

export default class ActivityLeadPageComponent extends LightningElement {
    @api recordId;
    @track data = [];
    @track columns = columns;
    @wire(ActivitySearchController, { currentID: '$recordID'})
    TaskList;
}
 
Controller :

public class ActivityLeadPage{
    
    @AuraEnabled(cacheable=true)
    public static List<Task> ActivitySearchController(String currentID){
        List<Task> TaskList = new List<Task>();
        Map<Id,Lead> leadMap = new Map<Id,Lead>();
        if(currentID.startsWith('00Q')){
            try{
                List <Lead> leadList = [SELECT id, Email FROM Lead WHERE ID=:currentId];
                String ldEmail       = leadList[0].Email;
                Set<String> emailIds = new Set<string>();
                if(ldEmail!=null){
                    emailIds.add(ldEmail);
                }               
                
                TaskList = getTaskList(emailIds);
                
            }           
            catch(Exception e){
                system.debug('getlinenumber-->'+ e.getMessage() +' line '+ e.getLineNumber());
            } 
        }
        return TaskList;
    }
    
    public static List<Task> getTaskList (Set<String> emailIds) {  
        Map<Id,Lead> leadMap = new Map<Id,Lead>();      
        leadMap = new Map<Id,Lead>([SELECT id, Email FROM Lead Where Email IN:emailIds]);       
        
        Set<Id> leadID = new Set<Id>(); 
        for(Lead lE : leadMap.values()){
            leadID.add(lE.id);            
        }  
        
        List<Task> TaskList = [Select id, Subject, Description, who.Type, What.Type, Priority, Status, ActivityDate,CreatedDate, LastModifiedDate FROM Task 
                               WHERE whoId IN:leadID ORDER BY createddate DESC LIMIT 20];
        
        if(TaskList.size() == 0){
            Apexpages.addMessage(new ApexPages.Message(ApexPages.Severity.INFO,''+'No Tasks to Display'));
        }
        
        return TaskList;
    }   
}
What should i do with this error? Does not let me send quotes by email from the PDF page of the quote...
 
Hi All,

I have created a lightning component to display a public site from which we can get customers sigup.
I have created the Lightning component for this and able to view the page but, I am unable to fire the toast messages in this.
And also my Save button is not getting disabled after clicking on it. 
This is my code. Any help to solve this is appreciated. Thanks in advance.
Lightning component:
<aura:component controller="CreateContactrecordController" 
implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:lightningQuickAction,
            flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,lightning:isUrlAddressable,
            lightning:actionOverride,force:hasRecordId"
             access="global" >
    <!-- Include Static Resource-->
    <ltng:require styles="/resource/bootstrap/css/bootstrap.min.css" 
scripts="/resource/bootstrap/js/jquery.js,/resource/bootstrap/js/bootstrap.min.js"/>
    <!--aura:attribute name="isSpinner" type="boolean" default="false"/-->
    <aura:attribute name="FirstName" type="String" default="" />
    <aura:attribute name="LastName" type="String" default="" />
    <aura:attribute name="Mobile" type="String" default="" />
    <aura:attribute name="Email" type="String" default="" /> 
    <aura:attribute name="Store" type="String" />
    <aura:attribute name="LanguageList" type="List" />
    <aura:attribute name="SelectedLanguage" type="String" />
    <aura:attribute name="isHide" type="Boolean" default="false" />
    
     <aura:handler name="onSaveSuccess" event="force:recordSaveSuccess" action="{!c.handleSaveSuccess}"/>
 <force:recordEdit aura:id="edit" recordId=""/>
 <ui:button label="Save" press="{!c.save}"/>
    
    <div class="slds-page-header">
        <div class="slds-align_absolute-center">
            <div class="slds-text-heading_large">
                <div class="slds-m-top_xx-large">
                    Customer Subscription Form
                </div>
            </div>
        </div>
    </div>
    <br/>
    <aura:handler name="init" action="{!c.doinIt}" value="{!this}"/> 
    <div class="slds-form-element__control">
         <lightning:input label="First Name" name="firstname" type="text" required="true" value="{!v.FirstName}" />
        <br/>
        <lightning:input label="Last Name" name="lastname" type="text" required="true" value="{!v.LastName}" />
        <br/>
        <lightning:input label="Mobile" type="tel" value="{!v.Mobile}"/>
        <br/>
        <lightning:input label="Email" name="email" type="email" required="true" value="{!v.Email}" />
        <br/> 
        <lightning:input label="Store" type="Text" name="Store" value="{!v.Store}" />
        <br/> 
        <lightning:select label="Language" name="Language" value="{!v.SelectedLanguage}">
            <aura:iteration items="{!v.LanguageList}" var="Language">
                <option value="{!Language}" text="{!Language}"></option>
            </aura:iteration>
        </lightning:select>
        <br/>
   <lightning:button variant="brand" disabled="{!v.isHide}" label="{!v.isHide == true ? 'Save' : 'Save'}" onclick="{!c.savecustomerForm}" /> 
    <!--lightning:button variant="brand" disabled="{!v.isSpinner}" label="{!v.isSpinner == true ? 'Saving...' : 'Save'}" onclick="{!c.savecustomerForm}" /--> 

    </div>       
</aura:component>

Controller.js:

({
    doinIt: function(component, event, helper){ 
        var action = component.get('c.getPickListValuesIntoList');          
         // method name i.e. getEntity should be same as defined in apex class         
         // params name i.e. entityType should be same as defined in getEntity method        
        //action.setParams({ "entityType" : component.get('v.componentString') });         
            action.setCallback(this, function(a){             
            var state = a.getState(); // get the response state             
            if(state == 'SUCCESS') {
               component.set('v.LanguageList',a.getReturnValue()); 
            }        
            });         
            $A.enqueueAction(action); 
    },
     savecustomerForm: function(component, event, helper) {
        console.log('Create record');
         var action = component.get("c.save");
        //Setting the Apex Parameter
         action.setParams({"FirstName":component.get("v.FirstName"), "LastName":component.get("v.LastName"),
                           "Email":component.get("v.Email"), "Mobile":component.get("v.Mobile"), 
                           "Store":component.get("v.Store"), "Language":component.get("v.Language")
            });
        //Setting the Callback
        action.setCallback(this,function(a){
            //get the response state
            var state = a.getState();
            var isContactexists = a.getReturnValue();
            //check if result is successfull
           
            if(state == "SUCCESS"){
                //Reset Form
                var newContact = {'sobjectType': 'Contact','FirstName': '','LastName': '','Email': '',
                                  'Mobile': '', 'Store__C': '','Language__c' : ''};
                //resetting the Values in the form
                component.set("v.Contact",newContact);
                if(isContactexists===true){
              //alert('Record Created Successfully');
                    component.find("edit").get("e.recordSave").fireeSuccess : function(cmp, event) {
                     // Display the save status
                     var toastEvent = $A.get("e.force:showToast");
                     toastEvent.setParams({
                     "title": "true!",
                     "message": "My Custom Record Saved Successfully"
 });
 toastEvent.fire();
                    }
                    
                component.set('v.isHide', true);  
                }
                else { 
                   alert('Record already exists'); 
                   
                }
            }
            else if(state == "ERROR"){
            alert('Error in calling server side action');
           
            }
            
        });
                
         $A.enqueueAction(action);}

})

Apex controller:

public class CreateContactrecordController {
@AuraEnabled
     public static List<String> getPickListValuesIntoList()
     {
       List<String> pickListValuesList= new List<String>();
        Schema.DescribeFieldResult fieldResult = Contact.Language__C.getDescribe();
        List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
        for( Schema.PicklistEntry pickListVal : ple){
            pickListValuesList.add(pickListVal.getLabel());
        }    
        return pickListValuesList;
    }
 @AuraEnabled   
    public static Boolean save(String FirstName, String LastName, String Email, String Mobile, String Store, String Language )
    {
        List<Contact> Contact = [SELECT Id, Email From Contact WHERE Email=:Email];
         if(contact.size() > 0){
             return false;
        }else{
            Contact con=new Contact(); 
            con.FirstName = FirstName;
            con.LastName = LastName;
            con.Email = Email;
            con.MobilePhone = Mobile;
            con.Store__c = Store;
            con.Language__c = Language;
            insert con;
            return true;
        }
    }
    }
 
Hi Community!

So I made a flow for closing a feedback case that works as a standard lightning component. However, when I put the flow in as part of a guided action list. The flow runs but doesn't update anything.

I noticed that this iw why the standard version works is because of this check mark where I pass my feedbackcaseID variable as the recordID:

User-added image

What would be the best way to grab the current record ID in my flow so that I can run it through the guided action list?

More than happy to attach screenshots of my current flow if that helps.

Thank you all this would be amazing if I can get this solved!!

 
trigger Prefix_Dr on Lead (before insert,before update) {
    for(lead L:trigger.new){
       L.FirstName='Dr.'+L.FirstName;
        }
}
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
@istest
public class Prefix_Dr_test {
    testmethod static void test(){
        Lead L=New Lead();
        L.FirstName='Dr.Midul';
        L.LastName='ahmed';
        L.Company='sfdc';
        L.Status='Working-contacted'; 
        insert L;
        
        Lead Le=[select Id,firstname,lastname from lead where company='sfdc'];
       System.assertEquals(Le.FirstName.ContainsIgnoreCase('Dr.'),'Dr.');
           
    }


here test class is showing error
Has anyone got simple examples of where they were able to add a 3rd column to a section in Lightning? 
 
What is the difference between Salesforce Lightning and Classic.

Guys I have joined a startup coming which is asking me to learn Salesforce and start working on it. As I have learned Java and have also worked in a small firm for 1 year on Java. Now should I start learning Salesforce or look for other job in Java. Is learning Salesforce worth for long run or should I get expertise in java
Hi all,

I would like to implement component having a background color change feature.
I tried to get some information on how to change CSS using Lightning Component controller, I couldn't get much about it.
Please advise me if you have any idea to solve this.

Thanks for your help in advance.

Component :
<aura:component>
<div>
        <lightning:input type="color" label="Color" name="color" value="" onchange="{!c.colorChanger}" aura:id="color"/>
</div>
</aura:component>
Controller :
({
	colorChanger : function(component, event, helper) {
		var color = component.find("color").get("v.value");
        this.css({"background" : color})
    }
})
*tried this.style.background = color;
 
We have a custom lightning component that takes advantage of an external stylesheet (stored in the static resources).

It is included with 
<ltng:require styles="{! $Resource.STYLESHEETNAMEHERE}"/>

My thinking is that the developer adds a sort of 'onExit' handler to unlink the file, but I can't find any documentation for unloading a static resource, or I could be completely wrong and it just be a caching issue

The issue is that some of the styles in that external resource are being carried over to other components that don't explicitly include the file
How can we tackle this?

A screen recording of the issue
  • Open a default modal (FINE)
  • Open a custom component that includes the CSS file named 'fullModalBypass.css'
  • Re-open the first modal, the modal contains the CSS file that was included in the component of the previous step
This page has an error. You might just need to refresh it. Action failed: c:csvSample$controller$loadContactList [component is not defined] Failing descriptor: {c:csvSample$controller$loadContactList}

can we call a lightning componet using flow Builder????

Pls let me know
Thanks in advance
   Arun
I have a picklist for ethnicity sub category, and I am trying to create an Ethnicity formula field which automatically updates depending on the picklist value. 
An example of the formula:
IF (Ethnicity_Sub_Category__c>= Vietnamese, "Asian", 
IF (Ethnicity_Sub_Category__c>= Asian Other, "Asian"

Error message:
Error: Syntax error. Found 'Asian'

I tried a few other formulas but also received Error: Field Ethnicity_Sub_Category__c is a picklist field. Picklist fields are only supported in certain functions.

Is there a way to do this?

Thanks in advance
  I want to make it enable. Can anyone suggest me how do I do that?
User-added image
There is a requirement where we need to group the business field by rows and group status field by column, In this process, we get a matrix report with business as rows and different status as columns

shown below in the screenshot 
User-added image
this is the exported report from salesforce. 

Now we have a requirement to display pending column after Due column in the above-shown screenshot and the value of the pending column is calculated by the subtraction of Due and delivered columns. how to achieve this?

Appreciate your inputs on this. 

- Naveen K N
I'm new to flows and looking for some help/guidance.

I created a new custom object "Budgets" for our Search Managers to track spend budgets from various mediums (Google, Bing, Facebook, etc..). What I am looking to do is update the status of the old budget when a new one is created given it meets the right criteria.

Ex: 
      Google Budget = $5,000
      Campaign Type = Search
      Budget Status = Active

When a new budget for a Google search campaign is entered into the object for $7,000 and is marked active. I need to flow to find the old budget and update the status to "Expired". 
I am trying to create a lightning component that pulls some contacts from my salesforce. 

Here is the HTML
<template for:each={examiners.data} for:item='examiner'>
    <tr key={examiner.Id}>
        <th>{examiner.Name}</th>
        <th>{examiner.Title}</th> 
        <th>{examiner.Account.Name</th>
    </tr>
</template>

Here is the javascript
 
import { LightningElement, wire } from 'lwc';
import getSiteExaminers from '@salesforce/apex/Dynamic_Pages.getSiteExaminers';

export default class SiteExaminers extends LightningElement {

    @wire(getSiteExaminers) examiners;
}

and the error I am getting is: This page has an error. You might just need to refresh it. afterRender threw an error in 'c:siteExaminers_v2' [Cannot read property 'Name' of undefined] Failing descriptor: {c:siteExaminers}
Hello 
I've completed all the tasks on the Formula Fields page. After completing the challenge I get this message:

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Phone_Number__c]: [Phone_Number__c]

Can anyone help?

Thanks in advance - Tami 

 
hi

when ever i am trying to launch my trailhead playgroun (old or new one)  following error comes
[This site can’t be reached
curious-raccoon-og38f6-dev-ed--c.documentforce.com’s server IP address could not be found.
Try running Windows Network Diagnostics.
DNS_PROBE_FINISHED_NXDOMAIN]
 please help me out i was trying from yesterday.
Thanks
jyotsana


 
  • September 18, 2019
  • Like
  • 0
I know that one-off drilling into each field in a given object will enable me to see the created date of a field, however, I was hoping there would be a simpler way to identify for an object the date the fields associated with the object were created.  When you have 500+ field across a number of objects that would be a time consuming process.  Thanks so much.
Hello, Team.
I have two fields on Task Object. One is procssing notes (Text Area 255) and Another is Comments (Long Text Area)

I want to come up with a process where a user add a processing note, i want to cut the text in the Processing Note field and Append it to the Comment field with a date and time stamp. This field shoud be read only.

Any help would be appreciated!

 
 How to import selected records using lightning component.
Hi All,

I have created a Lightning Component and Created Lightning application using that Component and Calling them in VF Page everything works fine. I just show the message to the Customer once after they submit the application and exit. I tried with Show Toast but it's not working. Please let me know your thoghts.Thanks in advance
I have an issue with lightning bottom menu item's that is within a data table whereby the menu items are not visible if the menu item appears as the last record of the data table (see the 2nd image) or if the data table consists of only 1 record (see the last image). Below is the sample code of the data table with the lightning button menu

Sample Code
<div class="slds-table--header-fixed_container" style="height: 100%">
        <div class="slds-card__body slds-card__body_inner slds-scrollable--y" style="height: 100%">
    
            <table class="slds-table slds-table--bordered slds-table--header-fixed">
                <thead>
                <tr class="slds-text-title--caps">
                    <aura:iteration items="{!v.columns}" var="col">
                        <th scope="col">
                            <div onclick="{!c.updateColumnSorting}"
                                 class="slds-truncate slds-cell-fixed"
                                 title="{! col.fieldName}" data-field="{! col.fieldName}">
                                {! col.label }
                                <span>
                                    <aura:if isTrue="{!v.sortedBy == col.fieldName}">
                                            {! v.sortAsc ? '&#8593;' : '&#8595;'}
                                    </aura:if>
                                </span>
                            </div>
                        </th>
                    </aura:iteration>
                    <th scope="col"></th>
                </tr>
                </thead>
                <tbody>
                <aura:iteration items="{!v.data}"
                                var="record" indexVar="indexVar">
                    <tr>
                        <th data-label="Title" class="{! 'popover_'+record.Id +' cell-solution-title-width'}">
                            <div class="slds-truncate cell-solution-title-width" title="{!record.Solution_Title__c}"
                                 data-recordid="{!record.Id}" data-record="{! record}">
                                {!record.Solution_Title__c}
                            </div>
                        </th>
                        <th data-label="Category" class="{! 'popover_'+record.Id +' cell-solution-number-width'}">
                            <div class="slds-truncate cell-solution-number-width" title="{! record.Solution_Sub_Category__c}"
                                 data-recordid="{!record.Id}" data-record="{! record.Solution_Sub_Category__c}">
                                {! record.Solution_Sub_Category__c}
                            </div>
                        </th>
                        <th data-label="Status" class="{! 'popover_'+record.Id}">
                            <div class="slds-truncate" title="{!record.Status__c}"
                                 data-recordid="{!record.Id}" data-record="{! record}">
                                {!record.Status__c}
                            </div>
                        </th>
                        <th data-label="Author" class="{! 'popover_'+record.Id}">
                            <div class="slds-truncate" title="{!record.CreatedBy.Name}"
                                 data-recordid="{!record.Id}" data-record="{! record}">
                                {!record.CreatedBy.Name}
                            </div>
                        </th>
                        <th>
                            <lightning:buttonMenu aura:id="menu" onselect="{! c.handleSelect }"
                                                  alternativeText="Menu" value="{!record.Id}" menuAlignment="right">
                                <lightning:menuItem value="{! 'E,'+record.Id +','+indexVar}" label="Edit"/>
                                <lightning:menuItem value="{! 'A,'+record.Id +','+indexVar}" label="Approve"/>
                            </lightning:buttonMenu>
                        </th>
                    </tr>
                </aura:iteration>
                </tbody>
            </table>
    
        </div>
    </div>

User-added image
User-added imageUser-added image
Hi 
Greetings of the day...

I am designing a Lightning component using Developer console and on adding it to Lightning App Builder, I am not finding any custom tab to add my component to the Lightning page.


User-added image


Plz. help us to add a lightning component in the custom section.
Hi, 

I'm a green Salesforce Admin.

I'm trying to close this Booking (Opportunity) by changing the stage fom 'Closed Won' to 'Closed', but gettign the error: 

Object (id = 0060I00000dElwv) is currently in trigger OpportunityTrigger, therefore it cannot recursively update itself

I can see the Apex Trigger in the Object Manager, but I don't have any experience with development, so I can;t tell why this error is occuring. 

 
trigger BirthdateTrigger on Account (after insert, after update) {
List<Account> acc= new List<Account>();
    if(trigger.isInsert || trigger.isUpdate)
{
    acc = [select Id,(select Birthdate from Contacts ORDER BY CreatedDate DESC LIMIT 1) from Account where Id IN :trigger.new];
     for(Account a : acc)
     {
         for(Contact c : a.Contacts)
         c.Birthdate = Date.newInstance(2000,06,12);
         System.debug('Birthdate updated');
     }
}
}
Hi All,
We have order of execution in apex like this may i know the order of execution in lightning and which one is executed first like component, js cotroller,helper,server controller....

Regards,
Ugsfdc
  • September 14, 2019
  • Like
  • 0
Hello All,
I am getting this error "aura_prod.js:850 Uncaught (in promise) Error: closeTab() - Could not close tab."
Please help me to reslove this 
Thanks.
Hi Team,

In my project i have the urgent requirement.

At the lookup Field we have an option to create New Record in Lightning View.  
Creating the New Record at Look-Up Field is a Standard Salesforce Out of the box functionality.
1)How can i restrict the user while trying to create the Record at Look-Up in lightning View ?

FYI:

User-added imageThanks in Advance...

Thanks,
Venkat.
I have an odd question.

I have a parent and a child object. The child object has two record types.

I need to move the two record types one layer higher, that means on the parent object.

I need to find out where are the two record types that are on the child object at the moment, where are they being used?

I know I have to manually check all processes, but is there any other way how to find out?
I have an active user that has a customer community license.  That user is able to own contact records, but I can't seem to change ownership of an account to that user.

In the documentation, I found this statement: "Community Users can't own community-enabled accounts".  Is that my issue?  What does it mean for an account to be "community-enabled"?  Is there a work-around?  My goal here is to have a community licensed user that can own accounts that are outdated/inactive.

Thanks,

- Randy Trigg
  • September 17, 2019
  • Like
  • 1
Context

I have a custom Lightning Web Component that allows modification of multiple records inside of modal. Once a record is updated, I reload that same record-id, but the old data shows up instead of the new data. After thorough research, I have concluded that the Lightning Data Service is at fault here. It is caching the data in the built-in ViewState most likely. The only way to get a data refresh is by refreshing the entire web page. I found multiple articles that explain how to turn off Secure and Persistent Browser Caching, but this is an unacceptable solution, as the entire Organization will take a performance hit, to support my little Lightning Web Component. Also salesforce insists that you don't do it production:

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

Question

How do I invalidate or send a ChangeNotify Event to the Lightning Data Service (in the context of Lightning Web Components), so my lightning-record-edit-form shows the updated data, instead of the old data (without refreshing the entire web page of course)?
Just wanted to share a problem we had that I haven't seen elsewhere.

We built a Flow Definition with the Process Builder and Added it to our Managed Package

Then we decided to Deactivate the Flow before uploading the Package as some orgs that we support may not use it.

When we tried to install our Managed Package, it failed, saying that the Flow had been Deleted.

It clearly had NOT been deleted, so we were stumped.  Salesforce Support couldn't help us and escalated the Case.

I began studying the Setup Audit Trail and noticed strange entries that happened at the same time I Activated and Deactivated the Flow:

When my Flow was "Activated",  the system was creating a 'Flow Trigger" and a "Workflow Rule" behind the scenes with the same name as my flow, though adding a long id number at the end.

The PROBLEM is that when I deactivated the Flow, the system didn't just deactivate the "backend" Workflow Rule, but THEN it DELETED both the 'Flow Trigger' and the "backend" Workflow Rule!  I don't understand why it was actually deleted? THIS deleted hidden Trigger and Workflow is what caused the package install to fail.

On a hunch I decided to Activate the Flow and build a new package again.  Sure enough, the package uploaded and installed perfectly.

Salesforce needs to put some documentation around this, or at least have a warning popup when you try to Deactivate a Flow that is already in a package.

How are we supposed to know that deactivation is deleting components that we didn't even know were there in the first place?

Hope this saves someone else some time.