• AichaSF
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 50
    Questions
  • 10
    Replies
Hello,
I received this message by inserting an email in the EmailMessage subject.
User-added image
Have you found a solution to work around this problem. I tried to detect the event in a trigger before insert in the EmailMessage object, but no event is detected. Thank you in advance.
I receive this error when I try to execute the trigger to lunch a flow:
This error occurred when the flow tried to update records: UNKNOWN_EXCEPTION: An unexpected error occurred. Please include this ErrorId if you contact support: 1480477384-19356 (1531461387). You can look up ExceptionCode values in the SOAP API Developer Guide.|FlowRecordUpdate|updateScheduleLine

Can someone help me
Good morning all,
I need to display the announcement action in chatter (group standards) (see cap1)User-added image.
I added the button, it is displayed for new groups (see cap2) created but not for standard views.
User-added image
Can someone help me.
Hello,
I am preparing for the certification Dev1, can someone give me examples of the last exams?

Thank you in advance.
 
Hello everyone,
I need to integrate Azure AD with Salesforce. Can you give me the steps and if after the configuration, the CRM administrator can still disable the CRM user without going through the AD?

Thank you in advance.
Hello,

I have an insert in an object A (with two dates). After the insertion of the object A, an insertion of an object B will be done in such a way that:
- The number of records inserted is equal to the number of months between the two dates.
- The field Name of the object B is equal Month name + Year.

Can someone help me.
Hello, 

How can I configure bccAddress on Messaging.inboundEmail.
Thank you

Hello,
I have a question, email tracking is functional for group emails?
Thank you in advance.
Hello, 

How can I convert Lead to only Opportunity. (but not Account and Contact) with apex
Hello,
I want to encore values from Salesforce fields.
My code is:
request.setBody('{"Type_R_clamation__c":"'+EncodingUtil.urlEncode(Type_R_clamation, 'UTF-8')+'"}');
As response I got:
"Motif_R_clamation__c":"Casse+%28non+d%C3%A9tect%C3%A9e+%C3%A0+la+remise+colis%29",
Can someone help me

 
Hello,
 have a Salesforce webservice Post to an external environment. I need to send a list of fields:
request.setBody('{"AccountId"    : +AvisQm.AccountId ,"Actions_men_es__c" : +AvisQm.Actions_men_es__c,"Annulation_Commande__c": +AvisQm.Annulation_Commande__c, "Cause__c" : +AvisQm.Cause__c ,"ContactId": +AvisQm.ContactId ,"Description" : +AvisQm.Description, "Email__c" : +AvisQm.Email__c,"Montant_de_l_avoir__c": +AvisQm.Montant_de_l_avoir__c, "Montant_de_la_refacturation__c" }');
     
On the other side, I do not receive anything.
Can you help me.
Thank you
Hello, 
I am a beginner and I need to create a Post web serice which, when creating a Case in saleforce, the webservice allows the creation of the same Case in another environment (some fields will be saved in the new environment).
Thank you in advance.
Hello, 
I want to transale lightning button label.
Can some on help me.
Hello, I have a visualforce page:
<apex:page lightningStylesheets="true"   standardController="Contact" extensions="LCN01_ContactFoundCTI" action="{!LCN01_ContactFoundCTI1}"> 
</apex:page>
Below its apex class:
public with sharing class LCN01_ContactFoundCTI{
    String conId;
    String stdcon;
    String phone;
    public Contact con {get;set;}
    
 public LCN01_ContactFoundCTI(ApexPages.StandardController stdcon) {
        phone = ApexPages.CurrentPage().getParameters().get('phone');
     system.debug('phone '+phone);
        if (conId != null && conId != '') // if id is in url means record is for edit 
            con = (Contact) stdcon.getRecord();
        else // else you r gonna create new record
            con = new Contact();
    }
         
    public PageReference LCN01_ContactFoundCTI1(){
        string contactphone;
        string contid;
        string decode;
      
        String phone = System.currentPageReference().getParameters().get('phone');
        string UrlGeodis = label.LABS_SF_UrlGeodis;
        string UrlContactNonExistant = label.LABS_SF_LCUrlContactNonExistant;
		 String strAssumptionFloodOnlyUrl;
        system.debug('phone  '+phone);
         try {           
            contactphone= '+' +phone;           
            contactphone= contactphone.replaceAll( '\\s+', '');
            system.debug('phone2 '+contactphone);
            //Recupetation Contact Id
            list<Contact> cont = [SELECT id, Name from Contact where Phone = :contactphone or MobilePhone= :contactphone  ];  
              list<Delegue__c> Deleguee = [SELECT id, Name from Delegue__c where Telephone__c = :contactphone  ]; 
            string today = date.today().format();
            system.debug('cont  '+cont.size());
            system.debug('Deleguee  '+Deleguee.size());
			
            if (cont != null &&  cont.size() == 1 && Deleguee.size() == 0)
            {
              
               task tache = new task(); 
                tache.OwnerId= UserInfo.getUserId() ;
                tache.Subject = 'Appel Entrant ' +today;
                tache.WhoId	= cont[0].id; 
                contid = cont[0].id; 
                system.debug('contact existant');
                insert tache; 
                system.debug('tache id  '+tache.id);
                
		        strAssumptionFloodOnlyUrl =UrlGeodis + '/r/Contact/'+contid+'/view';
            } 
            else if (Deleguee != null &&  Deleguee.size() == 1 && cont.size() == 0)
            {
               
				task tache = new task(); 
                tache.OwnerId= UserInfo.getUserId() ;
                tache.Subject = 'Appel Entrant ' +today;
                tache.WhoId	= Deleguee[0].id; 
                contid = Deleguee[0].id; 
                system.debug('Deleguee existant');   
              	
	           strAssumptionFloodOnlyUrl =UrlGeodis + '/r/Delegue__c/'+contid+'/view';
				
            } 
             else if (Deleguee.size() == 0 && cont.size() == 0) {
                   system.debug('ContactNotFound');
                 strAssumptionFloodOnlyUrl= UrlContactNonExistant;
                         }
		   // si il y a plusieurs contacts ou plusieurs délégués
            else  {
                system.debug('plusieurscontacts');
                //decode   
                string decode1 ='{"componentDef":"forceSearch:searchPage","attributes":{"term":"' +phone+'","scopeMap":';
                string decode2 ='{"resultsCmp":"forceSearch:resultsTopResults","label":"Principaux résultats","type":"TOP_RESULTS","cacheable":"Y","id":"TOP_RESULTS","labelPlural":"Principaux résultats"}}}';
                
                Decode = decode1 +    decode2 ;
                system.debug('Decode '+Decode); 
                
                // create a blob from our parameter value before we send it as part of the url
                Blob beforeblob = Blob.valueOf(Decode);                
                // base64 encode the blob that contains our url param value
                string paramvalue = EncodingUtil.base64Encode(beforeblob);
                system.debug('paramvalue  '+paramvalue);
                // print out the encoded value to the debug log so we can see it before/after base64 encode
                System.debug(Decode + ' is now encoded as: ' + paramvalue);                    
               
               string Searchlabel = label.LABS_SF_Global_Search +paramvalue ;
			   strAssumptionFloodOnlyUrl= label.LABS_SF_Global_Search +paramvalue ;
               contid =  Searchlabel;              
            }				 
		          
          PageReference newFloodOnlyUrl = new PageReference(strAssumptionFloodOnlyUrl);
          newFloodOnlyUrl.setRedirect(true);
          return newFloodOnlyUrl;          
            
        }
        catch(Exception ex){ 
        system.debug('erreur  '+ex);         
        return null;          
            
        }
    }
   
 
}
I created a test class but it does not cover the class:
@isTest
public class LCN01_ContactFoundCTITest {
    public static testMethod void testContact() {   
        test.startTest();
          PageReference pageRef = Page.VF01_ContactFoundCTI;
          Account acc = new Account(Name='Abce');
          insert acc;
          
          Contact  testContact = new Contact();
          testContact.lastname='testcontact';
          testContact.AccountId=acc.id;
          testContact.phone='+33612345690';
          
           insert testContact;
           Test.setCurrentPage(pageRef);
           pageRef.getParameters().put('id',testContact.id);
           ApexPages.StandardController sc = new ApexPages.standardController(testContact);
           LCN01_ContactFoundCTI  controller = new LCN01_ContactFoundCTI(sc);
         
   
                
       test.stopTest();
        

}
    
}


Can someone help me?
Hello,

I have a visualforce page that contains a button and I need to put the hidden button and execute the action of the button at the opening of the page.

Can someone help me.
Hello, 

I have a lightning component that retrieves a phone parameter from the URL:
https:/XXXXX/lightning/cmp/c__LC01_ContactFoundCTI?telephone=+3312345

My Cmp code:
 
<aura:component controller="LCN01_ContactFoundCTI" implements="lightning:isUrlAddressable" access="global">

    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="telephone" type="String" />

    <aura:attribute name="ContactNum" type="Decimal" /> 
    <aura:attribute name="erreur" type="String" />
    <aura:attribute name="show" type="boolean" default="true" />
	
    <div class="slds-modal__header">
     <aura:if isTrue="{!v.show}">
	<h2 class="slds-text-heading--medium" >Recherche de Contact en cours</h2>
     </aura:if> 
	<h2 class="slds-text-heading--medium" >phone = {!v.pageReference.state.telephone}</h2>     

    <h2 class="slds-text-heading--medium " > {!v.erreur}</h2>
</div>  
</aura:component>
The test does not recover the phone.

Can someone help me.
How can I block double clicks on my visualforce page?
I use this function

   <div id="jRateSmiley" style="margin:auto;text-align:center"></div>
$jquery("#jRateSmiley").jRateSmiley({
                                                startColor: 'orange',
                                                endColor: '#62EC8B',
                                                precision : 1,
                                                rating : defaultValue,
                                                count : 3,
                                                shape : 'STAR',
                                                readOnly : {!isReadOnly},
                                                onChange: function(rating) {
                                                    //var theValue = (rating*2);
                                                    var theValue = (rating);
                                                    // Remplace le texte
                                                    replaceText(theValue);
                                                },
                                                onSet: function(rating) {
                                                    //var theValue = (rating*2);
                                                    var theValue = (rating);                        
                                                    // Appel côté contrôleur
                                                    editSatisfaction(theValue);
                                                }
                                            });                                 
                                            
                                        }
                                        
                                        function replaceText(theValue){
                                            var theLabel = '{!$Label.Labs_Sf_Your_Rating_Label}';
                                            theLabel = theLabel.replace('#',theValue );
                                            $jquery('#onchange-value').text(theLabel);
                                        }
                                        
Hello,
I'm working
with Salesforce lightining. I created a lightninig component that takes a phone number as a parameter and searches the contact list. the need is that when I find more than one contact I display the global salesforce search and having as parameter the phone number.
Can someone help me.
Hello, 

Can someone tell me if there is Salesforce Connector  for MuleSoft that is compatible with vesrion 45.0 of Salesforce.

Thank you.

Hello,
I used the monthbetween method to calculate the number of months between two dates and to create, from the contract, a task if the number of months between the end of the contract and today is equal to 3 (batch).
The problem is that I have a contract whose end date s 17/07/2019. at each batch launch I have a task that is created (as it does not take into account the day j).
Hello,
 have a Salesforce webservice Post to an external environment. I need to send a list of fields:
request.setBody('{"AccountId"    : +AvisQm.AccountId ,"Actions_men_es__c" : +AvisQm.Actions_men_es__c,"Annulation_Commande__c": +AvisQm.Annulation_Commande__c, "Cause__c" : +AvisQm.Cause__c ,"ContactId": +AvisQm.ContactId ,"Description" : +AvisQm.Description, "Email__c" : +AvisQm.Email__c,"Montant_de_l_avoir__c": +AvisQm.Montant_de_l_avoir__c, "Montant_de_la_refacturation__c" }');
     
On the other side, I do not receive anything.
Can you help me.
Thank you
Hello, 

Can someone tell me if there is Salesforce Connector  for MuleSoft that is compatible with vesrion 45.0 of Salesforce.

Thank you.
Hello,
I need to display a default value in my 'Stage' field in the opportunity creation form.
The field is mandatory at creation so the WF and PB do not work.

Do you have any ideas.
  • September 11, 2018
  • Like
  • 0
Hello,
I have a search box in my visualforce page and I want to add a control on the search history. The idea is to automatically delete the search history.
  <input type="text" id="myInput" placeholder="Rechercher" style="margin-bottom : 5px;width:100%"/>

Any help please.
  • September 03, 2018
  • Like
  • 0
Hello everyone, 

I have commandButton in my visualforce page that retrieves the id in a search box, searches for an object, and modifies the object founded.

I need to display an error message if the id does not exist or the object is already updated?
Any Help please.
Hello, 
I created this class 
public class LNC01_Opp_Bonlivraison {    
    @AuraEnabled
    public static String getAccountWeather(Id oppid) {
        try {
            //Recupetation Opportunity Id
            Opportunity opp = [SELECT id, AccountId, createddate, OwnerId, Traitement_Fiscal__c,Pricebook2Id FROM Opportunity WHERE Id=:oppid];           
            system.debug('oppid  '+opp.id);
            
            //Recuperation de type de transaction Bon de livraison
            s2cor__Sage_INV_Trade_Document_Type__c typetransaction = [select id from s2cor__Sage_INV_Trade_Document_Type__c where name = :label.LNC_BonLivraison];
            if (opp != null || Test.isRunningTest())
            { //Creation Nouvelle transaction
               s2cor__Sage_INV_Trade_Document__c Newtransaction = new s2cor__Sage_INV_Trade_Document__c();
            Date myDate = date.newinstance(opp.createddate.year(), opp.createddate.month(), opp.createddate.day());
            
            Newtransaction.s2cor__Account__c= opp.AccountId;
            Newtransaction.Opportunite__c= oppid;
            Newtransaction.s2cor__Date__c= myDate;
            Newtransaction.OwnerId= opp.OwnerId;            
            Newtransaction.s2cor__Tax_Treatment__c= opp.Traitement_Fiscal__c;       
            Newtransaction.s2cor__Trade_Document_Type__c= typetransaction.id;         
            Newtransaction.s2cor__Price_Book__c = opp.Pricebook2Id;          
                
            
            insert Newtransaction; 
            
            system.debug('Newtransaction  '+Newtransaction.id);
            
            //Creation nouvelles lignes de transaction             
            List<OpportunityLineItem> Opplineitem = [select id,Product2Id,Quantity,Dimension_Tag_Analytique__c,Dimension_Tag_budget__c,Dimension_Tag_BUDGET1__c,Dimension_Tag_BUDGET2__c
                                                     from OpportunityLineItem where OpportunityId= :opp.id];
            system.debug('Opplineitemsize  '+Opplineitem.size()); 
            
            id Product_Tag = NULL;
            
            list <s2cor__Sage_INV_Trade_Document_Item__c> listtransactionlinetoupdate = new list <s2cor__Sage_INV_Trade_Document_Item__c>();
            for (OpportunityLineItem  Opplineit : Opplineitem){
                
                s2cor__Sage_INV_Trade_Document_Item__c transactionlinetoupdate = new s2cor__Sage_INV_Trade_Document_Item__c();
                transactionlinetoupdate.s2cor__Trade_Document__c= Newtransaction.id;
                transactionlinetoupdate.s2cor__Product__c=  Opplineit.Product2Id;
                transactionlinetoupdate.s2cor__Quantity__c = Opplineit.Quantity;              
                listtransactionlinetoupdate.add(transactionlinetoupdate);
                 }
            
             system.debug('listtransacsizetionlinetoupdate  '+listtransactionlinetoupdate.size()); 
            insert listtransactionlinetoupdate;
              	
        } 
            return '{"succes": "}'; 
            }catch(Exception ex){
             system.debug('Exception  '+ex); 
            return '{"error": "}';
        }
    }
}

and her test class: 
@istest
public class LNC01_Opp_Bonlivraison_Test {
static testMethod void theTests(){
Opportunity Opp = new Opportunity();
Opp.name = 'testopp1';
Opp.StageName = '1 Pre-Qualified'; 
Opp.CloseDate= system.today();
Opp.AccountId = '001D0000024cW2MIAU';   
insert Opp;   
LNC01_Opp_Bonlivraison.getAccountWeather(Opp.id);
}    
}

I have this error when running test class: 
Exception  System.QueryException: List has no rows for assignment to SObject
 
Hello, 
I have quick action - lightning component and I want to control width popup.
Can someone help me.
Hello,
Hello, I'm working on the lightning version. I have lightning component opened by quick action.
The component displays the form for creating an object (X) from an opportunity.
The idea is to select the opportunity and the account linked to this opportunity and pass them directly into the object creation form (X). Do you have an idea?
Hello everyone,
I have a URL button in my Opportunity object (Lightning version),  that opens the form for Task creating. I need to pass parameters from the opportunity to the Task (such as the account linked to the opportunity, the contact ..).
Can you help me.