Hot answers tagged

10 votes
Accepted

what is the use of data type in salesforce custom object?

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. ...
user avatar
9 votes
Accepted

Get the name of the Data Extension you are working with : Custom Activity

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('...
user avatar
8 votes
Accepted

Custom Communities Login Page With Forgotten Password Reset

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 :...
user avatar
  • 5,478
8 votes
Accepted

Session Id not getting refreshed automatically with Custom Auth provider in Salesforce Named Credentials

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 '...
user avatar
8 votes
Accepted

Does sending a file to an external server fall under the heap size limit considerations?

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 ...
user avatar
  • 129k
8 votes
Accepted

How do I create a Lightning web component that shows all the custom list views of an object?

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 {...
user avatar
7 votes
Accepted

What is the difference between My domain and sites domain?

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 ...
user avatar
  • 40.3k
7 votes
Accepted

Layout - How to rename related lists?

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 ...
user avatar
  • 430k
6 votes

custom controller with extension

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 ...
user avatar
  • 19.1k
6 votes
Accepted

How can one access custom settings directly from javascript without using Apex?

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 :...
user avatar
6 votes
Accepted

Retrieve custom labels in salesforce dynamically without mentioning the name of the label in the code

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"?> &...
user avatar
  • 6,089
6 votes
Accepted

Java script button with permission set

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"); ...
user avatar
  • 430k
6 votes
Accepted

Accessing Data Extension field values - Journey builder custom activity

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 ...
user avatar
6 votes
Accepted

Accessing subscriber profile attribute values - Journey builder custom activity

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: {{...
user avatar
  • 15.6k
6 votes

Can i query a custom metadata type within a loop?

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, ...
user avatar
  • 430k
6 votes

Get the name of the Data Extension you are working with : Custom Activity

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 ...
user avatar
5 votes

how to allow employees to post reviews for candidates

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 ...
user avatar
  • 308
4 votes

Finding if a custom field is editable using Apex code

Being editable and updateable is not the same thing for any sobject field. For example:ActivatedDate, ActivatedById, LastReferencedDate, LastViewedDate, StatusCode, EmailBouncedReason etc. These are ...
user avatar
4 votes

How to get Custom Settings in Apex Test code?

The following worked for me. The code that uses a token: Map<String, ServiceTokens__c> setting = ServiceTokens__c.getall(); ServiceTokens__c token = setting.get('Token__c'); ...
user avatar
4 votes
Accepted

How to bulkify a trigger that has unrelated objects

You have the right idea but need to think about this slightly different. First step, you get 2 sets of all of the different areas and codes. Just like you normally would for a Set of Ids for ...
user avatar
  • 6,009
4 votes
Accepted

How can I override clone correctly?

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 ...
user avatar
4 votes

Custom Labels Data retrieval with translations

Custom labels are metadata. Normal access through data loader would be limited. Either you can access it through the IDE, or some other metadata tool. Or, you can turn on Translation Workbench, ...
user avatar
  • 19.1k
4 votes

Trigger Not Firing - When Child Updated, Update Field on Master

Your logic to identify the master to update is a little wonky. You're not associating the master with its proper child. Check out my sample below. trigger updateMasterName on Child_Custom__c (before ...
user avatar
4 votes

How to display custom fields in Visual Force

A single field in this context where you want to pick your own label would be: <apex:pageBlockSectionItem> <apex:outputLabel value="{!$ObjectType.Lead.fields....
user avatar
  • 129k
4 votes
Accepted

How to embed a preexisting VF page into a section of the Account Page?

Make sure that page, that you want to add is using standartController of you object: <apex:page standardController="Opportunity" id="pg"> or <apex:page standardController="Account" ...
user avatar
  • 4,057
4 votes
Accepted

Javascript error - Unterminated String Constant

You can't declare multi-line strings in Javascript. Here is your issue: CEM = 'Dear {!mergeField} More Text ...'; Instead, you could concatenate the string if you want to break it up onto ...
user avatar
  • 142k
4 votes
Accepted

Custom Profile center code along with admin page in sfmc documentation clarification?

if you are trying to learn AMPscript, building an integrated custom profile center isn't the best starting point, as you really need to understand core language fundamentals such as rowsets, ...
user avatar
  • 15.6k
3 votes

Create a button on custom object that opens a new Event linked to that custom object

Yes you need to reference the html page element ids. For example tsk5 = Subject tsk3_mlktp = the related to object type (006 is opportunity, etc) tsk3 = the related to display name tsk3_lkid = the ...
user avatar
  • 2,842
3 votes
Accepted

Is it possible to get record data and SObject metadata in a single API call?

Using the standard APIs, it's not possible to retrieve record data and metadata in a single call. You could, however, write an Apex REST Method to accept an SObject type and record ID and return both ...
user avatar
  • 16.2k
3 votes

JavaScript Custom Button for updating Case Fields

If a window.confirm() prompt is sufficient, it could look like this: {!REQUIRESCRIPT("/soap/ajax/28.0/connection.js")} (function() { // update the case var caseObj = new sforce.SObject("...
user avatar
  • 22.3k

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