• monika
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
How can I get lightning:dualListbox to show preselected list of values? I've tried what I've seen on developer's blogs but for some reason my right list is always empty. (API v.43)
 
​<aura:attribute name="countryOptions" type="List" default="[
                                                               { label: 'United Kingdom', value: 'GB' },
                                                               { label: 'Netherlands', value: 'NL' }]"/>

<aura:attribute name="existingValues" type="List" default="[ {label: 'United Kingdom', value: 'GB' }]" />

   
<lightning:dualListbox  label= "Select Country"  sourceLabel="Available"  selectedLabel="Selected" 
                                              options="{!v.countryOptions}" 
                                              value="{!v.existingValues}"/>

 
  • August 01, 2018
  • Like
  • 0
Could someone at Trailhed change the api names for external objects. Can't pass this unit because the validation checks for Phone__x object while the data source provides Phones__x.

https://trailhead.salesforce.com/lightning_connect/lightning_connect_setup
https://trailhead.salesforce.com/lightning_connect/lightning_connect_integrate

cheers
  • January 28, 2017
  • Like
  • 0
Hi All,

I have to write test class for the below trigger helper class.  NEED HELP.




public class CableDealHeaderTriggerHandler {
    
    //method to update all related Deal Request
    public static void updateDealRequest(List<Deal_Request_Header__c> drhNewList, Map<id,Deal_Request_Header__c>drhOldMap){
        List<Cable_Deal_Request__c> cdrListUpdate = new List<Cable_Deal_Request__c>();
        
        //Query on Deal Request Header with Inner Query to get all related Deal Request
        List<Deal_Request_Header__c> drhList = [select id,name,Cable_Ownership__c, Cable_Program_Category__c,
                                                Cable_Network__c,Cable_Requested_By__c,Cable_Project_Phase__c,Cable_Program_Type__c,Cable_Genre__c,
                                                Cable_Program_Format__c,Cable_Program_Length__c, Cable_Camera_View__c, Deal_Request_Date__c,
                                                Cable_Submitted_Date__c,
                                                (select id,Cable_Network_Platform__c,Cable_Requesting_Executive__c,Cable_Project_Phase__c,Cable_Ownership__c,
                                                Cable_Program_Type__c,Cable_Program_Category__c,Genre__c,Cable_Program_Format__c,Cable_Program_Length__c,
                                                Cable_Camera_View__c,Deal_Request_Date__c,Cable_Submitted_Date__c from Cable_Deal_Requests__r)
                                                from Deal_Request_Header__c where id in : drhNewList];
        
        //For loop to iterate and check if fields are saved or not                                        
        for(Deal_Request_Header__c drh : drhList){
            if( (drh.Cable_Ownership__c != drhOldMap.get(drh.id).Cable_Ownership__c) || (drh.Cable_Program_Category__c != drhOldMap.get(drh.id).Cable_Program_Category__c) || 
                (drh.Cable_Network__c != drhOldMap.get(drh.id).Cable_Network__c) || (drh.Cable_Requested_By__c != drhOldMap.get(drh.id).Cable_Requested_By__c) ||
                (drh.Cable_Project_Phase__c != drhOldMap.get(drh.id).Cable_Project_Phase__c) || (drh.Cable_Program_Type__c != drhOldMap.get(drh.id).Cable_Program_Type__c) ||
                (drh.Cable_Program_Type__c != drhOldMap.get(drh.id).Cable_Program_Type__c) || (drh.Cable_Genre__c != drhOldMap.get(drh.id).Cable_Genre__c) ||
                (drh.Cable_Program_Format__c != drhOldMap.get(drh.id).Cable_Program_Format__c) || (drh.Cable_Program_Length__c != drhOldMap.get(drh.id).Cable_Program_Length__c) ||
                (drh.Cable_Camera_View__c != drhOldMap.get(drh.id).Cable_Camera_View__c) || (drh.Deal_Request_Date__c != drhOldMap.get(drh.id).Deal_Request_Date__c) ||
                (drh.Cable_Submitted_Date__c != drhOldMap.get(drh.id).Cable_Submitted_Date__c))
            {
                if(drh.Cable_Deal_Requests__r.size()>0){
                    //for loop on related Deal Request
                    for(Cable_Deal_Request__c cdr : drh.Cable_Deal_Requests__r){
                        if(drh.Cable_Network__c != drhOldMap.get(drh.id).Cable_Network__c)
                            cdr.Cable_Network_Platform__c = drh.Cable_Network__c;
                        if(drh.Cable_Requested_By__c != drhOldMap.get(drh.id).Cable_Requested_By__c)
                            cdr.Cable_Requesting_Executive__c = drh.Cable_Requested_By__c;
                        if(drh.Cable_Project_Phase__c != drhOldMap.get(drh.id).Cable_Project_Phase__c)
                            cdr.Cable_Project_Phase__c = drh.Cable_Project_Phase__c;
                        if(drh.Cable_Ownership__c != drhOldMap.get(drh.id).Cable_Ownership__c)
                            cdr.Cable_Ownership__c = drh.Cable_Ownership__c;
                        if(drh.Cable_Program_Type__c != drhOldMap.get(drh.id).Cable_Program_Type__c)
                            cdr.Cable_Program_Type__c = drh.Cable_Program_Type__c;
                        if(drh.Cable_Program_Category__c != drhOldMap.get(drh.id).Cable_Program_Category__c)
                            cdr.Cable_Program_Category__c = drh.Cable_Program_Category__c;
                        if(drh.Cable_Genre__c != drhOldMap.get(drh.id).Cable_Genre__c)
                            cdr.Genre__c = drh.Cable_Genre__c;
                        if(drh.Cable_Program_Format__c != drhOldMap.get(drh.id).Cable_Program_Format__c)
                            cdr.Cable_Program_Format__c = drh.Cable_Program_Format__c;
                        if(drh.Cable_Program_Length__c != drhOldMap.get(drh.id).Cable_Program_Length__c)
                            cdr.Cable_Program_Length__c = drh.Cable_Program_Length__c;
                        if(drh.Cable_Camera_View__c != drhOldMap.get(drh.id).Cable_Camera_View__c)
                            cdr.Cable_Camera_View__c = drh.Cable_Camera_View__c;
                        if(drh.Deal_Request_Date__c != drhOldMap.get(drh.id).Deal_Request_Date__c)
                            cdr.Deal_Request_Date__c = drh.Deal_Request_Date__c;
                        if(drh.Cable_Submitted_Date__c != drhOldMap.get(drh.id).Cable_Submitted_Date__c)
                            cdr.Cable_Submitted_Date__c = drh.Cable_Submitted_Date__c;
                        cdrListUpdate.add(cdr);
                    }
                }
                
            }
        }
        
        if(cdrListUpdate.size()>0)
            update cdrListUpdate;
    }
}
Could someone at Trailhed change the api names for external objects. Can't pass this unit because the validation checks for Phone__x object while the data source provides Phones__x.

https://trailhead.salesforce.com/lightning_connect/lightning_connect_setup
https://trailhead.salesforce.com/lightning_connect/lightning_connect_integrate

cheers
  • January 28, 2017
  • Like
  • 0
http://developerforce.github.io/lightning-connect-tutorial/create-lookup-relationships.html

Following the above Site I have created External LookUp relationship between "Orders and OrderDetails"
What my question is how OrderId in OrderDetail object is exactly mapping to OrderId in Order Object, even though i select Order object as External Lookup but i haven't selected OrderId field to map. How is it mapping?.

My requirement is
1.I have External Case and External Account objects.
2.Account have fileds ID, Name, etc..., Case have AccountId, CaseNumber..etc..,
3.Now i want create External LookUp relationship between AccountId field in CASE and ID field in Account
4.So, that Case should be related list of Account
 
 
  • July 02, 2015
  • Like
  • 1

Could you help me??

I created the followin trigger which sends e-mail when RFT_Category__c is updated.

But when I try to update it, the error occurrs.

"Apex trigger PDSendEmailtoOC caused an unexpected exception, contact your administrator: PDSendEmailtoOC: execution of AfterUpdate caused by: System.EmailException: SendEmail failed. First exception on row 0; first error: INVALID_ID_FIELD, WhatId is not available for sending emails to UserIds.: []: Trigger.PDSendEmailtoOC: line 26, column 1"

 

trigger PDSendEmailtoOC on RFT_Category__c (after update) {

  List<RFT_Category__c > pdList= [SELECT Location__c,Object_No__c FROM RFT_Category__c ];
  List<Object_Champion__c> ocList=[SELECT Location__c,Object_No__c,Champion_email__c FROM Object_Champion__c];
  
  for (RFT_Category__c rft : Trigger.new) {
    
    String [] locationList = rft.Location__c.split(';');
    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    List<String> toAddresses= new List<String>();
    
    //Set recipients
    for(integer i=0; i<locationList.size(); i++){
      for( Object_Champion__c oc :ocList){
        if( oc.Location__c == locationList[i] && oc.Object_No__c ==rft.Object_No__c ){
          toAddresses.add (oc.Champion_email__c );
        }
      }
    }
    mail.setToAddresses(toAddresses);
    mail.setSenderDisplayName('RFT Auto Mail');
    mail.setTemplateId('00yyyyyyyyyyy');
    mail.setWhatId(rft.Id);
    mail.saveAsActivity = false;      
    mail.setTargetObjectId('00xxxxxxxxxxx');
    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
  }        
}

 How can I solve this error?

 

Thanks in advance for your support!!!

 

Anna

  • March 05, 2013
  • Like
  • 0
Are there plans in the road map to allow custom fields on the OpportunityLineItemSchedule object?

In my case, a client would like to add another Quantity-type (double) field onto the OpportunityLineItemSchedule object.

Thanks.