• DML2020
  • NEWBIE
  • 85 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 2
    Likes Given
  • 31
    Questions
  • 10
    Replies

A message needs to display for the user before continuing to the next page in the sequence for an order process. The orginal code in the .js of the LWC was as follows:

handleClickContinue() {
    this.dispatchEvent(new CustomEvent('continue'), { detail: 'propertyInfo' });
  }

and the code for the toast was inserted as follows:

handleClickContinue() {
    this.dispatchEvent(
      new ShowToastEvent({
          title: 'Test case for this & that.',
          message: 'Once an order is submitted, changes cannot be made. Please review <a href="https://www.naahq.org/member-services/naa-click-lease/resources-faqs/lease-policies">these policies here</a> for further information.',
          variant: 'info',
          mode: 'sticky'
      })
    this.dispatchEvent(new CustomEvent('continue'), { detail: 'propertyInfo' });
  }

The issue is that my code will not deploy to the source org. Is there a syntax issue here or what should I check here?

To accomplish having a link embedded within text in a lightning web component to open to a new tab or window, would only the html file require modification or the html file AND the javascript file?

Any examples would be much appreciated.

Our full copy sandbox is being refreshed and the latest code and configuration updates need to be saved prior to this action. Are there guidelines to follow on copying what exists in the full sandbox to pull from?

I've validated a changeset which returned code coverage failure (even though unrelated to the code being deployed) for an event trigger after running default tests. In order to get the desired code deployed, a test class covering the event trigger needs to be created.

I'm not sure how to go about this and would like to see examples of what a test class for an event trigger would look like.

Here's the event trigger I need coverage for:

trigger MYLogEventTrigger on MYLogEvent__e (after insert) {
List<MYLogEvent__e> eventlist = (List<MYLogEvent__e>) trigger.new;
MY_Util.handleNewEvents(eventlist);
}

It was discovered that the zeroes preceding the value in the zip code field is removed during transfer through API. One solution was thought to convert the zip code formula field (which trims another zip code field to 5 digits) to a text. However, that is not possible.

Any recommendations on how to resolve the loss of the zeros in front of the zip code?

In our Salesforce org, we have a custom button that converts a certificate to a pdf file. The file generates 3 pages one of which is blank. How can I modify the file/ template using CSS to remove the extra spacing? Where might I want to start?
Our org has an email template with a visualforce attachment. How do I rename the file that is attached?User-added image
Once I was able to get a feed of logs in my developer console real-time as I was working in my org. With each button click or when I select the save button, I would immediately see the lines generate at the bottom of my console. Now, I'm not able to see this. How do I get to 'turn on' this feature again?
Other than Request an Email Log file through Setup -> Email Log Files, are there other ways to verify emails sent in Salesforce?
What is a suggested way to check/ test that emails are created (BEFORE they are sent) in Salesforce?

I have a table where one column displays the account balance pulled from an object. So within one of the components referencing the field, it reads

<td scope="row">
            <div class="slds-truncate">{!v.property.NU__AccountBalance__c}</div>
        </td>

On the customer site however, values are displayed as e.g. 2.5, 0. How do I display the value as $2.50, $0.00?

For 

<aura:if isTrue="{!v.property.CLMemberThru__c lt TODAY() == 'Inactive'}">

if TODAY() is not recognized as a function, how do I define it to check if it is true if the CLMemberThru field is before TODAY's date?

After executing the test deliverability feature in Salesforce I received the message that 16 messages have been sent to my email address. 

User-added image

If Salesforce sends a test email from the relevant IP addresses to my address but I could EXPECT up to 32 emails,
1. how are those 16 IP addresses determined to be relevant
2. what about the other 16, should I have received them? if so, how do I resolve this?
3. where can I find the list of those relevant IP addresses?

Trying to better understand deliverability.
 
In our org, there's a webpage (which I believe is a visualforce page) that's linked from an application and needs to be edited. What steps do I take to find that page in the org?

For an external user to pull records associated with a specific field (say, event for example) amongst a large group of records associated to other events, how would I include that in my method without making a hardcoded reference like the following?

[Select Id, EventName, EventID, Name, Email FROM Registration WHERE EventID = 'abc4e00000KlMnO']

since the following 

[Select Id, EventName, EventID, Name, Email FROM Registration] 

pulls the records from all events and not the one of interest.

Hi. 

I created an API for an events platform to pull data of attendees. I have a SOQL query which points to the specific event but now realize that hardcoding the event ID is not *best practice*.
 

@RestResource(urlMapping='/eventplatformList/*')

global with sharing class eventplatformRestResource {

    @HttpGet

    global static LIST<Registration__c> doGet(){

    RestRequest req = RestContext.request;

    RestResponse res = RestContext.response;

    LIST<Registration__c> result = [Select Id, EventName__c, FullName__c, RegistrantEmail__c FROM Registration__c WHERE Event2__c = 'a0k4z00000BdNnG'];

               return result;

    }
 

How would I change the code for the platform to pull the data needed for this upcoming event AND be able to reuse this Apex class so that data for other events can be pulled?

Hello. 

I've successfully set up a connected app to allow an external vendor to be able to receive/ pull data from my org by providing them the URL and token.

Conversely, if I want to be able to set up an API to push data to this platform, what would I do differently to accomplish this besides having the vendor set up a connection on their end? How would I get started/ proceed?

In this org, a custom button exists to execute a business process (specifically it converts order requests into orders and sends out an email message). Within these processes, I want to identify the one that sends these email out.

How do I locate the process/ these series of steps behind this button? I see the button under the object in which its content source is a visualforce page. Where do I go from there?

Note: I did perform a debug for when the button was clicked and have yet to hone in on the email process since there was a lot of data in the debug log. Wondering if this is another way to identify this?

Once upon a time, hard copy book orders were placed in my org (over a year ago) through an API for ViaTech, and then this process was no longer used for some time. Now, it was decided that the process needs to happen again.

Those books can now be ordered by the end user and goes through fine, but ViaTech does not receive the order. I suspect the issue is with the API. However, the connected app does not show the client key and client secret so that I can test the connection.
How do I find this information on my connected app to test?

In this org, there is a quick action on a list view called 'Execute Order Importer for Selected'. When clicked, the selected order requests are converted and during this process an email is automatically sent to the indivisual who created that order. The quest is to identify that process where an email is sent to reuse for another process.
I ran a debug log and have honed in on an EMAIL_QUEUE line which I believe is involved in the email automation using a template. I've also identified in the log the email that the message was sent to.

Question: How can I use this to identify the automation that occurs so that I may replicate it elsewhere? 

Our org has an email template with a visualforce attachment. How do I rename the file that is attached?User-added image
In our org, there's a webpage (which I believe is a visualforce page) that's linked from an application and needs to be edited. What steps do I take to find that page in the org?

Hi. 

I created an API for an events platform to pull data of attendees. I have a SOQL query which points to the specific event but now realize that hardcoding the event ID is not *best practice*.
 

@RestResource(urlMapping='/eventplatformList/*')

global with sharing class eventplatformRestResource {

    @HttpGet

    global static LIST<Registration__c> doGet(){

    RestRequest req = RestContext.request;

    RestResponse res = RestContext.response;

    LIST<Registration__c> result = [Select Id, EventName__c, FullName__c, RegistrantEmail__c FROM Registration__c WHERE Event2__c = 'a0k4z00000BdNnG'];

               return result;

    }
 

How would I change the code for the platform to pull the data needed for this upcoming event AND be able to reuse this Apex class so that data for other events can be pulled?

In this org, there is a quick action on a list view called 'Execute Order Importer for Selected'. When clicked, the selected order requests are converted and during this process an email is automatically sent to the indivisual who created that order. The quest is to identify that process where an email is sent to reuse for another process.
I ran a debug log and have honed in on an EMAIL_QUEUE line which I believe is involved in the email automation using a template. I've also identified in the log the email that the message was sent to.

Question: How can I use this to identify the automation that occurs so that I may replicate it elsewhere? 

Has anyone encountered this issue before? 

Some changes were made to a communities site using code in the components files in a DEV sandbox. Another change to the same site also included deleting the Headline component which I did in the DEV sandbox as well.

After validation and successful deploy to the FULL sandbox however, the change did not take and the headline component still showed up in my FULL sandbox. All the code changes look satisfactory to change the user interface look satisfactory except but the component I delete came over/ is still there.

What did I not do while in DEV sandbox to completely delete the headline component for this change to not reflect in FULL sandbox?

On the main page of a communities site, I have three sections two of which gives me the option to open in developer console to edit the cmp file or delete and one(the headline) which simply only allows me to delete. How do I find the lightning component detail of this section in my org (unable to find any aura component bundle details in setup that have that label or contain the text)? I'd like to view the code and edit.

Does one exist for this? Or is it only that I can edit it from the Experience Builder page only? 

 

Thinking this may be fundamental:

When a change is made to a .cmp, .js, or .css file by adding aura components, LWC, or adjusting the positioning of them, should an Apex test class be created for those changes as well?

If so, how to go about this? Is this the same as a controller?

Any links to resources to explain this?

Thank you.

Changes were made to a communities site by adding/ modifying code in .cmp, .js, and .css files in a dev sandbox to replace two components which each point to URL links and adjust their positioning on the page. Now, inbound change sets are to be validated before deployment to FULL sandbox.

Which test option should be selected from Default, Run ALL, LOCAL or SPECIFIED tests based on what was done? 

i Have an issue with my trigger, it is very simple one, basically it takes credit card type and expiry date from payment and put it up one level on Invoice, for reporting purposes. it works fine when a single payment is inserted however when i do bulk upload of new payments i get this error

System.LimitException: Too many DML statements: 151

 

here is my code below any help wpuld be greatly apreciated

trigger CC_Exp on Payment__c (after insert, after update) {
Set<id> objSet = new Set<id>();  

for(Payment__c objOpp:trigger.new)

{

objSet.add(objOpp.Invoice__c);

}

List<Invoice__c> myInvoice = [select Id,Status__c from Invoice__c where Id in: objSet];

for(Payment__c objOpp:Trigger.new)

{

for(Invoice__c objAcc: myInvoice)

{

if (objOpp.Payment_Method__c == 'Credit Card') {

{

objAcc.CC_Expiry_Date__c = objOpp.Expiry_Date__c;//
objAcc.Creditcard_Type__c = objOpp.Credit_card_Type__c;//
update objAcc;
}}}
}}

 

  • July 21, 2011
  • Like
  • 0
Hi All 

I would like to backup the following : 
1. Saleforce data
2. Attachements 
3. Apex codes and Visualforce page 

Currently, I do Salesforce data backup and attachment in monthly, I use Schedule Data Export and some time I do it manually by using data load for each object. But the storage that I have now it keeps increasing. So, is there a way to make automated backup in monthly for this kind of back up and we can keep it in the cloud? 

And a part from this I would like to do versioning for Apex and Visualforce page, currently I use Eclipse for my version control but I can use on my pc only. I want the team to access this version control too. I am not sure if Eclipse can do something like sharing with team. So, it would be great if you guys can share me some ideas regarding this.

Thanks 
Nutthawan P