Hot answers tagged

59

Just like normal SObjects, your Test Context doesn't have access to the custom setting records already in the database. Preferred solution You can perfectly, insert a new Custom Setting record, in your test context like you would normally do with an SObject Whatever_custom_setting__c setting = new Whatever_custom_setting__c(); setting.Name = 'Test Setting'...


16

Map<String, Schema.SObjectField> map = Schema.SObjectType.Custom1__c.fields.getMap(); for(String fieldName : map.keySet()) { if(map.get(fieldName).getDescribe().isUpdateable()) { custom1.put(fieldName , 'some value'); } }


13

As Doug says, this is not apparently possible in Salesforce Cron trigger. You may want to consider a 'self re-scheduling' job, e.g. global class SelfSchedule implements schedulable { global void execute( SchedulableContext SC ) { // do whatever it is you want to do here SelfSchedule.start(); ...


10

Available through the Describe API. You are looking for Schema.DescribeFieldResult.isUpdateable().


10

You can define the object name with text type or autonumber If you select Text then you can manually enter value in name field. If you select Autonumber then Name field will be generate automatic. For auto-number fields, enter a Display Format to control formatting details such as the minimum number of leading zeros and any prefix or suffix for the number....


8

Leads have specific uses: queues, lead assignment rules, auto response rules, web-to-lead, "unread by owner" field, campaign integration, and reporting. Let's go over each feature in more detail, shall we? Queues Queues let groups of people pick from a common pool of leads they want to follow up on. Very few organizations use this feature as it is, I ...


8

I got the same problem and I just fixed it by enabling ChatterAnswer. Enable ChatterAnswer : Setup > Customize > Chatter Answer > Setting > tick Enable Chatter Answers Customize your site/community : Setup > Customize > Chatter Answer > Site Setting, enable for your community. Just after that it should display all the pages you can override.


8

Various Apex limits will get in the way of trying to push the data from Salesforce. Instead, one approach is to signal to the third-party application that the file is ready to be moved via a HTTPS call (that supplies the URL) and have that third-party application pull the data from Salesforce. Or if the third-party application can't be programmed to do that,...


7

Relationship fields (and picklist fields) are not included in the search. Though the enhanced lookup search covers more than just the name field, the search scope is still limited to searchable fields on the object, which include: Auto-number fields and custom fields that are set as an external ID Email and phone fields Fields of type text, text area, long ...


7

MyDomain is a custom URL to directly log-in to your Salesforce Instance rather than going through https//login.Salesforce.com. You can go through either one to reach your instance, but it allows for custom branding of the log-in experience and also provides a namspace for any Lightning Components in your Org. A sites Domain is different in that it is a ...


6

Standard UI Route: You didn't mention if you are using Visualforce or not. If you wanted a standard UI solution. Then a combination of a formula field and your text field may provide the formatting you need. The standard text field would need some validation, to check length and prevent dash '-' characters being entered. The formula for the second field ...


6

A custom component is rendered as part of the parent apex:page, and an apex:form in a custom component is rendered as part of the page. It has to submit (action='...') to the parent page - the component only exists in the context of the parent. But other parts of the page (including hidden inputs) route the action to the component's controller. If you ...


6

You said you want to send it to "fixed email address" You don't need "To" field. "To" will correspond to "recipient" record (Contact/Lead/User) which can be referred to in the email template. For just a hardcoded mailbox use "Additional To" instead: &p24=example@example.com If you want to populate the "To" after all p2 is the visible name field, "John ...


6

RE: 1. How does the licensing works force.com custom application? Salesforce provides a licensing engine to it's Partners called License Management Application (LMA). It is available to eligible partners (it's free to become one) and after your managed package has been security reviewed (free for free packages) they will provide you with the installation ...


6

Same as you would access them in visualforce: <script type="text/javascript"> var url = "{!$Setup.MyCustomSet__c.URL__c}"; alert(url); </script> If you google you won't miss it :)! Source


6

It is possible to have an extension for a custom controller. Let's say my custom controller is this: public with sharing class MyController { ... } My extension could then have a contructor that is called when this class is the controller for a page: public with sharing class MyExtension { ... public MyExtension(MyController ctrlParam) { } } You ...


6

You can use the Metadata API to pull down all the labels at once by using the wildcard character. Here is an example package.xml for accomplishing this: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>*</members> <name>CustomLabels</name> ...


6

Just an update for anyone facing the same issue. After raising a case with SF we could confirm that the refresh function is only triggered to get new session Id in case the previous callout return '401' status code only (Only way for SF to know that the session is expired)


6

There's no need to go through all this work. Just create a custom permission, then access it via $Permission: if({!$Permission.Manage_Accounts}) { var record = new sforce.SObject("Address"); record.Id = "{!Address.Id}"; record.Integration = true; var results = sforce.connection.update([record]); // Consider checking results to ensure ...


6

Update It has just occurred to me that it is possible to retrieve Email Subscriber Profile Attributes using Data Binding. I don't know why this didn't occur to me earlier. Simply use the string: {{Contact.Attribute."Email Demographics".sub_id}} Note that this will only work for required attributes. If sub_id is nullable (that is, it does not ...


6

You can use undocumented 'requestSchema' Postmonger event to retrieve schema of event data source: connection.trigger('requestSchema'); Than use response from Journey Builder: connection.on('requestedSchema', function (data) { // save schema console.log('*** Schema ***', JSON.stringify(data['schema'])); }); Extract relevant information and save it ...


6

You can use requestedTriggerEventDefinition Postmonger event, it will return a schema that will return information about the Journey builder(Name,dataExtensionId,...) to you. You need the field eventDefinitionKey and use it instead of your data extension 'Contacts'. Here is an example of what it would be like var eventDefinitionKey; connection.trigger('...


6

You can change the Related List Label by modifying the Related List Label field on the field that references the parent object. In your case, if you go to the object CaseBugJunctionObject, edit the field that references the Case object, you can change the Related List Label. Note that this label must be the same for all layouts that this Related List is ...


5

The main thing that the Service Cloud feature license will give the user is the ability to use a Service Cloud Console. If you are operating a call center with a high volume of calls per agent, then I would strongly suggest using the Service Cloud Console. Even more so, if they handle concurrent calls. This is the main thing that feature license gives the ...


5

There are lots of ways you can do something like this, but the most important thing to consider first are what the other requirements of the application will be. Will all of your employees be Salesforce users? For the purposes of this answer, I will assume yes. Will the feedback on candidates be largely unstructured (comments only) or will there be ...


5

If those values are part of the entry event, you can access them using the following expression: {{Event.<YOUR ENTRY EVENT DEFINITION KEY>.\"<EVENT DATA ID PATH>\"}} If not, you need to link the data extension correctly to an attribute group in contact builder, for it to be available for data binding in the arguments of your custom activity. In ...


5

The documentation states that you do get unlimited queries, but you're still limited by query rows. As such, you should attempt to optimize your code to use as few queries as possible. For example, here's the output from one of our metadata tables that has 1,224 rows, when we query it once: 21:20:52.1 (241740102)|USER_DEBUG|[3]|DEBUG|Limits.getQueryRows: ...


5

Take a look into the lightning/uiListApi module. It has below functionality - Get list view records and metadata for a list view by API name import { LightningElement, wire } from 'lwc'; import { getListUi } from 'lightning/uiListApi'; import ACCOUNT_OBJECT from '@salesforce/schema/Account'; export default class Example extends LightningElement {...


4

You are mixing your drinks! Looks like you want client-evaluated code in server-evaluated functions ;-) Try this: window.parent.location.href="{!URLFOR($Action.Event.NewEvent, null, [ who_id=pba__Request__c.Id, what_id=pba__Request__c.Id, retURL=URLFOR($Action.pba__Request__c.View, pba__Request__c.Id), evt3=pba__Request__c.Name, evt5="...


4

I assume you mean to override the standard Clone button... To do this you need to implement a Visualforce page using the StandardController and an Extension Controller which contains the custom Apex clone logic. The name of the method providing this is not important and you should avoid using clone as it is reserved for cloning Apex objects in general not ...


Only top voted, non community-wiki answers of a minimum length are eligible