• Marián Čekan
  • NEWBIE
  • 20 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 6
    Replies
Hi, I am trying to import some sample data into Salesforce using data loader. But after trying to map the fields, all of my "File Column Header" are in one row, so I can only add one "Name" field. It is the same problem as mentioned here: https://developer.salesforce.com/forums/?id=906F0000000BKBAIA4 but I did not manage to success. Any advice please? thanks in advance

Hi, I'm working on trigger that will [after insert] get Street from ContactPointAddress object connected via lookup (Contact__c) and re-write MailingStreet field in Contact object ONLY if checkbox isDefault is checked. This is what I've done so far:

public static void AfterInsert(ContactPointAddress[] lstContactPointAddresses)
		{
			List<Contact> allPassagersToBeUpdated= new List<Contact>();
			for (ContactPointAddress tmpContactPointAddress : lstContactPointAddresses)
				{
					// created contactPointAddress is checked - is default
					if (tmpContactPointAddress.IsDefault == true) {
						Contact passenger = [SELECT Name,LastName,MailingStreet FROM Contact WHERE Id =: tmpContactPointAddress.Contact__c];

						Address addressCompoundField = (Address)tmpContactPointAddress.Address;
						passenger.MailingStreet = addressCompoundField.Street;
						allPassagersToBeUpdated.add(passenger);

					}
					else {
						return;
					}

				}
			if(allPassagersToBeUpdated.size()>0){
				update allPassagersToBeUpdated;
			}

		}

The problem is, my compound field Addres in Contact Point Address is always null. I don't know why as I can acces values of other fields. Can anyone help me please? Thanks a lot:)

Hi, I'm absolute beginner and I'm trying to get familiar with salesforce triggers. I got main idea - what it's all about but I'm stuck with part of code:

CC_Variables__c variables = CC_Variables__c.getInstance('EloquaMarketingId');

 

I keep getting error: Error: Compile Error: Invalid type: CC_Variables__c at line 9 column 5
 

I have already checked many forums and tried to solve it as follows: "You need to use the API name of the object and not the label. Hence the error. To find the API name of the object go to:

Setup > create> objects> myObject > API name." 

 

But there is not such an object is this the problem? Thank you very much.

 

Hi, I am trying to import some sample data into Salesforce using data loader. But after trying to map the fields, all of my "File Column Header" are in one row, so I can only add one "Name" field. It is the same problem as mentioned here: https://developer.salesforce.com/forums/?id=906F0000000BKBAIA4 but I did not manage to success. Any advice please? thanks in advance

Hi, I'm working on trigger that will [after insert] get Street from ContactPointAddress object connected via lookup (Contact__c) and re-write MailingStreet field in Contact object ONLY if checkbox isDefault is checked. This is what I've done so far:

public static void AfterInsert(ContactPointAddress[] lstContactPointAddresses)
		{
			List<Contact> allPassagersToBeUpdated= new List<Contact>();
			for (ContactPointAddress tmpContactPointAddress : lstContactPointAddresses)
				{
					// created contactPointAddress is checked - is default
					if (tmpContactPointAddress.IsDefault == true) {
						Contact passenger = [SELECT Name,LastName,MailingStreet FROM Contact WHERE Id =: tmpContactPointAddress.Contact__c];

						Address addressCompoundField = (Address)tmpContactPointAddress.Address;
						passenger.MailingStreet = addressCompoundField.Street;
						allPassagersToBeUpdated.add(passenger);

					}
					else {
						return;
					}

				}
			if(allPassagersToBeUpdated.size()>0){
				update allPassagersToBeUpdated;
			}

		}

The problem is, my compound field Addres in Contact Point Address is always null. I don't know why as I can acces values of other fields. Can anyone help me please? Thanks a lot:)

Hi, I'm absolute beginner and I'm trying to get familiar with salesforce triggers. I got main idea - what it's all about but I'm stuck with part of code:

CC_Variables__c variables = CC_Variables__c.getInstance('EloquaMarketingId');

 

I keep getting error: Error: Compile Error: Invalid type: CC_Variables__c at line 9 column 5
 

I have already checked many forums and tried to solve it as follows: "You need to use the API name of the object and not the label. Hence the error. To find the API name of the object go to:

Setup > create> objects> myObject > API name." 

 

But there is not such an object is this the problem? Thank you very much.