• dandamudi
  • NEWBIE
  • 90 Points
  • Member since 2016

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 39
    Replies
I want to show a popup alert on my customer community when an platform event published. But the sample code which I tried as per the lwc component library it's working internally but it's not working on community.
Hi Everyone this is my trigger i want to write test class for this so please help me i tried but not accomplish my requirement code coverge approx 75%



trigger Distributor on Account (before insert) {
    
String role;   
String owner;
    
  list<Account> changeOwner=new list<Account>();
    
    for(Account acc:trigger.new){
        
       if(acc.Under__c=='Chhattisgarh'){
           role=' CG';
          changeOwner.add(acc);
       }
      
       else if(acc.Under__c=='Bihar'){
           role=' BI';
         changeOwner.add(acc);
       }  
        
      else if(acc.Under__c=='Rajasthan') {
           role=' RJ';
           changeOwner.add(acc);
           }  
      else if(acc.Under__c=='Gujarat'){
           role=' GJ';
          changeOwner.add(acc);
           }
        
      else if(acc.Under__c=='Haryana'){
           role=' HR';
         changeOwner.add(acc);
           
       }
        
      else if(acc.Under__c=='Jharkhand'){
           role=' JH';
         changeOwner.add(acc);
       } 
        
      else if(acc.Under__c=='Maharashtra'){
           role=' MH';
         changeOwner.add(acc);
       }
        
       else if(acc.Under__c=='Madhya Pradesh'){
           role=' MP';
         changeOwner.add(acc);
       }  
       else if(acc.Under__c=='Uttar Pradesh'){
           role=' UP';
        changeOwner.add(acc);
       } 
        
   }
    String SOSTR = String.valueOf('SO') + String.valueOf(role);  
    String ASMSTR = String.valueOf('ASM') + String.valueOf(role);
    String DRMSTR = String.valueOf('DRM') + String.valueOf(role);
    String RMSTR = String.valueOf('RM') + String.valueOf(role);


  list <User> socg1=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :SOSTR Order By FirstName,LastName');
  list <User> socg2=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :ASMSTR Order By FirstName,LastName');
  list <User> socg3=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :DRMSTR  Order By FirstName,LastName');
  list <User> socg4=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :RMSTR Order By FirstName,LastName');
  
   if(socg1.size()>0){
        owner=socg1.get(0).id;
    }
    
     else if(socg1.size()<=0){
     
        if(socg2.size()>0){
            owner=socg2.get(0).id; 
        }
        
        else if(socg2.size()<=0){
            
            if(socg3.size()>0){
              owner=socg2.get(0).id;  
             }
        
        else if(socg3.size()<=0){
            
             if(socg4.size()>0) {
               owner=socg4.get(0).id;   
             }   
        }
      }
   }
    
   for(Account acc:changeOwner){
       
        if(socg1!=null){
            acc.OwnerId=Owner;
        }
           
    }
   
}
Hi,

I have opp standard obj and quote is custom(child) object ,  validation should throw  when i change the quote status filed to won if that opportunity had already won Quote.
that means opportunity should have multiple quotes but should not multiple Won Quotes.
I want to show and hide some fields and set some default values for some fields  when i change the stage from qualification to won stage.
what are the possible ways i have?

Thanks in advance
siva
Hi,
i have 3 custom picklist fields on standard account object , 2nd picklist load based on 1st selection and 3rd should be load based on 1 and 2nd in account object lightning details page.

Please throw some suggestions.
THANKS
 issuer still shows production url in identity provider, how to update with my new domain url 
got code coverage only 5% percentage how can i acheive this 75% more , please help me for 75% code coverage
trigger RepCompensation on Compensation__c(before insert, before update) {
for(Compensation__ccc: Trigger.New){
    List<Compensation__c> cclist =[select id,Contract__c,Payment_Amount__c,Payment_Frequency1__c,Frequency_Months__c,Payment_Due_Date__c,Payment_Date_2__c,Payment_Date_3__c,Payment_Date_4__c,Payment_Amount1__c FROM  Compensation__cWHERE id  in : Trigger.New];
    datetime cd = System.today();

  if((cc.Payment_Frequency1__c == 'Annually' || cc.Payment_Frequency1__c == 'One Time') & cc.Payment_Frequency1__c <> Null){
        If(cc.Frequency_Months__c <> Null && cc.Payment_Due_Date__c == Null){
      if(cc.Frequency_Months__c == 'January'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),01,01);
      }
        if(cc.Frequency_Months__c == 'February'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),02,01);
      }
        if(cc.Frequency_Months__c == 'March'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),03,01);
      }
        if(cc.Frequency_Months__c == 'April'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),04,01);
      }
        if(cc.Frequency_Months__c == 'May'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),05,01);
      }
        if(cc.Frequency_Months__c == 'June'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),06,01);
      }
        if(cc.Frequency_Months__c == 'July'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),07,01);
      }
        if(cc.Frequency_Months__c == 'August'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),08,01);
      }
        if(cc.Frequency_Months__c == 'September'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),09,01);
      }
        if(cc.Frequency_Months__c == 'October'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),10,01);
      }
        if(cc.Frequency_Months__c == 'November'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),11,01);
      }
        if(cc.Frequency_Months__c == 'December'){
      cc.Payment_Due_Date__c = date.newinstance(cd.year(),12,01);
      }
    }
    }

test class

@isTest
public class TestRepCompensation{
    
    public static testmethod void test1(){
        datetime cd = System.today();       
        Account a = new Account(Name = 'Test Account', Account_Type__c = 'Agency', Hierarchy_1__c = 'Growth', Hierarchy_2__c = 'Growth Miscellaneous',
                    Hierarchy_3__c = 'Growth Miscellaneous', Picklist_Category__c = 'Medical');
        insert a;
        Contract c = new Contract(Status = 'Proposed/pending',Contract_Expiration_Date__c = date.newinstance(2017,03,01), AccountId = a.id,
                     StartDate = date.newinstance(2016,03,01));
        insert c;
       Compensation__c cc1 = new Compensation__c(Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'January',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),01,01));
        insert cc1;
        Compensation__c cc2 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'February',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),02,01));
        insert cc2;
        Compensation__c cc3 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'March',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),03,01));
        insert cc3;
        Compensation__c cc4 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'April',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),04,01));
        insert cc4;
        Compensation__c cc5 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'May',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),05,01));
        insert cc5;
        Compensation__c cc6 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'June',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),06,01));
        insert cc6;
        Compensation__c cc7 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'July',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),07,01));
        insert cc7;
        Compensation__c cc8 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'August',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),08,01));
        insert cc8;
        Compensation__c cc9 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'September',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),09,01));
        insert cc9;
        Compensation__c cc10 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'October',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),10,01));
        insert cc10;
        Compensation__c cc11 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'November',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),11,01));
        insert cc11;
        Compensation__c cc12 = new Compensation__c (Payment_Amount__c = 1000.00,Payment_Frequency1__c = 'Annually',
                                          Frequency_Months__c = 'December',Contract__c = c.id, Payment_Amount1__c = 1000.00,Payment_Due_Date__c = date.newinstance(cd.year(),12,01));
        insert cc12;
        System.assert(cc12.Payment_Amount1__c==1000.00 );
Hi,
i need help.
i am very new to lighting development , i want to search page on my custom object, all search fields are mandatory, after i entered all details it shows results grid in below, if i have only one record it should show a modal pop up with that record(like confirm mesaage -- is looking for this record) ifi click yes it 'll redirect to detail page

Thank you 
 
I want to show a popup alert on my customer community when an platform event published. But the sample code which I tried as per the lwc component library it's working internally but it's not working on community.
Hi All,

I have a lightning component on a stanalone app which is a input form for creating a new record. But somehow it is not saving the record as expected.

component:
<aura:component controller="CreateCarRecord" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="newCar" type="Car__c"
     default="{ 'sobjectType': 'Car__c',
                     'Name': '',
                     'Build_Year__c': '',
                     'Mileage__c': '',
                      'Available_For_Rent__c': '',
                   }"/>

    
    
        <lightning:layout>
            <lightning:layoutItem size="4" padding="around-small">
              <lightning:input aura:id="carField" type="text" value="{!v.newCar.Name}" Name="Name" label ="Car Name"/>
       <lightning:input aura:id="carField" type="number" name="Build Year" label="Build Year"  value="{!v.newCar.Build_Year__c}" />
                 <lightning:input aura:id="carField" type="number"  value="{!v.newCar.Mileage__c}"  Name="Mileage" label="Mileage"/>
        <lightning:input aura:id="carField" type="checkbox"  value="{!v.newCar.Available_For_Rent__c}"  Name="Available" label="Available"/>
        
        <lightning:button aura:id="carField" label="Save Car" onclick="{!c.saveCar}"/>
            </lightning:layoutItem>
            </lightning:layout>
</aura:component>

controller:
({
	saveCar :  function(component, event) {
    var newAcc = component.get("v.newCar");
    var action = component.get("c.save");
    action.setParams({ 
        "con": newAcc
    });
    action.setCallback(this, function(a) {
           var state = a.getState();
        console.log("state--" +state);
            if (state === "SUCCESS") {
                var name = a.getReturnValue();
               alert("hello from here"+name);
            }else{
                alert("nothing");
            }
        });
    $A.enqueueAction(action)
}
})

Apex:
public class CreateCarRecord {

  
    @AuraEnabled
    public static Car__c save(Car__c con)
    {
     insert con;
        return con;
    }
}

​​​​​​​​​​​​​​
I have a lightning component with aura iteration. i want to dspaly only up to 5 records in the boxes.
variable 'FslFromBox' is having around 70 records here. and i am displaying this in one single div box. In this box, i want only 5 records to be shown. rest of the records(after 5 iterations) should not be shown on the box.
how to achieve this?

Code is below.
<aura:attribute name="FslFromBox" type="list"/>
<div style="background-color:#1589ee" class="slds-col slds-size_3-of-12 fslContainer">
                <div class="userName">
                    <aura:iteration items="{!v.FslFromBox}" var="FslFromBox" indexVar="int">

                            <aura:if isTrue="{!and((FslFromBox.ASQ_12MM__c ge 30),(FslFromBox.ASQ_Close_Rate__c ge 0),(FslFromBox.ASQ_Close_Rate__c lt 10))}">
                             <div class="demo-only">
                                    <span>
                                        <lightning:formattedText value="{!FslFromBox.User__r.Name}"/></span>    
                                </div>
                            </aura:if>
                    </aura:iteration>
                </div>
</div>

 

Having issues with below code: Error not showing up on lightning component

If (ownerUser != null){
            AuraHandledException e = new AuraHandledException('The application is already with team');
               e.setMessage('The application is already with team');
               system.debug(e);
            //catch(AuraHandledException e){
            throw e;
            //}
            //throw new AuraHandledException('The application is already with team');
        }

Hi Everyone this is my trigger i want to write test class for this so please help me i tried but not accomplish my requirement code coverge approx 75%



trigger Distributor on Account (before insert) {
    
String role;   
String owner;
    
  list<Account> changeOwner=new list<Account>();
    
    for(Account acc:trigger.new){
        
       if(acc.Under__c=='Chhattisgarh'){
           role=' CG';
          changeOwner.add(acc);
       }
      
       else if(acc.Under__c=='Bihar'){
           role=' BI';
         changeOwner.add(acc);
       }  
        
      else if(acc.Under__c=='Rajasthan') {
           role=' RJ';
           changeOwner.add(acc);
           }  
      else if(acc.Under__c=='Gujarat'){
           role=' GJ';
          changeOwner.add(acc);
           }
        
      else if(acc.Under__c=='Haryana'){
           role=' HR';
         changeOwner.add(acc);
           
       }
        
      else if(acc.Under__c=='Jharkhand'){
           role=' JH';
         changeOwner.add(acc);
       } 
        
      else if(acc.Under__c=='Maharashtra'){
           role=' MH';
         changeOwner.add(acc);
       }
        
       else if(acc.Under__c=='Madhya Pradesh'){
           role=' MP';
         changeOwner.add(acc);
       }  
       else if(acc.Under__c=='Uttar Pradesh'){
           role=' UP';
        changeOwner.add(acc);
       } 
        
   }
    String SOSTR = String.valueOf('SO') + String.valueOf(role);  
    String ASMSTR = String.valueOf('ASM') + String.valueOf(role);
    String DRMSTR = String.valueOf('DRM') + String.valueOf(role);
    String RMSTR = String.valueOf('RM') + String.valueOf(role);


  list <User> socg1=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :SOSTR Order By FirstName,LastName');
  list <User> socg2=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :ASMSTR Order By FirstName,LastName');
  list <User> socg3=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :DRMSTR  Order By FirstName,LastName');
  list <User> socg4=Database.query('SELECT Id,Name FROM User WHERE UserRole.Name = :RMSTR Order By FirstName,LastName');
  
   if(socg1.size()>0){
        owner=socg1.get(0).id;
    }
    
     else if(socg1.size()<=0){
     
        if(socg2.size()>0){
            owner=socg2.get(0).id; 
        }
        
        else if(socg2.size()<=0){
            
            if(socg3.size()>0){
              owner=socg2.get(0).id;  
             }
        
        else if(socg3.size()<=0){
            
             if(socg4.size()>0) {
               owner=socg4.get(0).id;   
             }   
        }
      }
   }
    
   for(Account acc:changeOwner){
       
        if(socg1!=null){
            acc.OwnerId=Owner;
        }
           
    }
   
}
I'm getting a 'variable does not exist' error but it is in the wrapper class so i'm not sure what I'm doing wrong, please could you help with the test class code so I can deploy? Thanks

Wrapper Class:
public class WrapperSarah{ 

    public Consolidated_Invoicing__c consinvs;
    public WrapperSarah(ApexPages.StandardController stdController) {
       this.consinvs = (Consolidated_Invoicing__c)stdController.getRecord();
       WrapperSarah wrp = new WrapperSarah();
    }
    Id recordId;
    public List<Consolidated_Invoicing__c> consolidatedInvoiceList { get; set; }
    public List<Invoice__c> invoiceList { get; set; }
    public Map<Id, List<Invoice__c>> coninvIdinvListMap { get ; set; }
    Set<Id> invoiceIds = new Set<Id>();
    Id Consolidated_InvoiceId = ApexPages.currentPage().getParameters().get('consId');
    Map<Id, Consolidated_Invoicing__c> memberMap = new Map<Id, Consolidated_Invoicing__c>();
    public List<ConsolidatedInvoiceWrapperSarah> consolidatedInvoiceWrapperSarahList { get; set; }
    
    public WrapperSarah() {   
      consolidatedInvoiceList = [SELECT  Total__c, Name FROM Consolidated_Invoicing__c 
    Where Id =: ApexPages.currentPage().getParameters().get('id')];
        coninvIdinvListMap = new Map<Id, List<Invoice__c>>();
        consolidatedInvoiceWrapperSarahList = new List<ConsolidatedInvoiceWrapperSarah>();
        if(consolidatedInvoiceList.size() > 0) {
            for (Consolidated_Invoicing__c cons: consolidatedInvoiceList) {
            invoiceIds.add(cons.Id);
            memberMap.put(cons.Id, cons);
            }
          invoiceList = [SELECT Name, Consolidated_Invoice__c, Patient_Name__c, PatientNameString__c,  Hospital_Treated__c, Policy_Number__c, Consultant__c, DOB__c, (SELECT Name, Charge_Description__c, Charge_Code__c, Net_Price__c, Gross_Price__c, Line__c, Quantity__c, VAT__c, Date__c FROM Treatments__r) 
                FROM Invoice__c 
                WHERE Consolidated_Invoice__c IN : invoiceIds];
            system.debug('Invoice List is ' + invoiceList);
        }
        if(invoiceList.size() > 0) {
            for(Invoice__c intrst : invoiceList) {
                if(!coninvIdinvListMap.containsKey(intrst.Consolidated_Invoice__c)){
                    coninvIdinvListMap.put(intrst.Consolidated_Invoice__c, new List<Invoice__c>());
                }
                coninvIdinvListMap.get(intrst.Consolidated_Invoice__c).add(intrst);
            }
            for(Id invoiceId : coninvIdinvListMap.keySet()) {
                consolidatedInvoiceWrapperSarahList.add(new ConsolidatedInvoiceWrapperSarah(memberMap.get(invoiceId), coninvIdinvListMap.get(invoiceId)));
            }
        }        
    }     
    public class ConsolidatedInvoiceWrapperSarah {
        public Consolidated_Invoicing__c consinv { get; set; }
        public List<Invoice__c> invclist { get; set; }        
        public ConsolidatedInvoiceWrapperSarah(Consolidated_Invoicing__c consinv, List<Invoice__c> invclist) {
           this.consinv= consinv;
           this.invclist = invclist;
           
                          
       
        }    
        
      }
      
      
}

Test Class:
 
@IsTest private class TestWrapperSarah {
    @IsTest
       private static void WrapperSarah(){
           
           Consolidated_Invoicing__c ci = new Consolidated_Invoicing__c(status__c='sent');
			insert ci;
           
           string invclist=ci.ID;

           
           Invoice__c ni = new Invoice__c();
           ni.Consolidated_Invoice__c = ci.Id;
           ni.Name = 'Fake';
           insert ni;
           
           Treatment__c nt = new Treatment__c();
           nt.Invoice__c = ni.Id;
           nt.Charge_Code__c = 'Fake Code';
           nt.Date__c = Date.Today();
           nt.Net_Price__c = 100.10;
           insert nt;
           
              Test.StartTest();

     	WrapperSarah co = new WrapperSarah();
      
           
          system.assertEquals(1,WrapperSarah.invclist.size());
           
           Test.stopTest();      
           

     }    
}

 
On this saturday (04/05/2019) the Summer 19' has arrived.
For us arrived with issues...

After the new release enters, in all our Components, related with "User" we receive this error:
Failed to save TestUserError_Deletar.cmp: Invalid definition for null:TestUserErrorController: Field__c, ManagerId FROM User WHERE Id =:UserInfo.getUserId() ^ ERROR at Row:1:Column:74 No such column 'ManagerId' on entity 'User'. 

We try security configuration, try without sharing class.
Only works when we use only custom fields in the query.

Any one face this error?

Thanks !
Create the package version - Step 5
Error Attempt to create unlocked pkg step 5
Following Error:
ERROR:  An unexpected error occurred. Please contact Salesforce Support and provide the following error code: 1394095453-59495 (-1373703285).

Anyone know what this is?
DevHub set up; Packaging2 Beta enabled in DevHub; and I have an active GitHub account.
Hi,

I have opp standard obj and quote is custom(child) object ,  validation should throw  when i change the quote status filed to won if that opportunity had already won Quote.
that means opportunity should have multiple quotes but should not multiple Won Quotes.
Hello all,

I tried overriding a standard "New" action on a custom object and it works fine for internal users. However, that makes the "New" button vanish completely in communities. Here's what my component implements:
implements="lightning:actionOverride, forceCommunity:availableForAllPageTypes"
The use case for this is prepopulating some fields on the child record using information retrieved from Apex.

So main question is: are Lightning Component Action Overrides supported in Partner Communities? If so, what could I be doing wrong?

Regards,

Hi All,

I've implemented a trigger on the task object that stamps a last activity date/time onto the lead & contact object whenever a task is created or updated. This has been working great - except it was recently reported to me that any tasks that are created via salesforce for outlook were not receiving the update from the trigger.

So I've poked into it: https://developer.salesforce.com/forums/ForumsMain?id=906F000000095HTIAY and found out that this is the reason why it's being bypassed.

So I updated my trigger to isolate records coming in with a blank who and what Id and sent them over to the @future method - this was working for a bit in my sandbox environment, but then it noticed it stopped pushing the updates as I cleaned up some of my code (cosmetic, not functional). Completing further testing, I see the following:

This is from the trigger:

10:22:18.145 (145723116)|USER_DEBUG|[35]|DEBUG|tasks created with blank Ids: 1

Then this is from the @future handler

10:22:18.043 (43643966)|USER_DEBUG|[43]|DEBUG|entering at future method
10:22:18.043 (43651600)|SYSTEM_METHOD_EXIT|[43]|System.debug(ANY)
10:22:18.046 (46422518)|SOQL_EXECUTE_BEGIN|[49]|Aggregations:0|select Id, WhoId, Prospecting_call_connected__c, Prospecting_call_affirmative__c, SystemModstamp from Task where Id = :tmpVar1
10:22:18.052 (52227113)|SOQL_EXECUTE_END|[49]|Rows:1
10:22:18.052 (52345117)|SYSTEM_METHOD_ENTRY|[52]|LIST<Task>.iterator()
10:22:18.052 (52462775)|SYSTEM_METHOD_EXIT|[52]|LIST<Task>.iterator()
10:22:18.052 (52485423)|SYSTEM_METHOD_ENTRY|[52]|system.ListIterator.hasNext()
10:22:18.052 (52505395)|SYSTEM_METHOD_EXIT|[52]|system.ListIterator.hasNext()
10:22:18.052 (52565994)|SYSTEM_METHOD_ENTRY|[53]|System.debug(ANY)
10:22:18.052 (52587658)|USER_DEBUG|[53]|DEBUG|null

I suspect that what is happening is that Salesforce for Outlook is filling out the who and what Id using an @future method. There's no way to determine or force the run order on @future methods.

Can anyone confirm that this is what occurs or has figured out a solution?