• Sam Karn
  • 0 Points
  • Member since 2020

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 4
I have couple of objects and the relationship is as follows


Account has a ralationmship with the Opp object and planning has a lookup relatiomship with Opp and management has a lookup wiht thr planining

I have created email field on the Management object 

I have trigger on the planning object and from planning I am extracting management reord which are basically copied contacts from the contact object known as special contacts.If more record are added in the contact object I need to match email on the management with email on the contact object and if they match it means management has that record so no need to insert just update that record..If the email does not match then copy that contact object to the management object......Management has no direct relationship  realtionhip withe contact object

Relationship goes like this:- 

Starting backwards from management------Plannnig -----Opp-----Account-----Contact
My code is  not complete and I have focussed on after udpate trigger assuning that certain records with thei email address already esists in the Management object and new we gonna update them if the email matches with the email on the contact object

Problem is at the line where I am checking if the email from the contact record exists in the map of Management object.I know email exists in both the objects but it's always giving me null value so please help me out.

trigger UpdateStartegicPlanning on Strategic_planning__c (after update)
    set<string>EmailtoLastname=new set<string>();
    set<id>IdofStrategicplan=new set<id>();
    set<id>storeoppIds=new set<id>();
    for(Strategic_planning__c Str:trigger.new)
     list<Realtionship_Management__c>ManageRec=([select Key_Contacts_Email_Address__c from Realtionship_Management__c where Strategic_planning__c=:IdofStrategicplan]);
    //might need maoo for the above line
    Map<string,Realtionship_Management__c>must=new Map<string,Realtionship_Management__c>();
    for(Realtionship_Management__c Mrecords:ManageRec)

for(Strategic_planning__c Check:Trigger.new)

list<opportunity>newOppIds=[Select id,accountid from opportunity where id in:storeoppIds];
set<id>accountids=new set<id>();
for(opportunity ids:newoppids)
system.debug('the account id is'+accountids);   
List<account>str=[select id,(select id,Key_Contact_Account_Planning__c,lastname,email from contacts where Key_Contact_Account_Planning__c=true)from account where id in:accountids];
list<Realtionship_Management__c>management=new list<Realtionship_Management__c>();

for(Strategic_planning__c plan1:trigger.new)
System.debug('The strategic planning id is'+plan1);
for(account s:str)
  System.debug('The account info is is'+s);  
for(contact contra:s.contacts)
       system.debug('the email address is');
        system.debug('the email address is not good');


We have apex classes through which we send emails based on user action in force.com sites. It was working great until Friday, But yesterday when one of our customer try to submit application, they were getting error, In debug it says “SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, INVALID_TYPE: sObject type 'SalesforceIqDataSource' is not supported.: []”. I am pretty sure we did not change anything related to apex class, email template, vf page etc.. Does anyone know the reason or best way to fix this?
Ans:  Text, Text Area, Text Area Long, Rich Text Area, URL. Is this is the right answer or is there something else????

13. Can we change the data type from Text to Auto Number for the Name when we already have?

Ans: I feel the answer is yes. If yes, please do let me know the explanation . If no, let me know the reason as well. Thanks guys. 

I've managed to create a lightning homepage component with 1 column using the below component, style, and design elements. If I re-use the {!v.main} in the component page more than once, I receive an error. 

I want to be able to create 3 horizontal sections as shown in the last image below. Is it possible? 

<aura:component implements="lightning:homeTemplate">
    <aura:attribute name="main" type="Aura.Component[]" /> 
        <lightning:layout horizontalAlign="spread">

<flexipage:template >
        <flexipage:region name="main" defaultWidth="Xlarge">

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
	<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
		<path d="M120,108 C120,114.6 114.6,120 108,120 L12,120 C5.4,120 0,114.6 0,108 L0,12 C0,5.4 5.4,0 12,0 L108,0 C114.6,0 120,5.4 120,12 L120,108 L120,108 Z" id="Shape" fill="#2A739E"/>
		<path d="M77.7383308,20 L61.1640113,20 L44.7300055,63.2000173 L56.0543288,63.2000173 L40,99.623291 L72.7458388,54.5871812 L60.907727,54.5871812 L77.7383308,20 Z" id="Path-1" fill="#FFFFFF"/>

This is the error I receive
User-added image

This is the layout I can render but doesn't work if I add components to it
User-added image