+ Start a Discussion



I need to import the Lookup Field in Custom Object,But I am unable to see

the Lookup Field while mapping.


If any one know the Solution.

Please help me.

Best Answer chosen by Admin (Salesforce Developers) 

Yes I got this

We can get this by selecting the Lookup Field in Step3.

Zuhair ShaikhZuhair Shaikh 
Hello. First time poster. I feel like this is an easy problem but I seem to be stuck at actually updating the records. So essentially, I need to create a class that will, for each account in system, update Contact_Email_List__c (which I have created) with the list of email ids (comma separated) from Contact related list of account.
public class EmailListMaker {   
    public void EmailListMaker(){
        List<String> emails = new List<String>();
        for (Contact em : [Select Email FROM Contact ORDER BY Name]){
        String emailList = String.join(emails, ', ');           
        upsert emailList Account.Fields.Contact_Email_List__c;

It gives the following problem, "DML requires SObject or SObject list type: String". I feel like I need to transfer the string to a SObject but I can't seem to figure out how. 

Best Answer chosen by Zuhair Shaikh
If you want to run through all your accounts and update the Email list, here is the code.
public class EmailListMaker {
	public void EmailListMaker(){
		List<Account> lstAccount = [SELECT Id, Name FROM Account];
		List<Contact> lstContact = [SELECT Id, Email, AccountId FROM Contact];
        List<Account> lstAccountUpdate = new List<Account>();
		Map <Id, String> mapEmailList = new Map <Id, String>();
		for (Contact c : lstContact){
			String sEmailList = mapEmailList.get(c.AccountId);
			if(sEmailList == null)
				sEmailList = '';
            if(c.Email != null){
                sEmailList += c.Email + ', ';
                mapEmailList.put(c.AccountId, sEmailList);
		for(Account a : lstAccount){
            if(mapEmailList.get(a.Id) != null){
                String sEmailList = (String)mapEmailList.get(a.Id).trim();
                if(sEmailList.length() > 0){
                    sEmailList = sEmailList.left(sEmailList.length() - 1);
                a.Contact_Email_List__c =sEmailList;
                System.debug(a.Name + ': ' + sEmailList);
		upsert lstAccountUpdate;


I creating a trigger, that when an Opportunity are closed, I get some of the data of the fields of that opportunity and send these informations to another system.
But I don't know how get theses fields with APEX.

Can someone help me?

Best Regards

Best Answer chosen by Rafael.Martins.Santos
rajat Maheshwari 6rajat Maheshwari 6


Please utilize below code :  -

trigger CriarProjeto on Opportunity (after update) {
Opportunity opty ;

opty = new Opportunity([SELECT Id, Name, Proposal_Number__c, StageName FROM Opportunity WHERE Id IN : Trigger.newMap.keyset() limit 1]);

    System.debug('Name: '+ opty.Name);
    System.debug('ID: '+ opty.Id);
    System.debug('Proposal Number: '+ opty.Proposal_Number__c);
    System.debug('Stage Name: '+ opty.StageName);



Mohsin WadeeMohsin Wadee 
I created the class - which works when testing it through Debug > Open Execute Anonymous Window , but when verifying this step I get this error:

Step not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Either the plain text body or html body must be supplied.: [] 
Note: you may run into errors if you've skipped previous steps.
Best Answer chosen by Mohsin Wadee
Mohsin WadeeMohsin Wadee
Ok, don't ask me how or why, logged in today - did not change a thing - and the tutorial now verified. Go figure.
I have a Salesforce community using the customer community plus license.
When I go to manage the community, Administration, Tabs, the Documents tab is not in the list of Available Tabs.
Has anyone any idea why not?
Best Answer chosen by Filikin
sagarika bsagarika b
Hi Filikin,

As of now "Documents tab" is not available in community.

Please check below link for reference.


I hope it will be helpful to you.

Best Answer chosen by yaramareddy radhika
Rohit BhargavaRohit Bhargava
Hi Yaramareddy,
You can write javascript/jquery for the same need.
Here is the Javascript code for your need :-
function allLetter(inputtxt)
   var letters = /^[A-Za-z]+$/;
      return true;
     return false;

It will check only for letters and returns true/false based on the result.
Hope it works for you.. :)
I am having trouble completing the challenge for the "Create and Edit Lightning Components" module of the "Lightning Components Basics" trail. Here is the challenge:

Create a camping component that contains a campingHeader and a campingList component.
    The campingList component contains an ordered list of camping supplies that include Bug Spray, Bear Repellant, and Goat Food.
    The campingHeader component contains an H1 heading style with a font size of 18 points and displays 'Camping List'.

Here is my code:


<aura:component >   


<aura:component >
    <H1>Camping List</H1>



    font-size: 18px;


<aura:component >
    <aura:attribute name="campingSupplies" type="List" default="['Bear Repellant', 'Bug Spray', 'Goat Food']" />

When I check the challenge, I get the error message:

Challenge Not yet complete... here's what's wrong:
The component is not using the correct font size.

Any help is greatly appreciated.
Best Answer chosen by MatK62
Nayana KNayana K

<aura:component >
<li>Bear Repellant</li>
<li>Bug Spray</li>
<li>Goat Food</li>



    font-size: 18pt;
farouk fakunlefarouk fakunle 
I am getting an error in challenger 2 and i am pretty sure all my headers are correct. The error is not really telling me much, can anyone help? thanks 

User-added image
Best Answer chosen by farouk fakunle
Sandeep WaliaSandeep Walia

I was saving the same issue and bumped into this question, although it was of no help I have figured out what I was doing wrong.

Make sure that all the underlying Reports are correctly Named as given in the Question.

Worked for me

Hope it helps you too!


Hi There,

With referred to following blog I'm trying to integrate 2 salesforce Orgs. It follows the token requests with the token url. I have created connected Apps on the target env and remote access settings on the source org as suggested.

I have created a VF page with a button and in the controller itself i have defined usernames, passwords, clientId/secrets to start the process. I.m getting no errors but it doesn't return the Access URL. Alaways have Null in the debug log. What could possibly go wrong? Something related to connected App settings?

Best Answer chosen by LBS
Found out the issue guys! its with duplicate variable of accessToken. It simply wasted 3 hours of mine
Oliver Freeman 9Oliver Freeman 9 
Hi There!

I have a custom object (Contract Loan) which is related to the Case object, and I'd like to be able to count how many Contract Loan records there are related to each case.
I can't use a ROLLUP Summary, because we don't have (don't want) a Master-Detail Relationship field on the Contract Loan object to the case, so it'd need to be done by an APEX Trigger - I won't lie, I have no idea what I'm doing.

Can anyone give me a hand at starting this, please?

Best Answer chosen by Oliver Freeman 9
Akhil ReddyAkhil Reddy
Trigger ContractLoanTrigger on Contract_Loan__c(After insert,After Delete,After Undelete){
  Set<Id> setCaseIds = new Set<Id>();
  //Whenever your working with After Undelete operation you can access data through 
  //Trigger.new or Trigger.newMap but not with Trigger.old or Trigger.oldmap variables
  if(Trigger.isInsert || Trigger.isUndelete){
   for(Contract_Loan__c con : Trigger.new){
   //if you use Trigger.new below in place of Trigger.old you will end up with 
   //System.NullPointerException:Attempt to de-reference a null object
   for(Contact con : Trigger.old) {
 List<Case> listcss = [Select id,name,number_of_Contract_Loans ,(Select id from Contract_Loan__c) from Case where                Id in : setCaseIds];
  for(Case cs :listcss ){
   cs.number_of_Contract_Loans= cs.Contract_Loan__c.size();
  update listcss;