The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
36 views

Address Field in Salesforce

I want to have an address field on Opportunity.I know there is no Address data type.How to achieve something like a Standard Address field like Account's Billing Address.
1
vote
1answer
29 views

How to change the Event object Description Field type to Rich Text?

As the question says, I would like to change the data type of the Description field on Event Object? Currently it is Text Area but we would like to change it as Rich Text Are as we have some html ...
1
vote
1answer
81 views

Convert an array of ids to a csv string with quotes

I have a webservice method that takes the $_REQUEST from the URL parameter of my app and I believe handles it like an array, for example: inputs.param1 = "some_value" inputs.param2 = "1209845, ...
1
vote
1answer
232 views

Convert Custom field type from text to lookup/master-detail in salesforce

I have created custom field with Text data type..For some reason I need to change the field type to a look-up/master-detail relationship. But when i click on "Change Field Type" button for that ...
1
vote
2answers
312 views

Change field Data Type without removing all references to said field in Controllers and Classes

Is it possible to change a field's Data Type without removing all references to it in controllers and classes? I'm considering changing a Rich Text Area to a Long Text Area. I'm receiving the ...
2
votes
2answers
671 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 ...
4
votes
3answers
204 views

Getting a type of the generic object

How to get a type of the generic object? I have a method that gets as parameter some object. It can be realy everything. In my example it is a list of strings. But it can be a map or set or some other ...
13
votes
4answers
1k views

How to get the Runtime-Type of an Object dynamically (for Primitive Data Types and SObjects)

Is it possible to get the Type of an Object (it's not an SObject)? String s = 'test'; doSomething(s); public static void doSomething(o Object) { // need to find out if o is a string or an ...
2
votes
1answer
176 views

Equivalent data type in standard or custom object to persists blob data?

I have built a webservice in salesforce so that it is being consumed from SAP. So, when a sales order is created in SAP, it would call the salesforce webservice and post the sales order details and ...
2
votes
1answer
408 views

Dynamic Type Casting of Inputs

I am using apex:input on a VisualForce page to take in a variety of input types. I store values separately for Dates, DateTimes and Strings, as they have their own input 'types.' However, for numeric ...
2
votes
1answer
81 views

Why is 'Data Type' not defined on my custom field?

Why is datatype not defined on my custom field (circled below)? And how can I define it?
2
votes
2answers
382 views

What datatype for time only? (without date)

What is the correct datatype for a field that represents a time of day for a recurring event? I'm building a class enrollment system (for a hypothetical university, as a school project), and I need ...
3
votes
1answer
1k views

How to get DataType in Apex

I am using utility class methods which are called in test class to populate all fields of say XYZ object.But i have a field in XYZ object which is formula field. As it is read only i would not want to ...
3
votes
1answer
82 views

What is the max number of characters are allowed in a Phone field?

What is the maximum number of characters allowed in a field set with the Phone type? The online documentation that I found only says: Phone fields contain phone numbers, which can include ...
7
votes
2answers
2k views

Some boolean values are 0/1 and some are true/false

What are the standard values for boolean datatype? I have two columns like below in different tables. One table has values like 0 and 1 and the other table has true and false. I need this to set a ...
6
votes
1answer
173 views

Why was OwnerId deleted when custom object was refactored with Master-Detail(Account)?

Simple question, but conceptually I do not understand why Salesforce should want to enforces this policy. We created a custom object, loaded some data to it and selected a user as owner for the ...
7
votes
1answer
896 views

Importing string typed data into an sobject

I have a relatively large Map<String, String> which is basically a key/value map of sobject field names and their values. Obviously, all the values are strings, but fields are not (there are ...
5
votes
5answers
11k views

How does Static variable and Static method works

I read in salesforce documentation - Static variables are only static within the scope of the request. They’re not static across the server, or across the entire organization. Can any one ...
1
vote
1answer
1k views

How to set the value of a currency field from a formatted string

In apex, how would you set the value of a currency field with a formatted string? See the sample code: String price = '$1,000.00'; MyObj__c obj = new MyObj__c(); // this line won't compile, so ...
1
vote
2answers
998 views

Pass parameters to constructor when using System.Type.newInstance()

I have created an Apex InterfaceFactory that the user can use to get an instance of a specified implementation of an interface. For this I use the System.Type class. The actual name of the class can ...
7
votes
1answer
4k views

Can you convert a Master-Detail relationship to a Lookup if it's referenced in code?

I've got a Master-Detail relationship on a custom object where the parent is the Account object. There are no roll-up summary fields on the Account object, and there are no formula fields on the ...