Linked Questions

1
vote
3answers
6k views

Record Type Name in Test Class [duplicate]

I have a test class that creates records for use in unit tests. One of the components creates an Opportunity record, but I don't know how to add a Record Type to the Opp. I know I can use ...
3
votes
1answer
555 views

How do i check if recordtype exists for Lead [duplicate]

I am developing a managed package. i am accessing leads recordtypeid in my code if (rtypeMap.containsKey(Leads.recordtypeid) && rtypeMap.get(Leads.recordtypeid) != null && ...
0
votes
1answer
47 views

Get Record Type Id by Developer Name [duplicate]

How to get record type Id in apex having its system DeveloperName (not a Name/Label). UPD: There is a similar question here https://salesforce.stackexchange.com/search?q=What+would+be+the+best+...
0
votes
1answer
30 views

how to refer a record type in a apex class [duplicate]

I'm writing a Apex class to auto delete Case records of record type claims and service failure with created date older than 6 Years here is the code. But i'm failing to Refer the record type in the ...
0
votes
0answers
23 views

Method which takes in record ids and stores them? [duplicate]

I am trying to make a method in a helper class such that it fetches the record ids and stores them. Others should be able to call this method whenever they require the record type ID instead of ...
0
votes
0answers
19 views

Sending an email button - url parameters [duplicate]

I am trying to create a send email button for a custom sobject, but I am unsure where to find the rtype id for the particular object. I tried to follow the documentation but I couldn't find anything ...
3
votes
3answers
5k views

Apex - Setting RecordType error

I am trying to set a Case.RecordType and cannot figure out how. I tried: caseToAdd.RecordType = '012600000005DYN'; and for the heck of it I tried the Label itself which of course failed. With the ...
4
votes
2answers
5k views

How to run a trigger only for specific record types?

I have a trigger in place that runs for every order record created. I need this trigger to only run when for specific record types. I am not sure if by my trigger and test class needs to be updated of ...
4
votes
1answer
5k views

Translation, Localization and Internationalization Best Practices

There are plenty of things to keep in mind when trying to allow translation, localization and internationalization (t8n, l10n, i18n) in any framework. Salesforce has a whole infrastructure built ...
3
votes
1answer
7k views

Retrieving records filtered by RecordType in SOQL

I've got a custom object Show__c that has three different RecordTypes, including one named 'Regular Show'. Using an answer found in What would be the best approach to get the recordtype id, I'm ...
5
votes
2answers
1k views

Comparing arguments - wrong types

I have a custom object with a number of record types. Now, in my controller, I want to write an if statement to check whether the current record is a certain record type. I wrote: if (...
4
votes
3answers
3k views

how to direct a user to the record type selector from a VF page

Setup: I have a VF page that is called from a button. It acts like a router and has params attached to it. I need to send the user to either of the following based on logic the record selector for ...
2
votes
1answer
2k views

Getting record type id by developer name without making query [duplicate]

We have below describe call to get the record type id by name. Id recordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByName().get('RECORD_TYPE_NAME_NOT_DEVELOPER_NAME').getRecordTypeId(); This ...
2
votes
1answer
2k views

Show record type values as radio buttons on visualforce page

I have two record types on a custom object and I have to show them as radio buttons on the visualforce page and render pageblock tables accordingly.I am unable to fetch record type name and display ...
4
votes
1answer
772 views

Is there a good way to “untranslate” picklists in Apex?

The project I am working on supports many languages and Case record types. There is also a large amount of dependency between the Case record type and the Case type field (but it isn't one-to-one and ...

15 30 50 per page