Firstly i need the write query in mailchimp entegration for salesforce contacts and leads, in this case i will get 1 checkbox situation. with formula but in leads i dont have lookup for account rather i have but any times its coming null but i saw one thing, if my leads have account i can see like this. Here to Lead under account object, Accounts in this case can i get account field ? with formula or without just i need the get and actually i dont wanna write apex update code because too many records have and i cant use 2000 up OFFSET.

  • there is a field on lead ConvertedAccountId this field is populated with AccountId when the lead is converted. Similarly, we have fields for Contact and Opportunity as well. Sep 11, 2019 at 7:40
  • how can i find this fields I know its possible because already PageBlock Have about Account but and how can i search this problem, Sep 11, 2019 at 10:07
  • you can refer this field in formula field of lead or even query on lead Sep 11, 2019 at 10:35
  • Can write for example please because i couldnt see reference account field just i have Pageblock Account how can i add in my formula ? Sep 11, 2019 at 11:24

1 Answer 1


There are fields for converted records on the lead object. Which are not visible on the layout but you can use them in the formula or SOQL.

Here are those fields

Account - ConvertedAccountId Contact - ConvertedContactId Opportunity - ConvertedOpportunityId

In the Advanced formula editor, you can find those fields. enter image description here

Sample Query

SELECT Id, ConvertedAccountId, ConvertedContactId, ConvertedOpportunityId FROM Lead
  • Hi i run the my query and result this: ibb.co/WyBdB9N Sep 11, 2019 at 14:30
  • I guess we cant see account object in formula thats why i need to do update for all lead records but its not healhtly all of this for mailchimp query The records I want do not come Sep 11, 2019 at 14:37
  • @FurkanKuyular if the lead is not converted to Account, you won't get ant AccountId in the Query. Sep 11, 2019 at 14:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .