Questions tagged [code]

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

27 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
452 views

Team Foundation Server as source control for Salesforce Project?

Does anybody has experience on using Team Foundation Server as source control for Salesforce project? We are currently using Git but management wants to start using TFS as source control going ...
2
votes
0answers
36 views

How can i get data from a report in apex code but only from the first grouping level?

I have a report that has more than 1 grouping level but i only need the data from the first grouping level of each row returned. I have 125 rows for the first grouping level, i only want that data. ...
2
votes
0answers
414 views

Not getting Activation Email link from Code @ Exacttarget

I signed Up a Developer Account @ Code.Exacttarget, but it is not sending first time activation link to mail Id. It says wait for minutes, but it's been 3 hrs I haven't got link.
1
vote
1answer
127 views

I have written one trigger for update child records count on parent record and it's working fine but I want to know my approach is correct or not?

Trigger Trigger ContactCountTrigger on Contact(After Insert, After Delete , After Undelete, after Update) { ContactTriggerHandler cth = new ContactTriggerHandler(); if(trigger.isAfter) { ...
1
vote
0answers
436 views

Einstein (Wave) Analytics - Firing an update event from lightning component not working

I am trying to create a lightning component which will apply filter to a dashboard using wave:update event. This feature is available from Summer'17 release. Code for component: <aura:component ...
1
vote
0answers
208 views

Code Coverage 95% in sandbox and 47% in production for a class

I am at a loss right now why my code coverage is off for a particular class. I have @isTest(seeAllData = false) in my test class and I am creating my own data. I have also cloned a new sandbox from ...
1
vote
0answers
73 views

Lightning for Outlook Code

Does anyone know whether the code for Lightning for Outlook is open-source? If yes, where would we download the source files? If no, does anyone know whether there is an API available? We were ...
1
vote
0answers
698 views

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 seamlessly redirect the user to the community page from the login page. Now I ...
1
vote
0answers
434 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
vote
1answer
145 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 ...
1
vote
0answers
348 views

Salesforce Integration from third party app

I'm making saleforce integration from 3rd party app, I made callout(rest API) and got response xml schema (xsd) format. I'm trying to generate apex classes from xsd, wsdl generation is not working ...
1
vote
0answers
543 views

Custom Button Using Search Functionality

I have a project I'm stumped on. I'm adding a detail page button that uses the search functionality to create a Find Duplicates Button on Contacts. Below is the code I'm using. I'm getting the ...
0
votes
0answers
40 views

Download Attachments and Salesforce Files from Visualforce page

I am trying to modify Visualforce code to allow for the download of an attached file to the Incident ticket. Currently the file is listed with this code, but I need it to be a clickable download ...
0
votes
0answers
40 views

update global picklist values without using tooling api

How can we update global picklist values without using tooling api. Someone told me to use metadata api, but I could not do that. Is there another way to do that? If possible, I would like to see the ...
0
votes
0answers
49 views

Avoid Using Hard Coded Credentials for Authentication

We have done the code review by salesforce,and got "Avoid Using Hard Coded Credentials for Authentication" at quite some places where ever we are setting up Authorization Header.(On the 5th line of ...
0
votes
0answers
29 views

Lightning component on field number doesnt allow component.set in production but ok in sandbox

I have created a component, that consist of 2 checkboxes, and 4 fields (3 currency fields, 1 number), and a button that save this into a related record. I have seen some similar questions asked ...
0
votes
1answer
724 views

How to add multiple values in single text field?

What i am trying to do is I am querying a record if it has more than one result trying to store all those ids into a Text field. is it possible ? Part of Code: OppList = [Select id,Name,StageName,...
0
votes
1answer
22 views

need to pass data from one page to other page using only one controller

I have 2 VF pages Pag1 <apex:page controller="controller1" > <apex:form> Enter Text<apex:inputText value="{!input1}" /> <apex:commandButton action="{!show}...
0
votes
0answers
41 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
1answer
128 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 ...
0
votes
1answer
251 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
1answer
57 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; ...
0
votes
1answer
54 views

FIXED: Code request: Pre-populate Oppty Name

I've received an ask to have the "Opportunity Name" standard field be pre-populated when creating a new Opportunity in the format of "Account.Name - TODAY()"; as to create a cleaner naming convention ...
0
votes
1answer
225 views

Template changes font code when editing

I have created a template from different content areas based on free format. The problem I have is that at first all the content is charged on the template but when I want to edit the content of that ...
0
votes
1answer
26 views

When Activity Inserted by a User that matches User Lookup field on Account, The Date of the Activity is Put in CE_Last_Activity Field on Account

I have a trigger where I'm trying to make it work like the following: When a Activity record is inserted by a user that matches the value in a user lookup field on Accounts named "Customer Success ...
-2
votes
1answer
420 views

Incompatible value type Object

I am getting the following error while adding elements to a map. Error:- Incompatible value type Object Code:- public class CR_Report{ public void Completed_CR_Report(){ //Compare old zip ...
-2
votes
1answer
39 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 ...