• Apex - Learner
  • NEWBIE
  • 35 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
I want to write a trigger to send an email to the account team whenever a task associated with the account has been completed.  I keep receiving an error on line 15.

Initial term of field expression must be a concrete SObject: LIST<AccountTeamMember>

What would be the best way to complete this trigger?

trigger ExecSponsTrig on Task (after insert, after update) {
    
    List<Messaging.SingleEmailMessage> atm = new List<Messaging.SingleEmailMessage>();  
    for(task t : Trigger.new){
        
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();       
        if(t.Status == 'Completed' && t.Type == 'Executive Call') {
            
            List<AccountTeamMember> recips = new List<AccountTeamMember>(
                [SELECT UserId 
                 FROM AccountTeamMember 
                 WHERE AccountId = :t.AccountId]);
            
            for(Id rid : recips){
                mail.setTargetObjectId(recips.Id);
                
            }
        }
        
        atm.add(mail);
    }
}




Hello everyone!

I am trying to create a Custom Auth Provider by creating a class that implements Auth.AuthProviderPlugin. I just copied the example shown in the documentation for the API 38, the one I am using, and I tried following the guide at https://help.salesforce.com/articleView?id=sso_provider_plugin_custom.htm&language=en_US&type=0 . 

Unfortunately, when I was creating the Auth Provider in SalesForce, I received the following error:

'Custom Metadata Type is either invalid or null . Check the returned type for getCustomMetadataType() method'
I have tried using different kinds of return values ('CustomSSO__mdt', 'CustomSSO'...) for getCustomMetadataType() and I have checked thoroughly that the Custom Metadata Type exists and the API Name is the one used in getCustomMetadataType().

I have ended up with just this code as the provider plugin, trying to remove as much as I could from the given example, ending up just with the basic skeleton for the plugin:

global class CustomSSOProviderPlugin implements Auth.AuthProviderPlugin {  
    
               global String getCustomMetadataType() {
                   return 'CustomSSO__mdt';
               }
       
               global PageReference initiate(Map<string,string> authProviderConfiguration, String stateToPropagate) {
                   return null;
                }
        
               global Auth.AuthProviderTokenResponse handleCallback(Map<string,string> authProviderConfiguration, Auth.AuthProviderCallbackState state ) {
                   return null;
                }
    
    
                 global Auth.UserData  getUserInfo(Map<string,string> authProviderConfiguration, Auth.AuthProviderTokenResponse response) { 
					return null;             
                 }
                
                global String getTokenValueFromResponse(String response, String token, String ns) {
					return null;
                }  
    
}
I'm pretty sure that I've followed the guide on the SalesForce docs properly, but I can't get past this one error.
 
User-added image

If anyone has any idea of how can this solved, help would be very appreciated!

Thanks in advance!


 

Hey,

i am currently working on community registration via Facebook.
From a VF-Page i call the following:

String ssoUrl = Auth.AuthConfiguration.getAuthProviderSsoUrl(communityBaseUrl, successRelay, authProviderDeveloperName);

The Registration Helper itself is doing what i should, but i have got a requirement that i can't get to work. A variable should be passed to the registration handler. The VF-Page holds a Boolean thats true or false depending on the users input on the Page. I need this variable inside the Registration Handler to assign it to a field of an object that is created within the Handler.

Something like this (within the Handler)  isn't working: 
OptIn = Boolean.valueOf(System.currentPageReference().getParameters().get('OptIn'));

Is there any way or workaroung to get this working?

Thanks.
Mathias
  • January 14, 2016
  • Like
  • 0
I have one java based server in tomcat.
I have installed self-signed certificate on that.
Now I have created soap webservice client for that server in salesforce.
Some where I have read that I have to install that certificate in salesforce to complete the call.
So I have export that certificate as .jks   file and trying to install it on salesforce instance.
From
Security Controls>Certificate and Key Management>Import From Keystore.
When I am importing that .jks file at that time I am getting below notification
You've created 0 non-expired certificates out of a limit of 50.
I don’t know what is the meaning of this message.
I need to know what I have to do to install this .jks file.
I am not getting any issue while I am installing .jks file which I have generated from salesforce. It is imported successfully.
 
 
 
 
Hello,

for our community we have uploaded a Digicert Certificate to Salesforce and connected to our domain. Once we open our site, it works for most of the browsers. But not for FireFox and mobile device browsers. We completed the following test:

https://www.digicert.com/help/index.htm?host=success.ressoftware.com

The final check is not good (The server is not sending the required intermediate certificate.) This is all within the Salesforce environment. What is wrong with this certificate? Should we upload another one, or must something be adjusted on the Salesforce server?

Thank you for your response.
I want to write a trigger to send an email to the account team whenever a task associated with the account has been completed.  I keep receiving an error on line 15.

Initial term of field expression must be a concrete SObject: LIST<AccountTeamMember>

What would be the best way to complete this trigger?

trigger ExecSponsTrig on Task (after insert, after update) {
    
    List<Messaging.SingleEmailMessage> atm = new List<Messaging.SingleEmailMessage>();  
    for(task t : Trigger.new){
        
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();       
        if(t.Status == 'Completed' && t.Type == 'Executive Call') {
            
            List<AccountTeamMember> recips = new List<AccountTeamMember>(
                [SELECT UserId 
                 FROM AccountTeamMember 
                 WHERE AccountId = :t.AccountId]);
            
            for(Id rid : recips){
                mail.setTargetObjectId(recips.Id);
                
            }
        }
        
        atm.add(mail);
    }
}




I'm trying to create a list of related ID's to a custom object, Base Elements. I check if the value is null in the SOQL and put in a conditioonal statement checking it again but when I go to add it to the list I get the System.NullPointerException: Attempt to de-reference a null object. I underlined the add statement that is causing the error. Any idea what is going on?

FOR (BMCServiceDesk__BMC_BaseElement__c b : [SELECT BMCServiceDesk__PrimaryClient__c FROM BMCServiceDesk__BMC_BaseElement__c WHERE BMCServiceDesk__PrimaryClient__c!=null ]) {
        system.debug('pc: '+b.BMCServiceDesk__PrimaryClient__c);
        if(b.BMCServiceDesk__PrimaryClient__c!=null){
            system.debug('this is not null!!');
            bepc.add(b.BMCServiceDesk__PrimaryClient__c);
        }
	}


Hi,

I am calling Salesforce Webservice from Soap UI.
I am getting below error in request.

INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session

Soap Request :


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cas="http://soap.sforce.com/schemas/class/CaseWebService">
   <soapenv:Header>
      <cas:AllowFieldTruncationHeader>
         <cas:allowFieldTruncation>0</cas:allowFieldTruncation>
      </cas:AllowFieldTruncationHeader>
      <cas:DebuggingHeader>
         <!--Zero or more repetitions:-->
         <cas:categories>
            <cas:category>All</cas:category>
            <cas:level>INFO</cas:level>
         </cas:categories>
         <cas:debugLevel>NONE</cas:debugLevel>
      </cas:DebuggingHeader>
      <cas:CallOptions>
         <cas:client>0</cas:client>
      </cas:CallOptions>
      <cas:SessionHeader>
         <cas:sessionId>1XjSeaHT9b85DPaCSHzp4RjZ</cas:sessionId>
      </cas:SessionHeader>
   </soapenv:Header>
   <soapenv:Body>
      <cas:CaseParam>
         <cas:cNo>00001024</cas:cNo>
         <cas:cOrigin>Phone</cas:cOrigin>
         <cas:cDescription>Test</cas:cDescription>
         <cas:cSubject>Design issue with mechanical rotor Test</cas:cSubject>
         <cas:cPriority>High</cas:cPriority>
         <cas:cStatus>Working</cas:cStatus>
      </cas:CaseParam>
   </soapenv:Body>
</soapenv:Envelope>
Error :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="http://soap.sforce.com/schemas/class/CaseWebService">
   <soapenv:Body>
      <soapenv:Fault>
         <faultcode>sf:INVALID_SESSION_ID</faultcode>
         <faultstring>INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session</faultstring>
      </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>



  • September 25, 2014
  • Like
  • 0
Hi,

I am getting the error "System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Server was unable to process request. ---> Server Error faultcode=soap:Server faultactor=" when I send data by a SOAP web service to some server.

Does somebody know what can be the possible reasons why this error happen?

Regards
Oscar Becerra