Questions tagged [fields]

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

Filter by
Sorted by
Tagged with
36
votes
1answer
16k 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 ...
29
votes
1answer
22k 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?
27
votes
2answers
16k 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 (...
23
votes
2answers
23k 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 ...
12
votes
2answers
3k 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 ...
9
votes
2answers
3k 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 ...
8
votes
2answers
8k 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 ...
7
votes
2answers
10k 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 ...
7
votes
2answers
2k 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 ...
6
votes
2answers
9k 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 ...
6
votes
2answers
3k 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 ...
6
votes
2answers
1k 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 ...
6
votes
1answer
222 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, ...
6
votes
3answers
7k 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 ...
6
votes
2answers
14k 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 ...
6
votes
6answers
17k 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.
6
votes
3answers
10k 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 ...
6
votes
4answers
5k 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 ...
6
votes
1answer
946 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 ...
6
votes
1answer
2k 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 ...
5
votes
2answers
4k 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 ...
5
votes
1answer
1k 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 ...
5
votes
4answers
7k 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 ...
5
votes
2answers
754 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 ...
5
votes
1answer
2k 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 ...
5
votes
1answer
4k 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 ...
5
votes
1answer
169 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 ...
5
votes
2answers
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 ...
5
votes
1answer
440 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 ...
5
votes
1answer
759 views

How to enter Seconds into Datetime fields using the standard UI

Say you have a datetime field Start__c on a pagelayout. Now try to enter a date (we have DE locale enabled, but should be similar in EN): 31.08.2014 14:53 ==> works 31.08.2014 14:53:38 ==> doesn't ...
4
votes
2answers
3k 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.
4
votes
4answers
6k 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 ?
4
votes
1answer
54 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 ...
4
votes
4answers
927 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 ...
4
votes
1answer
243 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 ...
4
votes
1answer
4k 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 ...
4
votes
1answer
2k 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 { ...
4
votes
3answers
1k 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 ...
4
votes
2answers
756 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 ...
4
votes
1answer
65 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 ...
4
votes
1answer
1k 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 ...
4
votes
1answer
925 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" : "...
4
votes
3answers
62 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". ...
4
votes
1answer
415 views

Search layout meta-data value is an Id value instead of field name

I created a new field on user in production environment and assign the field to Search Layout->User Lookup Phone Dialogs, after doing this I pulled the meta-data for this environment and checked the ...
4
votes
2answers
1k views

Passing a field value from a page to custom button

Here is the requirement: I have added a custom button on a standard Salesforce page. I want to pass a field value from this standard salesforce page to the button (or the pop up that opens up when ...
4
votes
2answers
929 views

How to typecast values based on fieldtypes?

How to typecast values based on field types? I have a map of field Types and field Values(in Strings)? how to convert each field Values based on the field Types dynamically?
4
votes
1answer
586 views

How can I see a view of all unique fields for an Object?

I can see all of the fields listed on the Object page, but there is no column that indicates which fields have been checked as unique. How can I see what all of the unique fields are for an Object? ...
4
votes
0answers
63 views

Is there a way to Programmatically distinguish between Person and Non Person Account fields

Is there a Salesforce provided method/process to Programmatically distinguish between PersonAccount and Business Account fields ? I am using the getSObjectType().getDescribe().fields to get fields of ...
4
votes
0answers
168 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 ...
3
votes
1answer
5k 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 ...

1
2 3 4 5
9