Wild Card Fields
While Salesforce provides fields(all)/fields(standard)/fields(custom) constructs to fetch all fields, it comes
with many limitations with critical one being you can’t fetch more than first batch of records with it and others.
To overcome these issues, Brobench wild card selection of fields is a more versatile and capable enhancement as outlined below
- Use
*by itself to select all fields. For ex.,select * from account. Note that if there are a lot of fields in that object, that construct will only include the first 600 fields. - Use
*anywhere in a field to match by prefix or suffix or contains.select *street from accountwill select bothBillingStreetandShippingStreetselect billing* from accountwill select all fields starting withBillingselect *name* from contactwill select all fields containingNamelike FirstName, LastName, Name etc.,
- Use wild card multiple times
select billing*, shipping*, *street* from accountwill select all fields starting with either billing or shipping. If a field is matched by one or more matchers, then that field is included only once.
- Use
*with specific parent prefix to select matching fields in that parent objectselect Id, *name*, Account.billing* from contactwill select contact id, contact fields containingnameand its account fields starting withbilling
- Use
*in child queriesselect Id, name, (select * from contacts) from account limit 100will select id, name for Account and all fields of Contact.