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

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 33
    Questions
  • 35
    Replies

Using an out of the box field for a date time value.OOB Date Time Fields

It is necessary to have the start date and end date as close as possible to avoid a void in the range window.  

Is it possible to load 1 second after midnight somehow?

When I tried '10/1/2023 0:01 AM'

I received Error: Invalid Date and Time


Same with '10/1/2023 01 AM' and '10/1/2023 :01 AM'

Hello, I have been searching, attempting to find a functioning example of how to POST multipart base64 attachments and associated parent documents to a third party service.  I see pieces for just attachments and pieces for documents but nothing together.  

An example would be to send an application (document) with attachments (resume, photo Id, pdf) to the 3rd party in a REST Post. 

Does anyone have a working example of this?  Don't know if I need to send the base64 attachmetns by themselves or within the body the request with the document.   

Hello, I am using an HTML Classic Email template.  The ask is to condition the field to display only when it is not blank.

  • Without the condition:  Successful - Renders

Final Approver: {!PSM_Amendment__c.PSM_User_Amend_Final_Approver_First_Name__c} {!PSM_Amendment__c.PSM_User_Amend_Final_Approver_Last_Name__c}

  • With the condition:  Fails.  Nothing renders.  The area is empty.  Not even the XYZ shows up. 

{!IF(NOT(ISBLANK(PSM_Amendment__c.PSM_User_Amend_Final_Approver_Last_Name__c)), "Final Approver: " + PSM_Amendment__c.PSM_User_Amend_Final_Approver_First_Name__c + " " +  PSM_Amendment__c.PSM_User_Amend_Final_Approver_Last_Name__c , "XYZ")}

 

Is it possible to condition a text string and a field value through formula in an HTML email template?

The user is asking to show an approver that may be null. If it is null then don't show anything. If the approver is not null then give a label and the field value. 

This is what I have attempted and it does not render. 

{!IF
(AND
(Type__c="Maintenance",
ISPICKVAL(Division__c , "Division of Medicine"),
ISPICKVAL(Bureau__c , "Rates")
), "End Approver: " +  End_Approver__c, ""
)}

Display if field has a value:
End Approver:  The persons name

Display if field is null
Nothing
 

Could someone please call out the negative impact of not using the setting of:

Enable secure and persistent browser caching to improve performance

I know the setting helps components load faster but what negative impact will it have in other respects?

Intermittent failure of labels loading have been reported an environment.  

This occurs when a component references a label: import randomlabel from '@salesforce/label/c.randomlabel';

The only solution offered  is here:

https://trailblazer.salesforce.com/issues_view?id=a1p4V00000042DYQAY&title=custom-labels-imported-in-lwc-are-not-rendered-intermittently-in-communities

This recommendation suggests unchecking the box in Session Settings of:

Enable secure and persistent browser caching to improve performance

If I uncheck the box am I going to have an array of issues.  If I do not then the users labels do not load from time to time. 

Hello, I have a situation where the DeveloperName\QualifiedApiName is not the same as Label\MasterLabel in a CustomMeta Data table.

In VSCode all that is visible is on the CustomMeta Data table is the field of Label name.  When the CLI command is used to instert a record, it defaults the value used for the Label into the DeveloperName.  The requirement is to uniquely specify the Label and the DeveloperName.

sfdx force:cmdt:record:insert -f C:\__RepositoryPath\DataImport\My_CustomMetaData__mdt.csv -t My_CustomMetaData

I know there are different DeveloperNames on records for the existing CustomMeta data but I do not see those in VSCode either.

I used this command to retrieve the structure and the DeveloperName is not there.

sfdx force:source:retrieve -m CustomObject:My_CustomMetaData__mdt 

There are a lot of records.  Yes I could import and change one of the field values manually.  Totally inefficient.  I am hoping for a better solution if one is out there.

 

 

A request has been made to create a custom lookup to the Contact sObject with a lightning web component.  The Name, FirstName and LastName are encrypted.

An error is returned of ‘Field 'Name' cannot be filtered in a query call’

Is there any work around or trick to this?  

 

Cannot authorize my newly refreshed Sandbox Org from VSCode to Salesforce.  

Receive an error of: Cannot read properties of undefined (reading 'id')

This occurred after my Sandbox was recently refreshed from Production.  I can authorize other Sandboxes from VSCode without a problem.  This is an Org specific issue.  


The suggestions on the web were not helpful.  Sfdc update and CLI update did not change anything. 

I did notice that HTTP method logged within Salesforce appears as Unknown.  


User-added imageUser-added image
Is there somewhere in VSCode that I can specifiy the HTTP method or does someone have another solution?

Working with a Flow and need to find out the difference in days between a due date and today.

If the due date is greater than 60 days from today no action should be taken.  If the due date is less than 60 days from today then action should be taken.  

I would like this to happen as possibly a forumula without custom coding. 

Is that possible in a Flow?  If it is possible how would I accomplish that.
I have a parent component that has several child checkbox components on the page. When a primary checkbox is unchecked, I would like a minor checkbox set to be unchecked.   Not all the other checkbox sets.  Just one.

I cannot seem to get a handle on a single specific entity since they all have the same name.

let thisCheckbox = this.template.querySelectorAll('c-ampafb-multi-select-checkbox');

I get the following back from the above statement.  Do not know what to do with it.

"[{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":23,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":24,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":25,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":26,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":27,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":28,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":29,\"$$HostElementKey$$\":15}]"

Each child component is assigned a unique dataId so I thought I could call a child method like this and pass the dataID.

PARENT COMPONENT

this.template.querySelector('c-ampafb-multi-select-checkbox')
                        .clearAllCheckboxes(this.c4_childDataId);


CHILD COMPONENT

@api clearAllCheckboxes(dataId) {
    let checkBoxes = this.template.querySelectorAll('[data-id=' + dataId + ']');
**** checkboxes is null.        
}

Could someone please offer some suggestions?

Thanks
 

A picklist exists that is custom ordered. Not alphabetic. 

The value displays on the User Interface as expected.  The 'Saved' picklist values are not physically in the order as displayed on the User Interface.  


This would not be important except that they are loaded into an XML file and are expected to be in the order they are displayed to the user.

Is there a way to retain the order of the picklist on the back side?  Or potentially sort based on the order of the picklist in Setup?  Not all values will be picked at all times and they need to be in the order represented in Setup. 

Example: Order of Picklist (Both represented in Setup and displayed to the User)

Asian
Black
Native
White
Other

A query exposes the fact that the values are acually stored like this.

Asian;Black;White;Native;Other
 

Developing a Lightning Web Component.

When initially working on the PC, the Chrome browser displays my form with a FORM_FACTOR of LARGE.   

I would like to test the screen in a mobile size SMALL also.   I opened the Chrome developer tools.  I toggled the device mode to an iPhoneXR.   

While in the device toggle to iPhoneXR the image is scaled down to phone size.  

The problem is that the browser still thinks the FORM_FACTOR is LARGE.   

The size of the screen changes but the lightning component does not acknowledge that the viewable area has changed its display size.

Is there a workaround to this?
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?  
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! 
 
Hello, I have been searching, attempting to find a functioning example of how to POST multipart base64 attachments and associated parent documents to a third party service.  I see pieces for just attachments and pieces for documents but nothing together.  

An example would be to send an application (document) with attachments (resume, photo Id, pdf) to the 3rd party in a REST Post. 

Does anyone have a working example of this?  Don't know if I need to send the base64 attachmetns by themselves or within the body the request with the document.   

Hello, I am using an HTML Classic Email template.  The ask is to condition the field to display only when it is not blank.

  • Without the condition:  Successful - Renders

Final Approver: {!PSM_Amendment__c.PSM_User_Amend_Final_Approver_First_Name__c} {!PSM_Amendment__c.PSM_User_Amend_Final_Approver_Last_Name__c}

  • With the condition:  Fails.  Nothing renders.  The area is empty.  Not even the XYZ shows up. 

{!IF(NOT(ISBLANK(PSM_Amendment__c.PSM_User_Amend_Final_Approver_Last_Name__c)), "Final Approver: " + PSM_Amendment__c.PSM_User_Amend_Final_Approver_First_Name__c + " " +  PSM_Amendment__c.PSM_User_Amend_Final_Approver_Last_Name__c , "XYZ")}

 

Is it possible to condition a text string and a field value through formula in an HTML email template?

The user is asking to show an approver that may be null. If it is null then don't show anything. If the approver is not null then give a label and the field value. 

This is what I have attempted and it does not render. 

{!IF
(AND
(Type__c="Maintenance",
ISPICKVAL(Division__c , "Division of Medicine"),
ISPICKVAL(Bureau__c , "Rates")
), "End Approver: " +  End_Approver__c, ""
)}

Display if field has a value:
End Approver:  The persons name

Display if field is null
Nothing
 

Could someone please call out the negative impact of not using the setting of:

Enable secure and persistent browser caching to improve performance

I know the setting helps components load faster but what negative impact will it have in other respects?

Intermittent failure of labels loading have been reported an environment.  

This occurs when a component references a label: import randomlabel from '@salesforce/label/c.randomlabel';

The only solution offered  is here:

https://trailblazer.salesforce.com/issues_view?id=a1p4V00000042DYQAY&title=custom-labels-imported-in-lwc-are-not-rendered-intermittently-in-communities

This recommendation suggests unchecking the box in Session Settings of:

Enable secure and persistent browser caching to improve performance

If I uncheck the box am I going to have an array of issues.  If I do not then the users labels do not load from time to time. 

Hello, I have a situation where the DeveloperName\QualifiedApiName is not the same as Label\MasterLabel in a CustomMeta Data table.

In VSCode all that is visible is on the CustomMeta Data table is the field of Label name.  When the CLI command is used to instert a record, it defaults the value used for the Label into the DeveloperName.  The requirement is to uniquely specify the Label and the DeveloperName.

sfdx force:cmdt:record:insert -f C:\__RepositoryPath\DataImport\My_CustomMetaData__mdt.csv -t My_CustomMetaData

I know there are different DeveloperNames on records for the existing CustomMeta data but I do not see those in VSCode either.

I used this command to retrieve the structure and the DeveloperName is not there.

sfdx force:source:retrieve -m CustomObject:My_CustomMetaData__mdt 

There are a lot of records.  Yes I could import and change one of the field values manually.  Totally inefficient.  I am hoping for a better solution if one is out there.

 

 

A request has been made to create a custom lookup to the Contact sObject with a lightning web component.  The Name, FirstName and LastName are encrypted.

An error is returned of ‘Field 'Name' cannot be filtered in a query call’

Is there any work around or trick to this?  

 

Cannot authorize my newly refreshed Sandbox Org from VSCode to Salesforce.  

Receive an error of: Cannot read properties of undefined (reading 'id')

This occurred after my Sandbox was recently refreshed from Production.  I can authorize other Sandboxes from VSCode without a problem.  This is an Org specific issue.  


The suggestions on the web were not helpful.  Sfdc update and CLI update did not change anything. 

I did notice that HTTP method logged within Salesforce appears as Unknown.  


User-added imageUser-added image
Is there somewhere in VSCode that I can specifiy the HTTP method or does someone have another solution?

I have a parent component that has several child checkbox components on the page. When a primary checkbox is unchecked, I would like a minor checkbox set to be unchecked.   Not all the other checkbox sets.  Just one.

I cannot seem to get a handle on a single specific entity since they all have the same name.

let thisCheckbox = this.template.querySelectorAll('c-ampafb-multi-select-checkbox');

I get the following back from the above statement.  Do not know what to do with it.

"[{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":23,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":24,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":25,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":26,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":27,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":28,\"$$HostElementKey$$\":15},{\"$$ShadowTokenKey$$\":\"c-ampafbHouseholdMoreAbout_ampafbHouseholdMoreAbout\",\"$$ShadowedNodeKey$$\":29,\"$$HostElementKey$$\":15}]"

Each child component is assigned a unique dataId so I thought I could call a child method like this and pass the dataID.

PARENT COMPONENT

this.template.querySelector('c-ampafb-multi-select-checkbox')
                        .clearAllCheckboxes(this.c4_childDataId);


CHILD COMPONENT

@api clearAllCheckboxes(dataId) {
    let checkBoxes = this.template.querySelectorAll('[data-id=' + dataId + ']');
**** checkboxes is null.        
}

Could someone please offer some suggestions?

Thanks
 

A picklist exists that is custom ordered. Not alphabetic. 

The value displays on the User Interface as expected.  The 'Saved' picklist values are not physically in the order as displayed on the User Interface.  


This would not be important except that they are loaded into an XML file and are expected to be in the order they are displayed to the user.

Is there a way to retain the order of the picklist on the back side?  Or potentially sort based on the order of the picklist in Setup?  Not all values will be picked at all times and they need to be in the order represented in Setup. 

Example: Order of Picklist (Both represented in Setup and displayed to the User)

Asian
Black
Native
White
Other

A query exposes the fact that the values are acually stored like this.

Asian;Black;White;Native;Other
 

Developing a Lightning Web Component.

When initially working on the PC, the Chrome browser displays my form with a FORM_FACTOR of LARGE.   

I would like to test the screen in a mobile size SMALL also.   I opened the Chrome developer tools.  I toggled the device mode to an iPhoneXR.   

While in the device toggle to iPhoneXR the image is scaled down to phone size.  

The problem is that the browser still thinks the FORM_FACTOR is LARGE.   

The size of the screen changes but the lightning component does not acknowledge that the viewable area has changed its display size.

Is there a workaround to this?
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);
    }   
}