Questions tagged [custom-field]

A custom field can be added to standard objects that support custom fields and custom objects to extend the capabilities of Salesforce to suit the specific needs of an organization. Custom fields can be accessed in code by referring to them by their API Name which is their specified Field Name value suffixed with an __c.

Filter by
Sorted by
Tagged with
2
votes
2answers
907 views

How to dynamically set type_x value for Metadata.CustomField?

I am trying to delete fields using metadata API . But how to set the type_x vale for the field i chose ? The describeFieldresult getType() method just gets me DisplayName for the field i chose. Or ...
2
votes
2answers
141 views

Custom field showing a field from the first of multiple custom object entries

I have a custom object that we use for test scores for our students(contacts). A student can take the same test multiple times. My goal is to create a custom field in the contacts object that shows ...
2
votes
2answers
2k views

Error When Creating Formula Field - No Syntax Errors and < 5,000 Characters

Getting this error: Error: Invalid Data. Review all error messages below to correct your data. Formula(s) that reference this field are no longer valid: Syntax error. Found 'end of formula' Saw ...
2
votes
1answer
38 views

Changing the colours of the fields depending on a formula?

I have two number fields on opportunity layout. A and B. I want to create a formula field and when A>B the formula field will be red or just an indication that people will notice it right away when ...
2
votes
1answer
135 views

SFDX Package2 Version Create - Custom Object fields are not visible to the user during package version creation

So this error: "SObject row was retrieved via SOQL without querying the requested field" means one of two things: 1. You forgot a field in your soql query you are now trying to use 2. You do not have ...
2
votes
1answer
28 views

Custom field still shown as “not existing” even though i have retrieved all custom object metadata

I have retrieved all custom object metadata for Account, including the referenced custom field, but vscode is still showing it as not existing.
2
votes
1answer
271 views

How to deal with users without permission while using Lightning Data Services?

To be more specific, I have the following scenario that just happened: I developed a component on a sandbox (development environment). This component uses force:recordData to retrieve some field data ...
2
votes
1answer
983 views

Custom field update API

I am working in a sandbox, and using the Tooling API. I need to update the metadata of the custom field in Salesforce, but I am unable to do so. For this I am trying to work on the PATCH method. Below ...
2
votes
2answers
398 views

Check from Apex if object supports custom fields

In Salesforce there are some specific objects like Attachment, RecordType etc. which are 'closed', i.e. we cannot create custom fields on them, in opposite to 'open' objects, e.g. Account, Contact etc....
2
votes
1answer
268 views

Create a LongTextArea custom Field and show this in Layout

I have a problem creating a LongTextArea custom field. I don't understand what is wrong, if it's actually not created or not visible as a field. This is my code: CustomField customField = new ...
2
votes
1answer
2k views

Nested IF statements in formula field

I'd like to have a field which contains the value of the final system size if it exists, the post system size if that exists, or the value of the regular system size otherwise. The formula I have is ...
2
votes
1answer
78 views

Assigning task to referenced user

I want to set up a process to assign a task to an opportunity field of type Lookup(User). When I try to trigger the process I get the following error: "This record couldn't be saved because it failed ...
2
votes
2answers
1k views

I can not able to create deleted fields again with same api name on object

I have an object called creditBook and I deleted certain fields from this object let us say (Amount Used) with API name Amount_Used__c. I just also deleted this field from deleted history field.Now ...
2
votes
2answers
1k views

Updating Previous Owner field on Case object

I have a custom field called Previous_Owner__c on the standard Case object. Every time the Owner is changed, I need to update this field with the previous owner's value. I have written a before update ...
2
votes
1answer
417 views

Discover Apex custom field references

Is there an easy way to discover where a custom field is referenced in Apex code without attempting to delete it? E.g. an org with a large code base has objects A, B, and C that all contain a custom ...
2
votes
1answer
554 views

Non editable field permission setting

How to set this type of field(e.g. Account number) permission where permissions(Visible and Read-Only) are non-editable(greyed out) using any profile?
2
votes
1answer
157 views

Trouble Accessing Properties of a Custom Lookup Field in Visualforce

I have a Visualforce page and I'm using the standard controller for the quote object. I added a custom field to the Quote object, QuoteContact, which is a lookup data type. Everything looks good on ...
2
votes
1answer
4k views

Error converting HttpResponse to Dom.Document

I am calling the Tooling API from Apex in order to find out if a Custom Field has been created. Here is my code: HttpRequest req = new HttpRequest(); req.setHeader('Authorization', '...
2
votes
1answer
1k views

Duplicating Opportunity Stage Duration for Custom Field

It's probably been asked before, but how do you duplicate the Stage Duration functionality in Opportunities on a custom field? I have a custom picklist field named "Operations Status" that serves the ...
2
votes
2answers
273 views

Populating standard name field with a case number

I am trying to populate the standard name field of an object with the case number. I have tried to use an apex class to accomplish this. Here is the code I used: GW_Volunteers__Volunteer_Job__c ...
2
votes
2answers
5k views

How to add “Middle Name, Suffix, etc” to the Contact's Name field

Goal: Within a contact, the name field is concatenated in the user view and I would like to add custom fields to this concatenation. Currently, appears this is not possible, though possible I am ...
2
votes
1answer
807 views

Error: External ID and Unique field limit exceeded

I am getting this Error in Contact Object(Person Account Activated) for the Number Datatype field Which I am selecting has Unique. when I googled it I get to know that only 3 Field can be made it has ...
2
votes
1answer
1k views

Can I use partner account fields in a report?

I am creating an "Opportunities with Products" report. Is there any way I can use more partner fields than what are exposed by default? I presume the answer is no, but, I wanted to ask just to be ...
2
votes
2answers
3k views

creating Mail Merge templates with if fields

I've never had any problems with standard, non-conditional merge fields, but I can't for the life of me figure out how to insert a working if...then formula into my Mail Merge documents. I am ...
2
votes
1answer
656 views

How to link account to pricebook

I'm working on an application in which it should be possible to link an account to a pricebook. Because for different accounts, different prices may be appropriate. Is there a way to directly link an ...
2
votes
1answer
2k views

How do I run an integer validation rule against a Number(x, 0) field?

I see in the Number documentation that Salesforce does some rounding, but I'm observing truncation. In the Number Validation Rules from Salesforce there is a Number Must Be an Integer validation rule ...
2
votes
1answer
82 views

sum of a field giving incorrect values when queried

I have a field called purchase price in orders table. When I query for those orders, I got 4 records. They are as follows Here, as per the above query, when i sum purchase_price__c, i am getting 194....
2
votes
1answer
267 views

Creating a lookup relationship between two standard objects using a custom field

We are using the standard Salesforce Account and Order objects and are populating records via the Bulk API (using jsforce). Both Account and Order have a custom field external_id__c, which is the ...
2
votes
1answer
137 views

How to Change a Custom Field to a Roll-up/Formula Field

I have a custom field on the Account object that had been getting populated by an external data source. We are making changes and will no longer be populating the field from the data source but are ...
2
votes
2answers
13 views

Managed custom field not being set in test script

I have this simplified code in a test script: Account acct = new Account(); acct.Name = 'Test Account'; acct.managed_package_custom_field__c = '12345'; insert acct; system.debug([SELECT Id, ...
2
votes
3answers
1k views

How can I get lastname and personemail from account?

I want to know LastName and PersonEmail from account. So I made sql like this: [SELECT AccountNumber, LastName, PersonEmail, Phone, BillingPostalCode FROM Account] But it doesn't work properly and ...
2
votes
2answers
926 views

Pardot API and custom fields in email templates

I'm using the Pardot REST API to send emails documented here: http://developer.pardot.com/kb/api-version-4/emails/#sending-one-to-one-emails It's all great but I would like to set custom fields in ...
2
votes
1answer
2k views

Cannot update a field to a Summary from something else

I've got a problem in which I'm trying to deploy something whereby a field of type Number is being changed to a summary field. What's happened is we created an object, Opportunity__c with two fields: ...
2
votes
1answer
71 views

Possible to Add a Lookup Relationship to Network Object?

I am looking to add a custom field that is of type "Lookup" or "Master-Detail" to the Network object. This appears to be missing from the list of objects that can be selected. Is it possible to do ...
2
votes
1answer
444 views

How to create custom buttons on Accounts and track them?

I´m quite new on Salesforce, and I have found a lot on some of this, but nothing on how to exactly do it. Does anyone have any idea on how to create a Custom Button on the Accounts Page Layout. I ...
2
votes
1answer
63 views

Adding a custom field and renaming header text

can i add custom field in salesforce like as on image? Not visualforce page 2.Can i rename header name in custom object form?
2
votes
1answer
140 views

Loop through a set of dynamic fields

I have a field set on a object and name of the field set is same as the recordtype of record. I am looping through a list of records and according to the name of recordtype need to display all the ...
2
votes
1answer
251 views

SOQL Query to lookup field dependency?

A change needs to be done to this attribute/field Global Account Flag_c. In order to do so, I want to lookup dependency of this field Global Account Flag_c in all the objects present in our Salesforce ...
2
votes
1answer
740 views

Lead conversion mapping - changing field reference

Our previous admin incorrectly set up our Accounts and Contacts to use a custom "lead_source" rather than the standard "leadsource" used in Leads. This make it impossible (for me) to map lead source ...
2
votes
1answer
3k views

Confused by default value of percent fields

As asked and learned here you need to enter 100 into a percent field to get 100%. BUT to set a percent field to 100% by default you need to enter 1 as default value. Otherwise it will result in 10.000....
2
votes
1answer
71 views

Attach Metadata to Class Object

I am looking for a way to attach metadata to an Apex Class. My scenario is as follows: Suppose you have 40 custom Apex classes. There are two major systems that use these classes, but system A uses ...
2
votes
3answers
50 views

Order matters database item

Trying to setup a database where it has a table with a bunch of devices, but when displaying the devices order matters. I would need to be able to insert/delete devices in any part of the chain. We ...
2
votes
1answer
917 views

Formula to set value on pick list based on user country

I have a question before using apex to accomplish this. On the Event page layout I'm using a couple of custom fields; Location_Country__c and Location__c. These fields have a field dependency, ...
2
votes
1answer
76 views

Unable to see new field in page

In my custom object I have added a new field that is used as an external ID. I have added the field to my page layout to ensure it is displayed, however I cannot see the field when adding new records. ...
2
votes
2answers
976 views

Control custom field formatting on layout page

I've few custom fields on Account object, which user will drag on to the Account Layout page by customizing it. I'd like to control the formatting of these fields on the layout. For example one of ...
2
votes
4answers
7k views

How to get the current record id value in URL field?

We are trying to get the current record ID value in custom URL field of that particular record. We tried this in formula field and its works fine but when tried this in a custom URL field it's not ...
2
votes
1answer
4k views

Custom Search functionality based on Account lookup in a VF Page

I have a Custom Object in which a lookup field(Acclook) is related to account has been created. On a VF page We have an Inputfield which is a lookup(Acclook) for account. Once we click the Search ...
2
votes
1answer
2k views

Custom New Button that creates record of specific type and parent record in Visualforce Controller (No URLFOR!)

Sorry for the lengthy title. But I want to make sure that I was not able to solve my problem with the standard answers to questions like this. I have a CustomObject_c that has many record types and a ...
2
votes
0answers
31 views

Which permissions are needed to access “CustomField” object?

We are using the metadata API to access field metadata such as description, data type, default value etc. This is for standard objects but on custom fields e.g.: SELECT Id, Metadata, TableEnumOrId ...
2
votes
1answer
127 views

SOQL Profile Id Bug Introduced in Summer 2019 Release

We have discovered SOQL Profile Id Bug Introduced in Summer 2019 Release. To reproduce this, we need to have either a Custom Object or Custom metadata with Custom Field of Text field which contains ...

1
3 4
5
6 7
18