Questions tagged [fields]

When speaking of fields specifically on a Salesforce custom or standard object.

Filter by
Sorted by
Tagged with
36 votes
1 answer
22k views

How does SalesForce calculate Data Storage usage amount?

My company has recently exceeded our data storage cap (at 102% right now.. :/ ). A large portion of the data that pushed us over our limit was due to an import of records. The weird thing about this ...
VictorKilo's user avatar
  • 1,089
32 votes
3 answers
23k views

What is the best workaround for the 20 field history tracking cap?

Feel like I am missing the point of Field History Tracking. Before going any further, here are the Salesforce Limits from the Salesforce Limits Quick Reference Guide date June 2, 2014: Edition (Fields ...
blunders's user avatar
  • 1,618
32 votes
1 answer
26k views

Populating Custom Settings field using Apex

I'm trying to populate/set/put/initialize a custom setting's field with a calculated value within my apex code. The field type is number. Is there a way to do this?
Sean's user avatar
  • 329
24 votes
2 answers
26k views

How do I prepopulate fields on a Standard layout?

Is there a way to pre-populate some of the fields on a standard layout page for an object (standard or custom)? For example, if you click on the "New Opportunity" button in the Opportunity related ...
Anup's user avatar
  • 3,790
16 votes
2 answers
6k views

Missing 'Required' attribute for Long Text Area fields?

Here is the snapshot for a "Text Area" field, notice that the "required" attribute is available i.e. we can set this field as required: Here is another snapshot for a "Long Text Area" field, notice ...
Rajiv Bhatt's user avatar
  • 1,792
14 votes
2 answers
4k views

What is the difference between LastModifiedDate and SystemModstamp

This question is fairly straight forward, but I can't it figure out. I am using the schema browser in the IDE to query some records and the SystemModstamp is actually 1 second later than the ...
Daniel Blackhall's user avatar
11 votes
2 answers
13k views

Percentage field semantics - 1 or 100 for 100%

What should a user input into a Percentage field to state "100%"? Is there a defined semantics or is this something the creator of the fields has to configure by the amount of decimals and validation ...
Robert Sösemann's user avatar
10 votes
7 answers
54k views

How can I export object's field schema information to excel?

How can I export the fields of an object from Salesforce into an Excel sheet? I'm only looking for the field schema information, not the objects records.
Sohail BeyondVision's user avatar
8 votes
2 answers
4k views

The length of the first and last names

There is a Name field of type Name in Contact object. It consists of FirstName and LastName. I can query those two fields using Apex. Even though I cannot find any proofs in Object Manager of that, I ...
oobarbazanoo's user avatar
8 votes
2 answers
3k views

Indexing Fields WITHOUT Salesforce Help (dates, etc)

I am asking this here because I'm having my usual run-around with Salesforce (we do not pay for Premium or "Developer" support if there even is such a thing) and I'd like to know if someone has ...
AMM's user avatar
  • 4,704
7 votes
3 answers
20k views

Is there a simple way to convert any value direct to String in production code?

When I do a System.debug(whatever), SFDC doesn't care whether whatever is a String, a Date, a Datetime, a Boolean, etc... it just makes a string of it and dumps it in the log. But in the following ...
Brian Kessler's user avatar
7 votes
4 answers
12k views

Make contact firstname and lastname mandatory

This is a generic question. I was trying to make the first name and last name field of contact mandatory. Currently only the first name is mandatory. I tried doing this from the page layout. Now I ...
Rimii's user avatar
  • 225
6 votes
2 answers
5k views

Where is the documentation for the CreatedBy object?

Browsing salesforce topics on message boards I came across this code: CaseComment comment = [SELECT CreatedById, CreatedBy.UserName FROM CaseComment]; It looks like CreatedBy is a field of ...
Cory Klein's user avatar
6 votes
2 answers
14k views

Months between two dates

In my trigger i would like to calculate the number of months between two date. For Example if the date format is (DAY/MONTH/YEAR): START DATE : 07/10/2013 END DATE: 12/01/2014 Number ...
Enry's user avatar
  • 3,716
6 votes
2 answers
4k views

System.LimitException: Too many fields describes: 101

For the sake of my programming around this with a makeshift fix: Is this implying that I am trying to write to more than 100 fields at a time across multiple records..? Or even one record? I can't ...
AMM's user avatar
  • 4,704
6 votes
1 answer
503 views

Apex differentiate between Lookup field to master detail field

Is there a way to differ between regular Lookup field to a MasterDetail field? When calling to getDescribe() on a field both of them holds the type of REFERENCE. EDIT: After further investigation, ...
omri_saadon's user avatar
6 votes
1 answer
4k views

Apex differentiate between RichTextArea, LongTextArea and TextArea

When calling getDescribe() on a custom field I get the field data. Although, I need to know when the field is Text Area (Long), Text Area (Rich) or just TextArea. When seeing the result from ...
omri_saadon's user avatar
6 votes
2 answers
17k views

Are there limits to tracking fields history?

For tracking fields, is there a hard limit of the number of fields that one can track on a custom object? I've done a google search and found some results but they're from 2012 and some are posted on ...
chrisjlee's user avatar
  • 916
6 votes
3 answers
12k views

Reading Long Text Area field with line breaks

I have long text area field, which has data on each line. I am populating a line then hitting "Enter" and then populating the next line and hitting "enter" again and so on. When reading this field ...
apn's user avatar
  • 1,722
6 votes
4 answers
20k views

How can one validate 'recordEditForm' fields before submitting them to the platform?

In a custom lightning component where one is using the recordEditForm tag, how can one validate fields that are filled by the user? For example, in a quick action to create a Case record, we can have ...
Renato Oliveira's user avatar
6 votes
1 answer
1k views

APEX: access profile by name in known/predictable language regardless of running user's language [duplicate]

It was recently brought to my attention that for our clients, SalesForce translates profile names (such as "System Administrator") which causes errors when the Apex code attempts to check profile ...
Brian Kessler's user avatar
6 votes
1 answer
19k views

Keep Getting Error "Bad Message 431"

Starting today, I keep getting the error "Bad Message 431", followed by "reason: Request Header Fields Too Large" when I refresh a console page in Salesforce. The page is "https://mycompanyname.my....
J. Schneider's user avatar
6 votes
1 answer
4k views

Generating Barcodes in Salesforce

Is there any standard/ acceptable way of generating barcodes in salesforce? I'm exporting some pdf reports and there I need to print a barcode. I found some third party libraries like this. But when ...
highfive's user avatar
  • 6,241
6 votes
2 answers
6k views

Find if field is used in a report

One of the SFDC Admins asked if there is a way I can find out if certain fields are used in any reports/code. I have the code portion covered but I can't figure out how to find if the fields are used ...
dphil's user avatar
  • 6,185
5 votes
4 answers
10k views

How to display Currency field with all the decimal places without rounding it?

I want to display the currency field with all the decimal places.Right now salesforce automatically rounds it to two decimal places. salesforce displays 123.45678 as 123.46 ,i want it to be 123.45678 ...
Keepcalmncode's user avatar
5 votes
3 answers
4k views

Better way for Bulk Assignment of Field Level Security

In Salesforce we have a custom object which has 500 fields. We have around 50 different profiles in our org. Out of this 50 profiles, 30 profiles need access to these fields. Right now, to set field ...
Ashish's user avatar
  • 2,372
5 votes
1 answer
1k views

How to access fields returned by Polymorphic query in apex/soql?

This might seem to be a fairly simple question, but I am unable to figure out how to use the fields returned by a Polymorphic SOQL query. For example: I ran the following query in dev console's query ...
Ayush Goyal's user avatar
5 votes
1 answer
3k views

How do I specify an account in the Related To field in a custom Global Action Predefined Field Value?

I have created a custom Global Action, and am trying to predefine a value for the Related To field. Related To appears in the picklist of available fields for Predefined Values, so it appears this is ...
bopp's user avatar
  • 53
5 votes
1 answer
3k views

Check if field is available on page layout

Can I check whether a field is available on any of the page layout of an object using code? I have to set a checkbox if the field is available.
Sneha's user avatar
  • 541
5 votes
1 answer
2k views

What is Data Type of ActivityDate (Due Date) field on Task Object?

On the Task's field setup page, the ActivityDate is described as Date/Time but when I try to assign a DateTime variable to it, then I receive this error t.ActivityDate = DateTime.now() //this line of ...
abdn's user avatar
  • 525
5 votes
2 answers
1k views

Javascript get field ids for URL

I'm trying to replicate the "New" button on a related list. The only difference is that, if a record of that type already exists, then it simple returns an alert. Otherwise the "New" activity should ...
powlo's user avatar
  • 2,640
5 votes
1 answer
591 views

DescribeSObjectResult contains fields of type reference with an unknown relationship name

I use the SOAP API (WSC, partner wsdl) to describe objects and use the field meta information to dynamically build SOQL queries. Today i observed that DescribeSObjectResult can contain fields of type ...
lgraf's user avatar
  • 443
5 votes
0 answers
351 views

Purpose and/or Description for "Is Controlled by System" Field on User Record Requested

I was working on a Validation Rule today for User Records, and notice a field on the User Record "Is Controlled by System",. This looks promising and useful, however, I can't seem to find anything ...
MeighanRocksSF's user avatar
4 votes
3 answers
11k views

How to check if SObject has certain field?

I hope you'll help me to solve my problem :) I've written a class that check if a Sobject has a field of a certain name public static boolean hasSObjectField(String fieldName, SObject so){ return ...
fabtosz's user avatar
  • 181
4 votes
4 answers
3k views

Text Formula String Concatenation - Omit Trailing Comma

Scenario : I have 7 checkbox fields. For example say it is Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday. In Formula field I want to display all that are true as comma separated ...
Azarudeen's user avatar
4 votes
2 answers
4k views

Is there a way to find required fields on an objects?

Is there an easy way to find the required fields for an objects? Is page layout the only way to see visually what fields are required for an object? I am looking for a GUI tool not code.
Bartley's user avatar
  • 5,237
4 votes
4 answers
10k views

Which profile can view encrypted fields by default?

i faced this question in 401 certification exam. Please tell me the correct answer for this? Which profile can view encrypted fields by default ?
user999's user avatar
  • 43
4 votes
1 answer
5k views

How to iterate over all the queried out fields of a single record

I need to iterate over all the fields that I query for a record and check all of those that are custom field checkboxes and see if any are true. The part that I'm not sure how to do is how to iterate ...
Bahman.A's user avatar
  • 828
4 votes
1 answer
2k views

Is there a way to see all recent changes in an org

Every time I have to move changes from my sandbox I wish there was a way to see all the new objects, fields I created or modified. This way I wouldn't forget a field or an object and that would save ...
Arthlete's user avatar
  • 4,907
4 votes
3 answers
2k views

Make 'Asset Name' field unique

We sell assets to clients with support contracts. All these assets need to have unique names which are generated according to a specific format. We imported all our assets in our SalesForce database ...
Wouter's user avatar
  • 161
4 votes
1 answer
6k views

How to get Field name

I have a VF page where admin can select fields which need to be displayed. And on an another Vf page i am getting the API name of all the selected fields in 1st Vf page. This much is working fine i ...
AnuRaj's user avatar
  • 2,482
4 votes
1 answer
2k views

Accommodate the length of a string value to prevent the STRING_TOO_LONG issue

I received an exception while trying to insert an order item. It appears to be that the description field allows only 255 characters; sometimes my descriptions goes beyond 255. I will shorten the ...
Cuban coffee's user avatar
  • 1,542
4 votes
1 answer
5k views

Fields should be displayed only in detail view not in the edit mode

I'm creating a custom Object which is exact replica of Case Object. I have few fields like Contact Phone and Contact Email which is displayed only in the detail view but not in the Edit mode. Please ...
user4613's user avatar
  • 101
4 votes
1 answer
3k views

how to get all fields from any object and its parent object in apex?

I have tried this code but i am only getting particular object fields but not its parent fields. any suggestions what i am missing? public with sharing class FilterCriteriaComponentcontroller { ...
john j's user avatar
  • 61
4 votes
2 answers
1k views

How to set default value for a managed field?

I have a managed field from a package. The requirement is such that I can not add this field to page layout. But when I create or clone a record some managed code throws the error that the particular ...
Anutosh Datta's user avatar
4 votes
1 answer
2k views

Get namespace prefix for a field

In a question I asked last week about getting namespaces, the best solution was to get information about the class (or any class) in the namespaced package. But this seems vulnerable if there are ...
powlo's user avatar
  • 2,640
4 votes
1 answer
3k views

Why do some leads have a 'lead source' value which is not in the picklist?

I just inherited a salesforce account from a previous owner, which is integrated with a number of custom forms and services. I'm not clear on all of the details to be honest, but I think this is a ...
Matt Korostoff's user avatar
4 votes
1 answer
1k views

Rest API query with FIELDS() does not return nextRecordsUrl

Goal: Get all Account records with all fields via REST API Approach: Send GET request with query: /services/data/v53.0/query?q=SELECT+FIELDS(ALL)+FROM+Account+ORDER+BY+Name+ASC+LIMIT+200 Problem: I ...
gorbital's user avatar
4 votes
1 answer
1k views

How to get the information of a user who deleted an object?

Salesforce REST API supports the getdeleted endpoints to furnish a list of deleted records for an SObject. The response from the API looks like this { "deletedRecords" : [ { "id" : "...
auny's user avatar
  • 773
4 votes
3 answers
738 views

Where can i ckeck all the attribute fields of salesforce objects?

I'm a new developer in salesforce, and just realize that there are some "attribute fields" (i don't know if that's the correct name) but i cant figure it out where are those field "set"/"declare". ...
Asagas's user avatar
  • 43

1
2 3 4 5
11