• James Kacerguis 5
  • NEWBIE
  • 30 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 3
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 8
    Replies
I'm working on a way to easily search all of our validation rules for specific strings.  Many of the rules contain reference to role name.  We're planning on updating our role names and we'll need to update all these rules.

I have setup VS Code and thought I would be able to easily download all objects, (standard and custom - and i'm more concerned about standard ones), but I can't find a way to do so.  If I use Org Browser and click the Retrieve icon at the Custom Objects level, it only downloads the custom objects.  I can click retrieve next to each standard object, but this is time consuming.  

Does anyone know of the best way to download all objects easily.  Additionally, does anyone know a better way of specifically searching all validation rules other than searching every object file - e.g. narrowing the search to just validation rules?  
I'm new to VS Code and trying to setup my first project following this trailhead - https://trailhead.salesforce.com/content/learn/projects/quickstart-vscode-salesforce/use-vscode-for-salesforce

I stored the project in google drive.  I'm now running into the issue of my pc cpu usage spiking to 100% and the google drive continuously syncing.  If I kill google drive, it seems to work as expected.

So, can I not store projects in a cloud drive like google drive?
Also, how to I quite / delete this project so I can recreate it locally?  I don't see any way to even close a project from explorer view.  

Thanks in advance.
 
We use a contact role as designation for statement delivery.  I need to find all accounts that don't have a contact with a role set to statement delivery.  I can't think of how I would do this with a report. Is there a way I could do this with SOQL? 
I have a decision node in flow builder that I can't get to work correctly.  The condition is, when {!Select_Decision_Maker} (which is a radio button of type text) Does Not Equal null, use this outcome.  However, it's always using this outcome, even when it equals null.  I've tried using null in mutliple variations, e.g. null, "null" . I've also tried using the {!$GlobalConstant.EmptyString}.

Nothing works. Even the debug shows the value as being null, but it doesn't work.  Is this a bug or am I missing something? See screenshots for more info.  Thanks in advance!

User-added image
User-added image
User-added image
I've spent a good part of the day trying to figure out how / why the "Set Component Visibility" works. 

I have a radio buttons components with two choice values:
Select an existing contact
Create new contact

It defaults to Select an existing contact.  The idea is, it default to / displays the Select Existing contact record choice set radio buttons when that value is selected.
Otherwise, it shows several text fields for new contact values if they select create new contact.

 This does not seem to work in several instances and I"m not sure if the component visibility is buggy or I just don't understand how to use it.

For example, the "Select an existing contact" originally had a value of true.  If my component visibility condition is based on the choice equals true, it never works even though the debug shows that value.  If I base it on the radio buttons value being true, it doesn't work either.

To troubleshoot, I changed the "Select an existing contact" value to existing.  

When the component visibility criteria is based on the radio buttons value equals existing, it works and shows / hides the corresponding radio buttons correctly.  

If I change the component visibility based on the choice value equals existing, it does not work.

Based on the documentation, a choice value should be null if it's not selected and should be the specified value when selected so I'm not sure why basing the visibility on the actual choice value doesn't work.  

Also, I don't understand why using "true" as a text value doesn't work in any scenario.

Ideas on the best practices for component visibility and what fields / values to use or not use?

User-added image
I currently have apex class in lightning component that is getting a specific Queue Id to assign as owner of the record the component is launched from.

This is the current  way I'm getting the id, but I'm guessing there is a better way to do this, any ideas?
Group marketingQueue = [SELECT id,Name FROM Group WHERE Type = 'Queue' and DeveloperNAME = 'MarketingProspectLeads'];
         	ID marketingQueueId = marketingQueue.id;
            //l.OwnerId = UserInfo.getUserId();
            system.debug('marketingQueue');
            l.OwnerId = marketingQueueId;

I just need to make sure this can't break so I'm assuming I should add some error checking or be doing this a different way.  Thanks in advance.  
Hello All,
I'm extremely new to lightning components and trying to replace some of our custom javascript buttons with lightning compatible options.  One button takes ownership of a lead.  I found a post that does something similar for cases and tried to modify it for my purpose: https://learnownlightning.blogspot.com/2018/01/change-owner-update-record-using.html

It seems to be doing the record update based on apex code, but it launches a quickaction screen with a cancel button that doens't go away.  I've seen it posted that you can use 
$A.get("e.force:closeQuickAction").fire();
It is not working for me.  I'm not sure if I'm not puting that code in the right place but I'm hoping someone can help me figure out a way to click the quick action button, have the lead change ownership, and that's it.

Here is my code so far:
Component:
<aura:component implements="force:lightningQuickAction,force:hasRecordId" controller="LightningComponent_MoveToMarketing" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>    
</aura:component>
Controller:
({
 doInit : function(component, event, helper) {
        var leadId = component.get("v.recordId");
        var action = component.get("c.changeOwnerMethod");
        action.setParams({
            leadId : leadId
        });
        action.setCallback(this, function(response) {
            if(response.getState() === "SUCCESS") {
                console.log("Lead Owner Changed To Current login User");
             var rec = response.getReturnValue();
             console.log(rec.OwnerId);
            }
        });
        $A.enqueueAction(action);
$A.get("e.force:closeQuickAction").fire();
        $A.get('e.force:refreshView').fire();
 }
})

Apex Class:
public class LightningComponent_MoveToMarketing {

    @AuraEnabled
    public static Lead changeOwnerMethod(Id leadId) {
        if(leadId != null) {
            Lead l = [SELECT OwnerId FROM Lead WHERE Id = :leadId];
         l.OwnerId = UserInfo.getUserId();
//update case Ownerid with loggedin userid.
            update l;
            return l;
        }
        return null;
    }

}

Any ideas?
 
I currently have apex class in lightning component that is getting a specific Queue Id to assign as owner of the record the component is launched from.

This is the current  way I'm getting the id, but I'm guessing there is a better way to do this, any ideas?
Group marketingQueue = [SELECT id,Name FROM Group WHERE Type = 'Queue' and DeveloperNAME = 'MarketingProspectLeads'];
         	ID marketingQueueId = marketingQueue.id;
            //l.OwnerId = UserInfo.getUserId();
            system.debug('marketingQueue');
            l.OwnerId = marketingQueueId;

I just need to make sure this can't break so I'm assuming I should add some error checking or be doing this a different way.  Thanks in advance.  
Hello All,
I'm extremely new to lightning components and trying to replace some of our custom javascript buttons with lightning compatible options.  One button takes ownership of a lead.  I found a post that does something similar for cases and tried to modify it for my purpose: https://learnownlightning.blogspot.com/2018/01/change-owner-update-record-using.html

It seems to be doing the record update based on apex code, but it launches a quickaction screen with a cancel button that doens't go away.  I've seen it posted that you can use 
$A.get("e.force:closeQuickAction").fire();
It is not working for me.  I'm not sure if I'm not puting that code in the right place but I'm hoping someone can help me figure out a way to click the quick action button, have the lead change ownership, and that's it.

Here is my code so far:
Component:
<aura:component implements="force:lightningQuickAction,force:hasRecordId" controller="LightningComponent_MoveToMarketing" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>    
</aura:component>
Controller:
({
 doInit : function(component, event, helper) {
        var leadId = component.get("v.recordId");
        var action = component.get("c.changeOwnerMethod");
        action.setParams({
            leadId : leadId
        });
        action.setCallback(this, function(response) {
            if(response.getState() === "SUCCESS") {
                console.log("Lead Owner Changed To Current login User");
             var rec = response.getReturnValue();
             console.log(rec.OwnerId);
            }
        });
        $A.enqueueAction(action);
$A.get("e.force:closeQuickAction").fire();
        $A.get('e.force:refreshView').fire();
 }
})

Apex Class:
public class LightningComponent_MoveToMarketing {

    @AuraEnabled
    public static Lead changeOwnerMethod(Id leadId) {
        if(leadId != null) {
            Lead l = [SELECT OwnerId FROM Lead WHERE Id = :leadId];
         l.OwnerId = UserInfo.getUserId();
//update case Ownerid with loggedin userid.
            update l;
            return l;
        }
        return null;
    }

}

Any ideas?
 
We use a contact role as designation for statement delivery.  I need to find all accounts that don't have a contact with a role set to statement delivery.  I can't think of how I would do this with a report. Is there a way I could do this with SOQL? 
I have a decision node in flow builder that I can't get to work correctly.  The condition is, when {!Select_Decision_Maker} (which is a radio button of type text) Does Not Equal null, use this outcome.  However, it's always using this outcome, even when it equals null.  I've tried using null in mutliple variations, e.g. null, "null" . I've also tried using the {!$GlobalConstant.EmptyString}.

Nothing works. Even the debug shows the value as being null, but it doesn't work.  Is this a bug or am I missing something? See screenshots for more info.  Thanks in advance!

User-added image
User-added image
User-added image
I currently have apex class in lightning component that is getting a specific Queue Id to assign as owner of the record the component is launched from.

This is the current  way I'm getting the id, but I'm guessing there is a better way to do this, any ideas?
Group marketingQueue = [SELECT id,Name FROM Group WHERE Type = 'Queue' and DeveloperNAME = 'MarketingProspectLeads'];
         	ID marketingQueueId = marketingQueue.id;
            //l.OwnerId = UserInfo.getUserId();
            system.debug('marketingQueue');
            l.OwnerId = marketingQueueId;

I just need to make sure this can't break so I'm assuming I should add some error checking or be doing this a different way.  Thanks in advance.  
Hello All,
I'm extremely new to lightning components and trying to replace some of our custom javascript buttons with lightning compatible options.  One button takes ownership of a lead.  I found a post that does something similar for cases and tried to modify it for my purpose: https://learnownlightning.blogspot.com/2018/01/change-owner-update-record-using.html

It seems to be doing the record update based on apex code, but it launches a quickaction screen with a cancel button that doens't go away.  I've seen it posted that you can use 
$A.get("e.force:closeQuickAction").fire();
It is not working for me.  I'm not sure if I'm not puting that code in the right place but I'm hoping someone can help me figure out a way to click the quick action button, have the lead change ownership, and that's it.

Here is my code so far:
Component:
<aura:component implements="force:lightningQuickAction,force:hasRecordId" controller="LightningComponent_MoveToMarketing" access="global" >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>    
</aura:component>
Controller:
({
 doInit : function(component, event, helper) {
        var leadId = component.get("v.recordId");
        var action = component.get("c.changeOwnerMethod");
        action.setParams({
            leadId : leadId
        });
        action.setCallback(this, function(response) {
            if(response.getState() === "SUCCESS") {
                console.log("Lead Owner Changed To Current login User");
             var rec = response.getReturnValue();
             console.log(rec.OwnerId);
            }
        });
        $A.enqueueAction(action);
$A.get("e.force:closeQuickAction").fire();
        $A.get('e.force:refreshView').fire();
 }
})

Apex Class:
public class LightningComponent_MoveToMarketing {

    @AuraEnabled
    public static Lead changeOwnerMethod(Id leadId) {
        if(leadId != null) {
            Lead l = [SELECT OwnerId FROM Lead WHERE Id = :leadId];
         l.OwnerId = UserInfo.getUserId();
//update case Ownerid with loggedin userid.
            update l;
            return l;
        }
        return null;
    }

}

Any ideas?