A proprietary Java-like programming language for the Force.com Platform.

learn more… | top users | synonyms (1)

-1
votes
1answer
13 views

How to replace all {!XXX} from string?

I have string with multiple {!XXX} phrases. For example: String sTemp = 'Kumar gaurav {!str1} is just {!str2}, adasdas {!str3}'; I need to replace all {!str} values with corresponding str, How to ...
-1
votes
1answer
26 views

Please correct my Test class [on hold]

public without sharing class OpportunityUtility { public static void assignAccountToAM(String opportunityId){ Opportunity oppRec = [Select Id, ...
0
votes
1answer
11 views

Apex: How to write test code for processing read-only object?

I'm querying records of an object called "ContentVersionHistory" in my code. In my test method, I tried to create some test records of this object but I received error "DML operation INSERT not ...
1
vote
2answers
28 views

Bulkifying Apex code issue from a non coder, updating related record based on soql query in apex

I have some proof of concept code but I know that in a production environment it would quickly run into governor limits issues. In order tho minimize user licence cost there is a use case where ...
1
vote
1answer
26 views

Call to APEX REST from inflexible system

I'm trying to call an APEX REST service from another system. The other system is not capable of JSON, it can pass data in XML only for PUT or POST, or in the querystring for GET. So far, all of my ...
0
votes
0answers
21 views

Exception Handling [on hold]

I have a Remote action in a controller. I make a call to soap based web service from a method. I call a method in a helper class for the same. Sometimes a time out exception occurs while calling ...
0
votes
0answers
19 views

Trigger to update related Account record type when Contract status = Activated

I need to write a trigger so that when a new Contract (standard object) is created and activated e.g Contract.Status = Activated, the related Account record types update like this: Vendor Prospect -> ...
0
votes
0answers
11 views

Efficient, governor-aware string processing/validation in apex

I need to make sure that a string only contains ASCII characters and not any other character (e.g., from another alphabet). I need to run this in real-time on hundreds of text fields so performance is ...
0
votes
1answer
28 views

How to use for loop for Map?

This is code : count=10; for (Integer idx=0; idx<count; idx++){ qliw.comments__c='teja'+count; qouteLineItemMap.put(count,qliw); } ...
1
vote
2answers
16 views

SOQL: Execute Anonymous and Query Editor returning different results

I'm trying to query Task from Lead. In the developer console > query editor, I have the following SOQL query: SELECT name, (SELECT id, subject, description FROM Tasks) FROM Lead WHERE id = ...
0
votes
1answer
15 views

Using a CommandButton/CommandLink to Open a New Tab/Window

I'm looking to use either a CommandButton or a CommandLink to open a new tab or window. This is largely a problem because the URL is somewhat dynamic. Effectively I have a list with checkboxes, the ...
3
votes
1answer
86 views

How to sort keys in MAP while grouping

I am trying to insert list of wrapper class records in a MAP taking group name as KEY and related Wrapper class records as value pair . the wrapper classes were public class SCQLWrapperClass { ...
2
votes
3answers
72 views

Picklist Formula Sum Question

I have created the above formula to accomplish a sum of 20 number value picklists and it came out to 6,233 characters. As you all know, the compile limit is 5000. What can I do to circumvent this? ...
0
votes
0answers
21 views

I am writing a trigger on email message which will check whether the out_of_office checkbox is checked and will send an OOO reply through workflow

I have created a custom field on User object: Out_of_Office_Email_Address__c --Email field Out_of_office__c -- checkbox field I am writing a trigger on email message which will check whether the ...
0
votes
1answer
21 views

Capture creation of a public group

I need a way to capture the creation of a public group. I was thinking about triggers(after insert for example), but apparently public groups do not have triggers. Is there another way to execute ...
0
votes
2answers
27 views

how to get acknowledgement after Apex Batch process complete

I am run a batch class from a normal class using Database.executeBatch method, steps below the batch execute methods are executing before the Batch process is completed. Does there is any way to ...
-1
votes
1answer
35 views

Trigger to update related Account record type

I need to write a trigger so that when a new Contract (standard object) is created and activated e.g Contract.Status = Activated, the related Account record types update like this: Vendor Prospect -> ...
1
vote
3answers
54 views

How to merge sObject's data to String

I need help to write a method which will do some kind of string merge. I have an object having some data. It may be any object.Like this: Account oAccount = [select id,Name from Account limit 1]; ...
-1
votes
1answer
32 views

How to cover boolean method in test class in sales force? [on hold]

in my apex class boolean methods are not covered, for this reason i get 30% code coverage. How to cover those methods? any one can help me... public with sharing class ...
1
vote
0answers
16 views

Set Record Type using Change Link - Visualforce Page Overrides

I have currently overridden the Edit/View/New buttons for the Opportunity object. Everything is working awesome except when I click the "Change" button beside the Record Type. At this point, I am ...
1
vote
2answers
33 views

Show a loading image/message in the onLoad event of a Visualforce page

I tried this and this without luck before posting. I have a visualforce page that executes a lot of loops and computations based on custom objects and it takes about 6 - 8 seconds for it to load ...
0
votes
2answers
42 views

Question on date fields in visualforce page

When I use a date field in a VF page and try to do validation and return a validation error - such as, if date can't be greater than today's date, the date format automatically changes to something ...
0
votes
1answer
20 views

Help on Multiselect Contact values

I have created custom multiselect vf page which is working fine. But the problem comes when I start searching the contacts. Whenever I am trying to search more than once then I am losing my selected ...
0
votes
1answer
28 views

How to pan to a marker in apex map component on a visualforce page

I currently have a visualforce component in the account details page. In that component is an apex map component which has markers on it for accounts close to the current one of the details page you ...
2
votes
1answer
30 views

How to Reproduce the Concurrent Requests Limit?

I'm trying to write code that will reproduce the Concurrent Requests limit (10 requests longer than 5 seconds, described here: ...
1
vote
0answers
16 views

Override Standard Documents Home Tab/Document Detail Page

Is it possible to override the Documents home tab or Document detail page's buttons, links, and actions or page layout? Salesforce describes how to override standard buttons and tabs here, but this ...
6
votes
1answer
99 views

What is the difference between pageBlockTable, dataTable and repeat?

I am not sure if this is against the forum policy but just wanted to know from experienced people on what is the difference between pageBlockTable, dataTable and repeat? This is what I have found so ...
0
votes
2answers
35 views

Writing test code

Need to write test code for the following Apex Class: public with sharing class whitespace{ transient public String AccountID{get;set;} transient public String PAccountID{get;set;} ...
-2
votes
0answers
10 views

Hover Mini Pagelayout displaying with controller? [on hold]

VF page: <apex:page controller="HoverMiniPagelayout"> <apex:form > <apex:repeat value="{!accounts}" var="acc"> <br/> <a href="/{!acc.id}" id="{!acc.id}" ...
0
votes
0answers
33 views

please modify my code-REST API [on hold]

how to call outside data in this controller?.please find the screenshot,can you please help me[https://lightningconect.ap2.visual.force.com/apex/UIviewPage][1] the screenshot display the only ...
0
votes
1answer
32 views

How to render a value to string which is coming from sObjcet Long Text area in saleforce Apex Class [on hold]

I have a sObject which has a Long Text Area field "Account_Id" which contains , "'Account Name'+Account.name" but when i want to replace "Account.name" value from my Apex class than i am failed. e.g. ...
0
votes
1answer
24 views

How can i get search string with space using JSON?

I have created a class using API end point URL, While getting its response we are able to observe blank spaces in the output string which should not be present. Please help me out with a solution. ...
0
votes
1answer
19 views

Can't access child Data Categories

I'm trying to get all Data Categories from an Article Type through the varius describe calls I've found in the documentation such as ...
0
votes
1answer
49 views

How to query picklist item in the WHERE clause

I have the following function to get the available roles: public List<String> getConsulteeRoles(){ List<String> str = new List<String>(); List<SelectOption>roles = new ...
0
votes
1answer
31 views

Uploading two files simultaneously not working

I am trying to upload two doc at a time and saving both the files. But only 1st file is getting saved not the second one. Please help. public void UploadPhoto(){ try{ con.Name= ...
0
votes
2answers
29 views

Show wrapperClass to visualforce page

Good day everyone, I have created a wrapper class which is something like this: public class wrapperClass { public Map<String,List<String>> selectedDefinitionList{get;set;} ...
4
votes
2answers
133 views

Class cannot be static in Apex

This might be a duplicate question but I couldn't find any answers. According to the documentation: In Apex, you can have static methods, variables, and initialization code. However, Apex ...
1
vote
1answer
10 views

apex:inputFile can not be used in conjunction with an action component

I am getting the below error while saving the data. Please let me know where i am doing wrong - apex:inputFile can not be used in conjunction with an action component, apex:commandButton or ...
0
votes
1answer
21 views

How to give file upload success message in vf page

I want to give a file upload and record insert success message. I am udsing the below apex class. Can anyone help me how to give success message. public with sharing class devoteeinsert{ ...
0
votes
1answer
25 views

How to show list of all users name in a related list who have visited a case?

I want to display the names of all users in a related list on case detail page who have visited that specific case record? For e.g : Case number 123 has been viewd by user "A" and user "B" so the ...
0
votes
0answers
19 views

Removing Inactive Users From Public Groups

Is there any way to automatically remove inactive Users from Public Groups? We have multiple public groups and on creation of a Resource Request record different groups get an email alert. We are ...
0
votes
0answers
23 views

Cant't able to query the lookup field to check condition

Below is my query List<AggregateResult> ar = [SELECT AccountId, Sum(ACV__c) ACVSum ,Sum(Total_Contract_Value__c) TCVSum from Opportunity where AccountId in :qualifiedAccIds and StageName = '6 - ...
0
votes
1answer
31 views

In use Field Restriction Trigger

Hii I have written a trigger which will restrict Field named as "In USE", This trigger is working fine, but when i am going to uncheck "IN USE" and try to save it , it is showing me error.Actually my ...
0
votes
0answers
9 views

API timeout issue, connecting to Parse database

We have an API integration built out between Salesforce and Parse. We've limited our record size to a couple thousand for testing purposes and now that we've completed our mappings, are wanting to ...
1
vote
2answers
33 views

how to delete a row?

I have created a table with edit, create and delete options of record. But I have a issue in deleting operation. When am trying to delete the last row of table, all the rows are deleted except the ...
0
votes
1answer
28 views

SOQL query date condition?

I need a where clause on task..where its calculates the count of tasks every week between Friday and Thursday.. I know it will be a Aggregate query.I am confused how to calculate every-week..What ...
0
votes
0answers
14 views

Visual flow using Apex class plugin

I am new to visual flow process builder . I have some doubt in this topic .Could you please help on this.. Scenario : (survey question or feedback question) I have two object called Question and ...
2
votes
2answers
25 views

System.AssertException not allowing me to convert Leads into Opportunities

I'm trying to convert a lead into an opportunity (on a managed package), so no access to the triggers. I just want to know if there's a solution to an Assertion Failed. This is part of the Error ...
1
vote
1answer
26 views

Get the users who have downloaded the content document

I can only find one document about the Content Objects https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_erd_content.htm I am able to see the users ...
0
votes
1answer
32 views

Handling Upserted Records within a Trigger from Data Loader when External Id not Found

This question is very similar to this issue, however I have a slight derivation. Currently I am upserting Cases via the Data Loader, this way I can insert Cases and relate some look-up fields by ...