• Jugbeer Bhola
  • NEWBIE
  • 105 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 20
    Replies
In a Lightning Aura Component an attribute can be defined in the .cmp as an object from the Apex component class.

Example: <aura:attribute name="productObject" type="ProducController.ProductWrapper[]"/>

How can that same thing be accomplished in a Lightning Web Component?
Hello, I was wondering if there was a solution to this?  

level1Disabled
level2Disabled
level3Disabled
level4Disabled

If I had variables in aura I could set the value like this........

component.set("v.level" + number + "Disabled", true);

How can I do the same think in a Lightning Web Component?  The values are @track (ed).....

@track level1Disabled;
@track level2Disabled;
@track level3Disabled;
@track level4Disabled;

this.level1Disabled = true;

I want to do something like........

this."level" + number + "Disabled" = true
On the Developer Console in Salesforce

All the tabs are closed before pressing the X in the right hand corner of the browser. 

When The Developer Console is opened again all the tabs that were previously closed are open again.

How do you make it stick?  So the tabs are not present when the Developer Console is open again?

I have use the 'Close All' from the Toolbar menu and I have right clicked on the browser bar and clicked 'Close.'  Always the same result.  The tabs that were closed remain open again when re-opening the Developer Console.  


Is this not possible? 
Currently the customer wants to use standard pages.  When saving the page, they would like a ‘call out’ to a service to happen. They do not want to press any extra buttons or quick actions.  This should all happen when the standard ‘Save’ button is pressed on a standard ‘Page.’

I was hoping Flow was the answer.  Is it necessary to tie the Flow directly to a button or quick action?  
The Flow obviously is tied to the event of record saving.  It blew up because of a null record ID.  So the Flow knows about the record being saved.  The Flow just does not see the specific record ID.

I have created a variable in the Flow that queries the incoming record ID and assigns it.  The @InvocableMethod annotation method is then called in APEX.  That is where it blows up because the variable is null. 

Is the only answer to create a trigger?  I do not want this to happen when every an sObject type is updated.  Only when actual ‘User Interface’ is happening.

Could someone please advise? Thanks.
 
I am in the lightning environment using a standard page layout.  I have created a ‘Detail Page Button’ tied to a content source of ‘Visualforce Page.’  The Visualforce page executes from the custom button to call a web service.  What I would like to happen is an alert informing the user the web service call out is complete.    I would like a JavaScript message of  ‘Success’ or ‘Failure.’   There cannot be an ‘apex:command button’ or anything that will make the ‘Visualforce Page’ display.  

If it cannot be JavaScript message any type of message will be OK.
The apex:pagemessage will not work because the ‘Visualforce Page’ is never, and should never, displayed.  The only reason it exists is to call Apex.  

Many different attempts at firing JavaScript from the controller have failed. I am guessing it is locker service blocking the functionality.
Has anyone found a solution for this?  This seems like it would be pretty common to do this. 

The user wants to use standard pages.

I have added my current page and controller. 
 
<apex:page standardController="Account" extensions="AccountExtController" action="{!executeCall}">     
</apex:page>
 
public class AccountExtController {
    
    private ApexPages.StandardController standardController;	
    private Id acctID; 
    public AccountExtController(ApexPages.StandardController standardController)
    {
        acctID = standardController.getId();
    }
    
    public PageReference executeCall()
    {     
        String responseMessage = accountCallOutHelper.executeRequest('POST', 'getsomestuff', acctID);       
        //W A N T  T O  F I R E  A  M E S S A G E  H E R E!
        return new pagereference(url.getsalesforcebaseurl().toexternalform()+'/'+ acctID);
    }   
}

 
Selected
NOT
There a in-house created application where the default tab was 'Home.' The user did not like the word 'Home'  They wanted the word 'Welcome' on the tab.  It was not possible to just rename the tab.  A 'Lightning Page Tab' was created.  The tab was assigned to a App page replacing the 'Home' tab.  

The tab was given permissions to the permission sets and profiles.  The presentation of the tab was good in the sandbox.  When deployed, it had both the 'Welcome' tab and the 'Home' tab.  

The environment was checked and the only navigation items selected in the application was the new 'Welcome' tab.  Cache was cleared and still the 'Home' tab persists.  The 'Home' tab is not a selected navigation item. 

Can anyone explain why the 'Home' tab still showing? 
Hello, Trying to apply a color to an entire card.  Should be easy but it has not turned out to be that way.    Does anyone have suggestions?  I have attached an image of what I am trying ot accomplish.User-added image
The objective is to allow our users to stay in Salesforce without having to open other applications.  What the ask is, is to have a movable dialog box were a person can take notes throughout the day.  They would like it to have a spell check. 

The question is can something stay around floating all day without being closed when moving from page to page? 

Also, could someone point me to an article to enable spell checking on a rich text area?  
Working in a lightning component and have added a window.addEventListener.  Have been told that is a memory leak and should add a removeEventListener also.  To do that I cannot have an annonymous function.  Could someone please explain how I could create a named function that passes all the necessary objects like component and event and use it inside the LEX component?
doInit : function(component,event,helper) {           
        var action = component.get("c.getRoutine");
        action.setCallback(this, function(response) {
            var state = response.getState();
            if(state == "SUCCESS") {
                var responseWrapper = response.getReturnValue();              
                window.addEventListener('message', function(event) {
                    var message = event.data;  
                    component.set("v.savedMessage",message.data);   
                }, false); 
            }
        });

 
Wondering if someone could explain this.  We have created a custom object and have selected values to display when a search is executed in mobile.  This works OK on a regular browser but it displays differently in Salesforce1.  3 fields are not listed.  Is there a limit to the number of fields that can be returned for Salesforce1 on a search?  

User-added image.

 
Currently I have a Visualforce page that is used to accept parameters from outside Salesforce. The visualforce page calls javascript and opens a tab in a lightnig console.  I am successful opening the lightning console tab when the values are all correct.  I am trying to use ApexPages.addmessage to display a message when the ID is not found.  The issue is that I continue to get 'Error: resolvePage() - Error determining State from pageReference'  An ugly error hits the page that has to be x'ed out of.  Then it says page not found.  Is there a method I could use to redirect to the 'Home Page of the Console?'
We have a situation while working in a Salesforce console. The scenario is that a user is taking notes and talking to a customer.  When the call ends an event gets fired in Salesforce.  The user is still taking notes and modifying the record they were on.  The event that gets fired accepts a Visualforce page only to handle the event. We have chosen to use a flow inside the visualforce page. The event\flow inserts a record.  We do not want it to redirect anywhere. We just want it the end. The issue is that when the flow is complete it always says 'Your Flow Finished.'  This verbiage shows in a tab on the console tab that the user has to close the tab.  It is a nuisance and the user does not know what is happening either. Is there a solution the transparently close the flow without a message to the console. I do not want a finish location.  I want finish to to finish silently with no tabs or notifications.
I have created a Custom Console Component.  This button is on the bottom\footer of the console.   The component window settings have a component of 'Visualforce Page' set.  It works fine ONCE.

When the Custom Console Component button is initially clicked the custom controller loads that page through a query. When the user is done they close the page.  It appears that on subsequent clicks\loads that the controller never runs again.  As if you are just hiding the visualforce page and not really refreshing.  The idea was to get the 'Most Recent' insert of the sObject when the page is presented.  Is there anything that can be done to correct this?

User-added image    
Hoping someone has insight.  There is a lightning component embedded inside a lightning component.  The component has been given and aura:id of 'buildingLU'   The component also has a couple of user defined attributes of 'buildingId' and 'buildingName.'  This lookup value needs to have the ability to easily be cleared out.  The onchange event of a checkbox fires an event called 'clearbuildingName'  That routine should clear the component values.  Having trouble setting the 'v.value' of the user defined attributes. Either that needs to happen or the component needs to somehow be rerendered.  That will appear like the field is cleared.  I have included the markup of the component and the javascript controller code.   Thank You.

If I use       component.find('buildingLU').set("v.buildingName" , "")         the value is cleared but the user interface still contains the text. 
 
<div class="slds-form-element">
    <div class="slds-form-element__control">
        <span class="slds-form-element__label" for="buildingLookup">building Name</span>
        <c:buildingLookupCmp aura:id="buildingLU" buildingId="{!v.Customer.buildingId__c}" buildingName="{!v.Customer.buildingId__r.Name}" />
    </div>
    <div class="slds-float_right">
        <label class="slds-checkbox">
        <span class="slds-form-element__label" for="clearbuilding">Clear building</span>
         <input id="clearbuilding" type="checkbox" onchange="{!c.clearbuildingName}" /> 
         <span class="slds-checkbox--faux"></span>
        </label>
    </div>
    <div>
    </div>
</div>
clearbuildingName : function(component, event, helper) {       	
        component.find('buildingLU').set("v.value" , "");	
        var Customer = component.get("v.Customer");
        Customer['buildingId__c'] = "";
        Customer['buildingNumber'] = "";
        Customer['buildingId__r.Name'] = "";
        component.set("v.Customer", JSON.parse(JSON.stringify(Customer)));       
    },



 
Could someone explain how to process a list within a list in APEX code?

String List Example:

List<String>
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI60856},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI54960},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI57656}

There would be three calls within a loop to a service that is expecting the parameters of AgentId and CustomerIds[].


Example:

AgentId = 'AI60856'
CustomerIds[] = '700011326', '507024842', '12345678'

AgentId = 'AI54960'
CustomerIds[] = '700011326', '507024842', '12345678'

AgentId = 'AI57656'
CustomerIds[] = '700011326', '507024842', '12345678'
Would like to redirect Salesforce Help to a Visualforce page. Having a hard time specifying a dynamic location.  Is it even possible?
Setup\Customize\Tab Names and Labels\Help Settings

Trying to do something like this:
{!URLFOR($Site.Prefix +'/NewLightningPage')}
Hello, I have an Object with a list inside of of it. The two values I want to retrieve are 'Label' and 'Link.'  How do I get those values.  The error messages keep telling me I need an SObject.  The Object is not an SObject.  Looks something like this.

Link:[Label=FirstButton,Link=https://www.here.com],[Label=SecondButton,Link=https://www.there.com]
I want to get the value of 'Label' and 'Link' 
List<Object> OuterTable = new List<Object>();
OuterTable = response.LTable;
        for (Integer i=0;i<OuterTable.size();i++) { 
            System.debug('OK Until here' + OuterTable.get(i));   
//Don't know how to get the rest
}
Any help would be appreciated.

Thanks! 
 
Trying to build dynamic buttons in a lightning component. An array is loaded will labels and URL's. As I loop through the array I have gotten it to a point where the buttons show up. Now I need to have a URL in that button to launch.  None of the attributes I have tried will do it.  Any direction would be great.
The user is asking for data to be displayed based on 4 different criteria types fo the same sObject type.  The list should display a maximum of 6 records.  If the first 4 records queried match the criteria then collect and show the 4 records of data. Continue to search for more data until the number of 6 records are collected.  If only 1 record for the next set of criteria matches then collect that 1 record and add it for a total of 5 records, We still will need 1 more record so another query needs to happen with different criteria until the list is full.  How can this be done?
Trying to layout a responsive visualforce page with the lightning design system. When I look at it in a responsive mode the fields are  jumbled. 

Example:

Regular Browser

Residential Street           Mailing Street
Residential City              Mailing City
Residential State            Mailing State
Residential Zip                Mailing Zip

Current Responsive For Phone 

Residential Street          
Mailing Street
Residential City
Mailing City
Residential State            
Mailing State
Residential Zip                
Mailing Zip


Want it like this: 

Residential Street
Residential City
Residential State
Residential Zip
Mailing Street
Mailing City
Mailing State
Mailing Zip

Current Tag:
  <div class="slds-col--padded  slds-size--1-of-1 slds-medium-size--3-of-6 slds-large-size--6-of-12 slds-m-top--medium" >
Hello, I have an Object with a list inside of of it. The two values I want to retrieve are 'Label' and 'Link.'  How do I get those values.  The error messages keep telling me I need an SObject.  The Object is not an SObject.  Looks something like this.

Link:[Label=FirstButton,Link=https://www.here.com],[Label=SecondButton,Link=https://www.there.com]
I want to get the value of 'Label' and 'Link' 
List<Object> OuterTable = new List<Object>();
OuterTable = response.LTable;
        for (Integer i=0;i<OuterTable.size();i++) { 
            System.debug('OK Until here' + OuterTable.get(i));   
//Don't know how to get the rest
}
Any help would be appreciated.

Thanks! 
 
In a Lightning Aura Component an attribute can be defined in the .cmp as an object from the Apex component class.

Example: <aura:attribute name="productObject" type="ProducController.ProductWrapper[]"/>

How can that same thing be accomplished in a Lightning Web Component?
On the Developer Console in Salesforce

All the tabs are closed before pressing the X in the right hand corner of the browser. 

When The Developer Console is opened again all the tabs that were previously closed are open again.

How do you make it stick?  So the tabs are not present when the Developer Console is open again?

I have use the 'Close All' from the Toolbar menu and I have right clicked on the browser bar and clicked 'Close.'  Always the same result.  The tabs that were closed remain open again when re-opening the Developer Console.  


Is this not possible? 
Currently the customer wants to use standard pages.  When saving the page, they would like a ‘call out’ to a service to happen. They do not want to press any extra buttons or quick actions.  This should all happen when the standard ‘Save’ button is pressed on a standard ‘Page.’

I was hoping Flow was the answer.  Is it necessary to tie the Flow directly to a button or quick action?  
The Flow obviously is tied to the event of record saving.  It blew up because of a null record ID.  So the Flow knows about the record being saved.  The Flow just does not see the specific record ID.

I have created a variable in the Flow that queries the incoming record ID and assigns it.  The @InvocableMethod annotation method is then called in APEX.  That is where it blows up because the variable is null. 

Is the only answer to create a trigger?  I do not want this to happen when every an sObject type is updated.  Only when actual ‘User Interface’ is happening.

Could someone please advise? Thanks.
 
I am in the lightning environment using a standard page layout.  I have created a ‘Detail Page Button’ tied to a content source of ‘Visualforce Page.’  The Visualforce page executes from the custom button to call a web service.  What I would like to happen is an alert informing the user the web service call out is complete.    I would like a JavaScript message of  ‘Success’ or ‘Failure.’   There cannot be an ‘apex:command button’ or anything that will make the ‘Visualforce Page’ display.  

If it cannot be JavaScript message any type of message will be OK.
The apex:pagemessage will not work because the ‘Visualforce Page’ is never, and should never, displayed.  The only reason it exists is to call Apex.  

Many different attempts at firing JavaScript from the controller have failed. I am guessing it is locker service blocking the functionality.
Has anyone found a solution for this?  This seems like it would be pretty common to do this. 

The user wants to use standard pages.

I have added my current page and controller. 
 
<apex:page standardController="Account" extensions="AccountExtController" action="{!executeCall}">     
</apex:page>
 
public class AccountExtController {
    
    private ApexPages.StandardController standardController;	
    private Id acctID; 
    public AccountExtController(ApexPages.StandardController standardController)
    {
        acctID = standardController.getId();
    }
    
    public PageReference executeCall()
    {     
        String responseMessage = accountCallOutHelper.executeRequest('POST', 'getsomestuff', acctID);       
        //W A N T  T O  F I R E  A  M E S S A G E  H E R E!
        return new pagereference(url.getsalesforcebaseurl().toexternalform()+'/'+ acctID);
    }   
}

 
Selected
NOT
There a in-house created application where the default tab was 'Home.' The user did not like the word 'Home'  They wanted the word 'Welcome' on the tab.  It was not possible to just rename the tab.  A 'Lightning Page Tab' was created.  The tab was assigned to a App page replacing the 'Home' tab.  

The tab was given permissions to the permission sets and profiles.  The presentation of the tab was good in the sandbox.  When deployed, it had both the 'Welcome' tab and the 'Home' tab.  

The environment was checked and the only navigation items selected in the application was the new 'Welcome' tab.  Cache was cleared and still the 'Home' tab persists.  The 'Home' tab is not a selected navigation item. 

Can anyone explain why the 'Home' tab still showing? 
Hello, Trying to apply a color to an entire card.  Should be easy but it has not turned out to be that way.    Does anyone have suggestions?  I have attached an image of what I am trying ot accomplish.User-added image
The objective is to allow our users to stay in Salesforce without having to open other applications.  What the ask is, is to have a movable dialog box were a person can take notes throughout the day.  They would like it to have a spell check. 

The question is can something stay around floating all day without being closed when moving from page to page? 

Also, could someone point me to an article to enable spell checking on a rich text area?  
Working in a lightning component and have added a window.addEventListener.  Have been told that is a memory leak and should add a removeEventListener also.  To do that I cannot have an annonymous function.  Could someone please explain how I could create a named function that passes all the necessary objects like component and event and use it inside the LEX component?
doInit : function(component,event,helper) {           
        var action = component.get("c.getRoutine");
        action.setCallback(this, function(response) {
            var state = response.getState();
            if(state == "SUCCESS") {
                var responseWrapper = response.getReturnValue();              
                window.addEventListener('message', function(event) {
                    var message = event.data;  
                    component.set("v.savedMessage",message.data);   
                }, false); 
            }
        });

 
Currently I have a Visualforce page that is used to accept parameters from outside Salesforce. The visualforce page calls javascript and opens a tab in a lightnig console.  I am successful opening the lightning console tab when the values are all correct.  I am trying to use ApexPages.addmessage to display a message when the ID is not found.  The issue is that I continue to get 'Error: resolvePage() - Error determining State from pageReference'  An ugly error hits the page that has to be x'ed out of.  Then it says page not found.  Is there a method I could use to redirect to the 'Home Page of the Console?'
We have a situation while working in a Salesforce console. The scenario is that a user is taking notes and talking to a customer.  When the call ends an event gets fired in Salesforce.  The user is still taking notes and modifying the record they were on.  The event that gets fired accepts a Visualforce page only to handle the event. We have chosen to use a flow inside the visualforce page. The event\flow inserts a record.  We do not want it to redirect anywhere. We just want it the end. The issue is that when the flow is complete it always says 'Your Flow Finished.'  This verbiage shows in a tab on the console tab that the user has to close the tab.  It is a nuisance and the user does not know what is happening either. Is there a solution the transparently close the flow without a message to the console. I do not want a finish location.  I want finish to to finish silently with no tabs or notifications.
Could someone explain how to process a list within a list in APEX code?

String List Example:

List<String>
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI60856},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI54960},
{AccountCustomerNumbers=[700011326, 507024842, 12345678], AgentId=AI57656}

There would be three calls within a loop to a service that is expecting the parameters of AgentId and CustomerIds[].


Example:

AgentId = 'AI60856'
CustomerIds[] = '700011326', '507024842', '12345678'

AgentId = 'AI54960'
CustomerIds[] = '700011326', '507024842', '12345678'

AgentId = 'AI57656'
CustomerIds[] = '700011326', '507024842', '12345678'
Would like to redirect Salesforce Help to a Visualforce page. Having a hard time specifying a dynamic location.  Is it even possible?
Setup\Customize\Tab Names and Labels\Help Settings

Trying to do something like this:
{!URLFOR($Site.Prefix +'/NewLightningPage')}
Hello, I have an Object with a list inside of of it. The two values I want to retrieve are 'Label' and 'Link.'  How do I get those values.  The error messages keep telling me I need an SObject.  The Object is not an SObject.  Looks something like this.

Link:[Label=FirstButton,Link=https://www.here.com],[Label=SecondButton,Link=https://www.there.com]
I want to get the value of 'Label' and 'Link' 
List<Object> OuterTable = new List<Object>();
OuterTable = response.LTable;
        for (Integer i=0;i<OuterTable.size();i++) { 
            System.debug('OK Until here' + OuterTable.get(i));   
//Don't know how to get the rest
}
Any help would be appreciated.

Thanks! 
 
Trying to build dynamic buttons in a lightning component. An array is loaded will labels and URL's. As I loop through the array I have gotten it to a point where the buttons show up. Now I need to have a URL in that button to launch.  None of the attributes I have tried will do it.  Any direction would be great.
The user is asking for data to be displayed based on 4 different criteria types fo the same sObject type.  The list should display a maximum of 6 records.  If the first 4 records queried match the criteria then collect and show the 4 records of data. Continue to search for more data until the number of 6 records are collected.  If only 1 record for the next set of criteria matches then collect that 1 record and add it for a total of 5 records, We still will need 1 more record so another query needs to happen with different criteria until the list is full.  How can this be done?
Trying to layout a responsive visualforce page with the lightning design system. When I look at it in a responsive mode the fields are  jumbled. 

Example:

Regular Browser

Residential Street           Mailing Street
Residential City              Mailing City
Residential State            Mailing State
Residential Zip                Mailing Zip

Current Responsive For Phone 

Residential Street          
Mailing Street
Residential City
Mailing City
Residential State            
Mailing State
Residential Zip                
Mailing Zip


Want it like this: 

Residential Street
Residential City
Residential State
Residential Zip
Mailing Street
Mailing City
Mailing State
Mailing Zip

Current Tag:
  <div class="slds-col--padded  slds-size--1-of-1 slds-medium-size--3-of-6 slds-large-size--6-of-12 slds-m-top--medium" >
Does anyone know if there's a way to get the parent fields for the Account parent object via the ObjectId relationship in ObjectTerritory2Association?

The query below works to get the Name.  But I don't know of a way to get the other fields.  It's actually one custom field that I'm hoping to get in my query.

select ObjectId , Object.Name,  Territory2.MarketUser_Last_Modified_Date__c ,LastModifiedDate
from ObjectTerritory2Association
where   Object.Type = 'Account' limit 10