Code indicates that a question is to do with pages, controllers or similar, and not the declarative aspects of the platform.

learn more… | top users | synonyms

0
votes
2answers
26 views

Include formula in manual Custom Percent Field for one Record Type while manually filling it out for another Record Type

I have two Opportunity Record Types, Record Type 1 and Record Type 2. For Opportunity Record Type 1, a custom percent field 'Profit Margin' must be manually input. For Opportunity Record Type 2, is ...
1
vote
1answer
27 views

Radar Chart Help2

So I have a Radar Chart which is working well. I would like to make an improvement to it but not sure how to. Currently the Radar Charts 'axis' defaults to the highest value inputted in the Fields ...
0
votes
2answers
34 views

Help with regex

I have a string with the following format: "01/12 : Some random comment here. 12/12 : Another comment.". I want to extract the following data using regex (or some other way): Date 1: 01/12 Comment 1:...
0
votes
1answer
20 views

Specify record type for Opportunity Custom button- Mass edit

I'm not familiar with Javascript at all, but trying to create a button which allows users to mass-edit some key fields of their opportunities. I have the below by copying the code of the preset button ...
4
votes
2answers
53 views

Offline tool that can show dependencies between different metadata files

I was looking for a some kind of app (other than ant migration tool) that could analyze a code base pulled from a Salesforce org and show all dependencies between the files (for example – between apex ...
0
votes
0answers
35 views

email2case - capture all email addresses from email and find match

What I have right now I have a working APEX trigger (before insert) which creates a contact from SuppliedEmail and assigns it to a specific account. What I need I would like to add one condition at ...
-1
votes
1answer
37 views

Do we have any APEX code scanner? [duplicate]

Need a tool to analyse apex code vulnerabilities and provide solutions.
1
vote
2answers
41 views

APEX class - code coverage in Developer edition

I am fairly new in Salesforce, exposed to developer edition only. I would like to know - whether there is any code coverage requirement for an APEX class to be used? I am aware that in Enterprise ...
0
votes
0answers
12 views

Opportunity product search testclass is getting assertion error

I am getting error while running Apex Test Execution System.AssertException: Assertion Failed Class.opportunityProductEntryTests.theTests: line 80, column 1 Below is the test class @istest(...
0
votes
0answers
33 views

Email is not being send?

<apex:page id="forgotPassword" showHeader="false" controller="ForgotPasswordController1" title="{!$Label.site.forgot_password}"> <apex:composition template="{!$Site.Template}"> <...
0
votes
2answers
22 views

Convert Difference Date time into Decimal sum

I need to solve this issue: I've got two datetime values, startDate and EndDate of multiple event and I need to sum the difference between those two date for each event and convert it to a Decimal ...
1
vote
1answer
75 views

Security scanner: enforcing CRUD. Auto scanner reported issue

I have a question here regarding to Security scan: enforcing CRUD. For the example case deletion, but we also have problems with update and creation. Before I delete a record, I apply deletable check ...
0
votes
0answers
13 views

Custom Button on Account to Run Report related to open opportunities and attach or embed in email template

I am looking to create a custom button that would be on the account object that would allow a user to run a report displaying open opportunities pertaining to that account record, and then take that ...
-1
votes
1answer
49 views

Select the all check boxes by a single click in the header column check box?

My Controller: public class AccountEditController { public String closePopup { get; set; } accountwrapper1 makeEdit; List<accountwrapper1> listAccount = new List<...
1
vote
0answers
54 views

Customizing SAML JIT Handler

I am new to salesforce and need urgent help on customizing SAML JIT Handler. The Requirement is to enable SSO for all users and if the user is a new user then create an account for the user and ...
1
vote
0answers
45 views

Adding data to a Data Extension by using Collect Code

I am researching for the best way to do this: Capture abandoned cart information from website Fire journey with data captured from abandoned cart As far as I know, we can use Collect Code (<...
-1
votes
1answer
31 views

The record is inserting multiple times. How to avoid recurssion?

Using apex class I am inserting records into the Opportunity Line items. Here I am inserting from the custom object. Based on the family I am inserting only one record per family in the Opportunity ...
2
votes
1answer
33 views

show/hide a div if radio selection is true

I want to show all contents inside a div if a user selects a radio button (true). If false to hide it. By default I have styled one of the div to display:none. Its partially working. My trouble is ...
0
votes
1answer
15 views

I want to edit and save and new entered value in the Billing country is stored the appropriate account by using apex code

My Page: <apex:page controller="UpdateBillingAddressController"> <apex:form> <apex:pageBlock> <apex:pageBlockTable var="account" value="{!AccountList}" ...
0
votes
1answer
46 views

test class code coverage problem approval process with processs instance workitems

in below test class is not covering the BatchSendEmailAlerts8 code guide me where i am wrong...not covering part: mailIdsMap.put(PIobj.ProcessInstance.TargetObjectId,PIobj.actor.email); and ...
2
votes
1answer
91 views

The lookup field is not displaying on VF page

My VF page will display list of records of custom objects. In the page I am adding input lookup field. When I added to the VF page it is showing empty. It is displaying all fields except Lookup field. ...
4
votes
1answer
27 views

Ghost Text in Apex Class Editor [duplicate]

I seem to have turned some weird setting on in Salesforce that "highlights" the line of code that the cursor is currently at. Whatever it is, it doesn't work very well and covers up text that I need ...
0
votes
0answers
16 views

Fuel SDK - Send Tracking Export

We have nearly 100 campaigns whose recipient list needs to be retrieved. I'm trying to automate it through an API Call and used lists to retrieve emails through the subscriber key. But tried all the ...
1
vote
1answer
45 views

Updating existing record creating new account in salesforce

I have created a Event Staging object and a trigger which creates Events/Event Relations after insert of an Event Staging record. There is a field meetingUID on EventStaging.It is not set set to ...
3
votes
2answers
120 views

Test Classes are included in code coverage

I've looked at a few questions but couldn't find the responses that worked for me. I've attached a screenshot of my classes and all of their code coverage. Any class ending in test is a test class. ...
0
votes
1answer
32 views

Use case of the code [closed]

On exploring collections, I came across the following code: String myName = [select Id, managerName, address__c from User where Id =: userInfo.getUserId()].managerName; I see that myName will ...
2
votes
1answer
161 views

Insert failed. First exception on row 0; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []

I am trying to add users to the chatter groups based on region field on User object using trigger and apex class. When ever I am creating or updating a user it is giving Invalid Cross reference key ...
1
vote
2answers
37 views

How to write logic for apex class to pull all records at first call and then only the records created yesterday? [closed]

I created a web-service class to expose custom object data. So in the first call we want to pull all the records and then after that we want the records that are created or last modified only ...
0
votes
1answer
27 views

Need code sample to create a report that counts unique event to one customer on multiple days [closed]

I am trying to create a unique customer touches report. Meaning if I create an event on a customer site 5 times on a particular day, and 2 events for the same customer on a different day, we could ...
0
votes
1answer
23 views

How do I edit the Contacts page through the Developer console?

I'm a complete novice when it comes to the Developer Console, and coding in general. I'd like to change the width and height of a field on the Contacts page (it's a formula text field), but so far, ...
0
votes
0answers
116 views

Oauth 2.0 works from rest client but not from java program

Our java team is trying to establish Oauth 2.0 connection with our dev salesforce instance and its failing with internal server error message as below , while the same works with Firefox restclient ...
4
votes
2answers
408 views

Can we access class properties dynamically with Object class?

Is it possible to access Apex class properties dynamically? While we can create Object's, and assign any other class to an Object, I'm not sure how I can access the properties of these Object's. Can ...
4
votes
1answer
83 views

Tools for code Evaluation [closed]

is there any tools to test the logic at what point will hit the saleforce governor limits (applicable only)?? Any sophisticated tools other PMD to evaluate your code against the salesforce best ...
0
votes
1answer
37 views

AMPscript IndexOf / If Product Included in list

I'd like to display a bulleted list of available products (i.e. Prod1, Prod2, Prod3) based on a list of already-purchased products stored in "Product List" column. I've gotten far enough to think that ...
0
votes
2answers
94 views

How to check if a particular value in a set?

I am taking input values from a CSV file using an Apex class. Whenever the currency code is null it's hitting validation error: Currency ISO Code: invalid currency code: ". " So to handle that, ...
1
vote
1answer
51 views

How to compare values in Excel file before uploading?

Inserting excel file using apex, I have 4 columns in file,Column-1 (Name) can contain duplicate values. I want to perform check if column-1 has same values (for example A) and column-2(codes) has ...
2
votes
3answers
107 views

How to check the field value is same for all the records in the list?

I am retrieving records in the list and I want to check if the field Code__c is same for all the records. If not I want to give an error and make sure the field value is same for all the records in ...
1
vote
1answer
78 views

Redirect Back to visualforce Page after successful attachment from a second visualforce page

I have a visualforce page having a Case detail view from which there is a link which opens a new visualforce Page for attachment for that particular case. I am opening that attachment visualforce page ...
0
votes
2answers
130 views

Change Date & Time Format in AMPScript Populated content

I'm working on an e-mail in SalesForce Marketing Cloud that uses AMPScript to populate and event start time. The data extension field that populates the AMP Script is set as a text field, ...
1
vote
1answer
112 views

How to check the map key value with field value?

I am trying to write condition in the class if "field1__c is not equal to map1 key value and field2__c is not equal to map1 key value " then it should throw an error. After assigning when I checked ...
0
votes
1answer
58 views

How to add map value to the object field?

I am inserting records using excel file on VF page. So based on the values I want to map the product names while inserting. I am trying the below code it is inserting all (I want to insert record if ...
0
votes
1answer
117 views

How do I cover 'addError' in test class

My Requirement is I have to cover so.AddError() in the test class. Apex Class: if(accountToUpdate.Inactive__c== true && accountToUpdate.Inactive__c <> accountBeforeUpdate.Inactive__c) ...
-3
votes
1answer
53 views

Code Coverage 0% Cant add to salesforce

I'm just trying to put this code into production and its not letting me! Trigger OppProdLine on Opportunity (before update) { list<opportunity> sl = trigger.new; list<...
1
vote
2answers
66 views

Can we get list of fields(matadata)

I need something like this **Field Label Field Name/API Name Data Type** Standard Campaign Campaign Lookup(Campaign) Standard City City ...
4
votes
1answer
171 views

How to initialize date type variable

I am using date type variable public Date arrivalDate {get;set;} now my question is how we will initialize this variable in constructor in proper way, if I use this whats the meaning of 1,1,1. ...
2
votes
1answer
160 views

Is this Apex coding similar to Java scripting?

I don't have prior knowledge in coding. But would like to know and learn more about Salesforce Development and coding in Apex. I heard that Apex is more or like Java script, Is it true? Whether a ...
0
votes
1answer
42 views

test class -standard controller

public with sharing class accountsearch { public String searchvalue{set;get;} public string mymessages{get; set;} public String searchtext { get; set; } public Boolean val{get; ...
4
votes
1answer
81 views

What can I use instead of <apex:tabPanel> in Lightning Experience

I am using in a Visualforce page to displaying of fields from an object that contains more than 100 fields and it is working as expected. I want to create a version of this sort of layout in ...
0
votes
1answer
107 views

Date Filter with AMPScript

I am trying to pull out Tracking Event data, using the "TrackingEvent" Object Type. I need to find tracking event data for a subscriber within the last 30 days. How do I create a simplefilterpart ...
0
votes
2answers
105 views

Error: Compile Error: expecting a colon, found 'oli.OpportunityId' at line 6 column 80

here i am trying to fetch opportunity lookup id from opportunityLineItems bt getting this error.- Error: Compile Error: expecting a colon, found 'oli.OpportunityId' at line 6 column 80 can ...