• amahm
  • NEWBIE
  • 15 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 10
    Questions
  • 18
    Replies
We are working on an org where cases are generated via Email-to-Case and a trigger on EmailMessage is carrying out some processes. A batch job then in a 5 minute rhythm works on these generated cases and does some further processing.

Here my questions:
  1. How can we simulate that 100-1000 emails are sent to this Email-to-Case email address? Via Apex Script in the Anonymous Code Block?
  2. The problem that we face with the apex script is that when we try sending 10 emails via Messaging.SingleEmailMessage - everything works fine the EmailMessage Objects have a parentId reference to the case which is also visible in the EmailMessage trigger. But when we try sending about 100 emails via Messaging.Email the EmailMessage object has also the parentId case reference but the parentId is null in the trigger

Thanks in advance for your responses and time
  • January 21, 2019
  • Like
  • 0
Following scenario: A custom label has to be displayed in a rendered PDF (display in a VF Iframe). Now - it should display the specific custom label translation language found in a controller function {!lang}. Like:
 
-1--works fine !-------------------------------------------
<apex:page controller="Account" extensions="AccExtens" Language="de" renderAs="pdf" >     
  Text: {!$LABEL.FreeTextLabel}     
</apex:page>

-2--works fine !-------------------------------------------
<apex:page controller="Account" extensions="AccExtens" Language="de" renderAs="{!renderas}" >     
  Text: {!$LABEL.FreeTextLabel}     
</apex:page>

-3--does not work!-------------------------------------------

<apex:page controller="Account" extensions="AccExtens" Language="{!lang}" renderAs="{!renderas}" >     
  Text: {!$LABEL.FreeTextLabel}     
</apex:page>

-------------------------------------------

public class AccExtens{

   public String getRenderas(){ 
      System.Debug('--renderas--');  
      return 'pdf';
   }  
   public String getLang(){ 
      System.Debug('--lang--');
      return 'de';
   }  
}

The strange part here is that code portions 1 and 2 work fine as far as the renderas call to controller is concerned. On page refesh the lang controller function gets also called as i see the debug of both lang and renderas.
I have a strange feeling that the language attribute and renderas attribute of apex:page are handled differently as far as the build up of the view state is concerned ! Can someone confirm that? And does somebody have a workaround?
  • January 19, 2018
  • Like
  • 0
What i have done so far: a lightning component that accesses data (accounts, custom objects) through an apex controller. The component in the end creates a custom object record and makes an insert. The lightning component is accessed as an action button on the account or from a tab in the navigation of the salesforce1 app.

So what i want to accomplish now is the following - be able to do all this when the user who is using the Salesforce1 app when he is OFFLINE. I understand that accounts e.g are when cashed (as recently viewed) available to read and be able to be created and later synced when going online.

I need a clear YES/ NO from you salesforce experts - when working OFFLINE - is the lightning component able to access the apex controller (or an alternative like GWT does) which gets the data from the cached accounts ? If not - are their any workarounds other than using other apps on the market. Thanks.
 
  • August 15, 2017
  • Like
  • 1
Basically we want to make callouts to the clients server by using a .p12 file they gave us. We created a .jks out of it. Now Webservice call works fine in SoapUI with both .p12 and .jks files as the auth certificates - and we get back results. I could also upload the .jks into salesforce successfully but when i try to make a callout i get the following error:
System.CalloutException: IO Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Is it may be possible that the certificate is not signed properly so that salesforce is not supporting it - because if i view the certificate details with keytool - the "Issuer" is not listed in the following: https://developer.salesforce.com/page/Outbound_Messaging_SSL_CA_Certificates

Is there any constellation in which a certificate can have a Issuer which is not listed in the above link. Or is it Hard n Fast rule that a certificate has to be one of the above Issuer?


 
  • January 25, 2017
  • Like
  • 0
FYI - I'm working in a dev Org. I have created object pages for the Event Object. Now, when i choose the event list page it gives me the following error : "Access to this list view isn't supported. Contact your Salesforce admin if you need help."

Now i know for a fact that events are only supported in a partner community license- but a dev org has all the licenses - so why does not it show me list page for it??
  • December 01, 2016
  • Like
  • 0
If i have an inline style on a dependent picklist (InputField) it gets lost - so i do have read some post here and there but there is no solution to this? How hard is it for salesforce to append the newly created select box with the mentioned style when they are creating it anyways new ! Whaaat?!
  • October 18, 2016
  • Like
  • 0
Hi,

is it possible to change the fields that are visible on the user settings component in the User Settings page in the Napili Community?

Thx
  • October 13, 2016
  • Like
  • 0
Hi all,
when using the record detail component in community builder it does show the detail of an object record but i have a page layout in salesforce classic where a visualforce page is embedded - and also can bee seen in salesforce classic - but i can't see it on the community lightning page when clicking on the detail page? Does it mean now - that embedded VF Pages in Page Layouts cannot be seen in community record detail pages ?
  • October 13, 2016
  • Like
  • 0
Hi,

i had included a component which did include an aura:if tag but i removed that from the component and when i go to he home page in the community builder (which actually does not contain the component) i see the following error at the top when i click on a Rich Text field which contains some html: 
Something has gone wrong. rerender threw an error in 'markup://visualEditor:componentPropertiesEditor' [rerender threw an error in 'markup://aura:if' [rerender threw an error in 'markup://aura:html' [TypeError: b.replace is not a function]]] Failing descriptor: {markup://visualEditor:componentPropertiesEditor}. Please try again.

Would be great if somebody can help me out here - because i cannot work further. I guess i have broken the Salesforce Comunity Builder!
  • October 12, 2016
  • Like
  • 0
Im currently trying to create a coomunity page with the Aloha Template. I need to show logout/settings button in the header and as far as i have come to understand from the documentation 'Getting Started with the Aloha Community Template for Salesforce Identity' there is a component called Identity Header which actually provides all that - but i cannot find it in the components section ? Is it somehow a bug or do i have to make some other configurations to see it here?
  • September 19, 2016
  • Like
  • 0
What i have done so far: a lightning component that accesses data (accounts, custom objects) through an apex controller. The component in the end creates a custom object record and makes an insert. The lightning component is accessed as an action button on the account or from a tab in the navigation of the salesforce1 app.

So what i want to accomplish now is the following - be able to do all this when the user who is using the Salesforce1 app when he is OFFLINE. I understand that accounts e.g are when cashed (as recently viewed) available to read and be able to be created and later synced when going online.

I need a clear YES/ NO from you salesforce experts - when working OFFLINE - is the lightning component able to access the apex controller (or an alternative like GWT does) which gets the data from the cached accounts ? If not - are their any workarounds other than using other apps on the market. Thanks.
 
  • August 15, 2017
  • Like
  • 1
We are working on an org where cases are generated via Email-to-Case and a trigger on EmailMessage is carrying out some processes. A batch job then in a 5 minute rhythm works on these generated cases and does some further processing.

Here my questions:
  1. How can we simulate that 100-1000 emails are sent to this Email-to-Case email address? Via Apex Script in the Anonymous Code Block?
  2. The problem that we face with the apex script is that when we try sending 10 emails via Messaging.SingleEmailMessage - everything works fine the EmailMessage Objects have a parentId reference to the case which is also visible in the EmailMessage trigger. But when we try sending about 100 emails via Messaging.Email the EmailMessage object has also the parentId case reference but the parentId is null in the trigger

Thanks in advance for your responses and time
  • January 21, 2019
  • Like
  • 0
Following scenario: A custom label has to be displayed in a rendered PDF (display in a VF Iframe). Now - it should display the specific custom label translation language found in a controller function {!lang}. Like:
 
-1--works fine !-------------------------------------------
<apex:page controller="Account" extensions="AccExtens" Language="de" renderAs="pdf" >     
  Text: {!$LABEL.FreeTextLabel}     
</apex:page>

-2--works fine !-------------------------------------------
<apex:page controller="Account" extensions="AccExtens" Language="de" renderAs="{!renderas}" >     
  Text: {!$LABEL.FreeTextLabel}     
</apex:page>

-3--does not work!-------------------------------------------

<apex:page controller="Account" extensions="AccExtens" Language="{!lang}" renderAs="{!renderas}" >     
  Text: {!$LABEL.FreeTextLabel}     
</apex:page>

-------------------------------------------

public class AccExtens{

   public String getRenderas(){ 
      System.Debug('--renderas--');  
      return 'pdf';
   }  
   public String getLang(){ 
      System.Debug('--lang--');
      return 'de';
   }  
}

The strange part here is that code portions 1 and 2 work fine as far as the renderas call to controller is concerned. On page refesh the lang controller function gets also called as i see the debug of both lang and renderas.
I have a strange feeling that the language attribute and renderas attribute of apex:page are handled differently as far as the build up of the view state is concerned ! Can someone confirm that? And does somebody have a workaround?
  • January 19, 2018
  • Like
  • 0
I'm trying to complete the Handle Record Changes and Errors module but can't seem to get past the following challenge error:
Challenge Not yet complete... here's what's wrong: 
The 'accEdit' Lightning Component JS Controller does not appear to be setting 'v.recordSaveError' with an error message.

.I've tried many different combinations of sets and am not having much luck.

I've tried several different component.set methods such as this one:
component.set('v.recordSaveError','Error: ' + saveResult.state + ', message: ' + JSON.stringify(saveResult.error));

Any ideas what this module is looking for as a valid solution?

I do see recordSaveError display after being set due to an error.

Thanks.
 
I have this error for all my 500 points challenges since two weeks ago.  I have searched other posts and checked that I am using the same account for my trailhead and my developer.org.  I have tried to use different browsers, Chrome, IE and Firefox to have the same error.  It becomes very frustrated now.  I do have successful experience with the "Check challenge" of 500 points challenge before.
FYI - I'm working in a dev Org. I have created object pages for the Event Object. Now, when i choose the event list page it gives me the following error : "Access to this list view isn't supported. Contact your Salesforce admin if you need help."

Now i know for a fact that events are only supported in a partner community license- but a dev org has all the licenses - so why does not it show me list page for it??
  • December 01, 2016
  • Like
  • 0
Hi All,

The below lines in my Apex Class are not getting covered :
 
global class TestIncidentsEmailProcess implements Schedulable{

   global void execute(SchedulableContext SC){
    try
        {      
         emailProcessing();
        }
         catch(Exception ex)
        {
            System.debug('Exception in method email process: '+ex.getStackTraceString()+':'+ex.getMessage());
        }    
   }   
   public static void emailProcessing(){
   try{
    Set<String> incidentID = new Set<String>();
    List<IncidentsEmail__c> emailRecordsToUpdate = new List<IncidentsEmail__c>();
    Date todaysDate = Date.today();
    List<IncidentsEmail__c> incidentsCreatedOrUpdatedList = [select id,Name,IncidentCreatedDate__c,EmailStatus__c from IncidentsEmail__c where IncidentCreatedDate__c =: todaysDate and EmailStatus__c!='Sent'];
    for(IncidentsEmail__c incidentsEmail :incidentsCreatedOrUpdatedList){

        incidentID.add(incidentsEmail.Name);     
    }
    List<Company_Incidents__c> incList = [select id, Name,company__r.name,company__r.Test_Manager__r.email, Test_Manager_Link_f__c,title__c,Incident__c,Incident_Id__c,Impact__c,Email_Trigger__c,Incident_Formula__c,Open_Date__c from Company_Incidents__c where Id in:incidentID and Email_Trigger__c!='Updated' order by company__r.Test_Manager__r.email,company__r.name,Open_Date__c];
       Map<String, List<Company_Incidents__c>> result = new Map<String, List<Company_Incidents__c>>();
    for (Company_Incidents__c p : incList) {
      String email = p.company__r.Supplier_Manager__r.email;
      if(null != email){
          List<Company_Incidents__c> list1 = result.get(email);
          if (list1 == null) {
              list1 = new List<Company_Incidents__c>();
              result.put(email, list1);
          }
          list1.add(p);
      }
    }         
         for(String emailKey : result.keySet()){
           List<Company_Incidents__c> childList = result.get(emailKey);
          if(childList != NULL && childList.size() > 0){
            List<Messaging.SingleEmailMessage> mails = new List<Messaging.SingleEmailMessage>();
            Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        
            String Content = AutoNotification.IntimateSMO(childList);
            mail.setHtmlBody(Content);
            mail.setPlainTextBody(Content);
            mail.setSaveAsActivity(false);
            mail.setSubject('SupplierForce Incident Notification');
            for(OrgWideEmailAddress owa : [select id, Address, DisplayName from OrgWideEmailAddress]) {
                if(owa.DisplayName.contains('ERM Salesforce Compliance')){
                    mail.setOrgWideEmailAddressId(owa.id); 
                }
            }            
            List<String> toAddress = new List<String>();
             toAddress.add(emailKey);
            mail.setToAddresses(toAddress);
            mails.add(mail);
            Messaging.SendEmailResult[] resultMail =    Messaging.sendEmail(mails, false);
           }
       }        
       List<IncidentsEmail__c> incidentsCreatedOrUpdatedList1 = [select id,Name,IncidentCreatedDate__c,EmailStatus__c from IncidentsEmail__c where IncidentCreatedDate__c =: todaysDate and EmailStatus__c!='Sent'];
       for(IncidentsEmail__c incidentsEmail :incidentsCreatedOrUpdatedList1){
        incidentsEmail.EmailStatus__c = 'Sent';
        emailRecordsToUpdate.add(incidentsEmail);
       }
       System.debug('emailRecordsToUpdate::'+emailRecordsToUpdate);
       update emailRecordsToUpdate;
    }catch(Exception e){
        String recipientAddress = 'suneetha.konda@fmr.com';
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        String textbody = 'There has been an error while processing the service manager job from SMIncidents class';
        String textSubject = 'Job error';
        String[] toAddresses = new String[] {recipientAddress};
        mail.setOrgWideEmailAddressId('xxxxxxxxxxxxxxx');
        mail.setToAddresses(toAddresses);
        mail.setSubject(textSubject);        
        mail.setPlainTextBody(textbody);
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail }); 
    }
   
    }
 }
The lines in bold are not getting covered.Have achieved 39% and need to make it 75%.

Thanks for any help in Advance!
 
If i have an inline style on a dependent picklist (InputField) it gets lost - so i do have read some post here and there but there is no solution to this? How hard is it for salesforce to append the newly created select box with the mentioned style when they are creating it anyways new ! Whaaat?!
  • October 18, 2016
  • Like
  • 0
Hi,

is it possible to change the fields that are visible on the user settings component in the User Settings page in the Napili Community?

Thx
  • October 13, 2016
  • Like
  • 0
I attempted to create a site.com site using the builder within the community, which was a simple HTML page with text and a couple videos, but wasn't able to drop this into my Community (I want to be able to click on the Navigation Menu and have the first tab take me to a static page).  After speaking with SF support, they suggested I try a Visualforce page instead.  I've created the VF page and made it available to the community profile, but I'm still not able to access it in the Community BUilder.  Can anyone assist?

Hi All,

I am in middle of a trailhead challenge related to Security.
I had created 3 profiles cloning the profile with Salesforce license but I am unable to assign users to them as names doesn't appear with the available license type on user creation page.
Any idea how to create 3 profiles cloning the profile which has all object level access and I would be able to assign users to that.
 

Is this happening to you? You're 100% sure you've done a Trailhead challenge right, but it just won't validate?

So here's the deal. We're doing a real-time API call to check your work, and sometimes, there might be existing configuration or code in your Developer Edition that interferes with our check, causing it to fail.

The best thing to do if you're 100% sure you're right is create a new Developer Edition and do the challenge again.

But wait, what about my badges?

No worries! Logging into Trailhead is a two-step process. Check out this image.

The login button is in the upper right, and the second login is on the unit page right before you do the challenge

In step (1), you tell Trailhead who you are. This is where your badges are stored. You can use your production username or any Developer Edition username for this step.

In step (2), you tell Trailhead where you're doing the challenge. This must be a Developer Edition.

Okay, I got the new DE. Now what?

So, just stay logged in at (1), and make a new Developer Edition to log in at (2). Do the challenge in the new Developer Edition and check it.

If it passes, it was probably something funky in your old DE. If it fails, time to revisit your challenge! Read the instructions again and make sure you didn't miss any steps.

But why would this happen?

It could be your DE is older, or it could be you've done some additional config or customization that is interfering with our check. 

Good luck!
Hello everybody , hope you are doing fine
I tried to do the some of this tutorial : https://blog.internetcreations.com/2012/09/creating-a-geolocation-trigger-in-salesforce-winter-13/
but I get an error :  Erreur de compilation : Invalid field Location__Latitude__s for SObject Account à la ligne 4 colonne 15
here is my code :
// Trigger runs getLocation() on Accounts with no Geolocation
  trigger SetGeolocation on Account (after insert, after update) {
         for (Account a : trigger.new)
          if (a.Location__Latitude__s == null)
               LocationCallouts.getLocation(a.id);
   }
I have already created a field name loacation in account
Thank you for your help
best regards
  • March 06, 2015
  • Like
  • 0

Hi All,

I am in middle of a trailhead challenge related to Security.
I had created 3 profiles cloning the profile with Salesforce license but I am unable to assign users to them as names doesn't appear with the available license type on user creation page.
Any idea how to create 3 profiles cloning the profile which has all object level access and I would be able to assign users to that.