List all Salesforce Fields - the easy way


While Salesforce provides an easy way to list all of the fields in a SOQL query.

For example:

SELECT FIELDS(ALL) FROM Account LIMIT 200

We are limited to 200 records.

So we come up with this simple shortcut to achieve the same result but not be limited to 200 records at the time.


Steps:

  1. Use the SOQL to query all fields

  2. Copy the headers to excel and transpose it

  3. Using Notepad++ expressions add quotes and comas to build the query.



From This



To This




Just we required excel, notepad ++ , and your time.










1 – Go to excel past the Colum or row field





2- Select an entire row or column and copy



3- Go to empty cell like this


4 – Click one transpose as you can see in picture



5- You can see all the details in row



6- Copy that row and past to notepad ++



7- Now Select all (Ctrl+A) and then press (Ctrl+F) for find



10 – Then add \n and replace ‘,’


11- Select Replace all



12- Then close the tab and again do select all (Ctrl+A) and then press (Ctrl+F) for In Replace ->Find what \r -> Replace with should be Blank


Then you can see this




Finally, you done it you make the huge list with comma separated without going manually to each and add comma to it.





3. Add the result above to your query and you should be able to list all records.

39 views0 comments

Recent Posts

See All

Time

Time is like a river. You cannot touch the same water twice, because the flow that has passed will never pass again. Enjoy every moment in life!

Self-Growth Challenge

Start: Rich Dad Poor Dad Day 1: How to talk to anyone Day 2: The power of habit Day 3: Love Languages Day 4: Think and Grow Rich Day 5: 5 AM Club Day 6: The 7 Habits of highly effective people Day 7: