0

I have 500 fields for account object and I have below requirements.

1)Lastmodifydate of Field 2)Count of records in which values is available for the fields.

I have created a queries but those are not efficient because i need to run query almost 500 times .Any suggestion like scehma or Macros in salesforce to get those details

  • Any suggestion? – dem Feb 16 '17 at 6:09
  • I'm not sure but you can try FieldSets – Rohit Mourya Feb 16 '17 at 6:38
  • What do you mean by "Lastmodifydate of Field"? when the field metadata was modified or each record level last modified date? – Saumya Ranjan Satapathy Feb 16 '17 at 6:38
  • Yes.LastModifiedDate of Field – dem Feb 16 '17 at 6:39
  • @dem Did the below answer work for you? – Saumya Ranjan Satapathy Feb 16 '17 at 7:59
1

2) For count of not null entries for a fields,

Select count(Id),Count(Name),Count(Custom_Field__c) from Account

1) For lastModfiedDate of a particular field for each record, you would need to track history for that fields. Then you can query

Select AccountId,Field,max(CreatedDate) from AccountHistory group by AccountId,Field
  • Point N0-1 This is fine for few fields,but i have to check for almost 500 fields ,then each time i need to run separate query for each field ,Is there any way so i can get count in one shot – dem Feb 16 '17 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.