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

learn more… | top users | synonyms

0
votes
1answer
11 views

Update operation in batch apex called from trigger

I have to update bulk records by apex class which is called from an apex trigger. Please find my class and trigger below. Batch class: global class UpdateAccountArea implements ...
1
vote
1answer
21 views

Trigger populating parent object values in child

I have below trigger to populate master record's value in the child based on any update on Master. This code is getting error out for bulk loads. Can someone please suggest a best practice to overcome ...
0
votes
1answer
19 views

Invalid Cross Reference Key : Record Type ID value isn't valid for User: 012v00000008f4nuBB

I am having some issues. The below is a code snipet of my test class. The class complies and produces 96% of coverage with no errors. When deploying in production it throws the above error. ...
0
votes
1answer
10 views

List has more than 1 row for assignment to SObject on action button in a page from managed package

Installed a managed package, which contain simply 2 pages, controllers, styles, scripts etc. Then created a site using the a page within the package. When i clicked an action button, Received the ...
0
votes
1answer
16 views

How to Use an XML Static Resource to Program Unit Tests?

I've created a static resource XML file and uploaded it to my test org. My code coverage is around 41% and needs improvement due to there being numerous nodes in the XML file that need to be loaded ...
0
votes
1answer
22 views

Rendering <img> tag in table

I am attempting to render noImageURL when icon.image is null. For some reason, noImageURL is always rendered. It's not respecting the javascript if statement <td> <apex:image ...
0
votes
2answers
14 views

Can i get an email when an event is posted on the calendar

I created a new calendar for my team, and would like to know about it every time someone creates a new event. An email would be a very good option. Can i do that using apex?
1
vote
1answer
27 views

Get the max value of a field with many records

I have a field that stores an ID, and I need to find the Max value of that field. However I get an error a queryexception. For reference, the field is set up as unique and external Id. Any ideas on ...
0
votes
2answers
29 views

Use Edit function in vf page

I have to use edit function in a vf page.Please find my apex class and corresponding error showing below. Apex class: global with sharing class poistionController1 { public ...
0
votes
0answers
26 views

Trigger doesn't updates the values using dataloader

Here is my trigger where it updates the Amount and Account fields from opportunity when Opportunity is populated in my custom object OM or it updates Opportunity, Amount and Account if Quote is ...
0
votes
0answers
18 views

How to exclude weekend, when adding weeks and dates to a Date field value

I am writting one method, where I've to fetch some field value from custom_Object__c and do the Date calculation. Custom_Object__c : Days_Offset__c : 2 Weeks_Offset__c : 3 Current_Date__c : ...
0
votes
0answers
9 views

how to Integrate salesforce to Linkedin [on hold]

I'm Integrating salesforce to Linkedin with help of some blogs , but I didn't get any output , could you please anyone suggest for how to integrate SF to Linkedin Thnaks Ganesh
-2
votes
1answer
22 views

Show List values by pageblock table [on hold]

Please let me know how to display list values in apex page by page block table format. I have this piece of code. <apex:dataList value="{!my_list}" var="c"> ...
0
votes
2answers
30 views

Code to find physical location from IP Address

I need to find out the physical location of a client based on his IP Address. I have been able to retrieve the IP Address. Is there a way to find the geographic location from that?
0
votes
2answers
22 views

rendering the table data through apex code

I am trying to fetch the custom object data into page block table with below code. I am getting the table as expected but my need is not to get the data when page is loaded and should come true only ...
0
votes
1answer
20 views

Display List values in apex page

I have apex class below having my_list as a List. I need to display in apex page. Apex class: global with sharing class poistionController { List<HCP_Depth_Tracker_OAPI__c> my_list = new ...
2
votes
1answer
29 views

Object type in <apex:inputField> for color picker

I'm trying to develop a color picker using JSColor but I don't know how to do it with an <apex:inputField>. I have the error below : Save error: Could not resolve the entity from value ...
0
votes
1answer
61 views

Adding row inside a row in repeat.?

I am adding a row inside a row..Here is the scenario. On Click of add button i am adding a row.i know how to do that..I am able to do that.Now i want to add more rows inside that row using some ...
0
votes
1answer
42 views

Find Duplicate case and close

I shall appreciate ur help. Can anyone help me on this Requirement : Requirement is : 1) Create a case with Subject line (User ) ----First Case 2) Create another case with Same Subject line ...
-1
votes
1answer
30 views

multiple Standardcontroller

I have to use VF page of a custom object in Account page layouts.Please find my apex class as below. Apex class: global with sharing class poistionController { public HCP_Depth_Tracker_OAPI__c ...
0
votes
1answer
18 views

Show custom object ,not immediate child in Account's related list

I have to show custom object HCP Depth Tracker in Account's related list.It is having Account reference.It's child of Depth Tracker object which is immediate child of Account.My approach is by ...
1
vote
1answer
75 views

Returning Image from Query

I have a query fetching a document which is an image. I want to assign the image to a field (URL). I am doing: Document doc = [select id, name,url, body from Document where name = 'image']; ...
0
votes
1answer
17 views

getSalesforceBaseUrl() in a Custom Email Template

I've created a Custom Email Template. In the HTML Email Content, a few fields are displayed and I've created a button with a link <a ...
0
votes
1answer
19 views

Redirect VF Page after sendEmail

I have a VF page with a submit button, when the user clicks on the submit button it sends an email. I need the page to redirect to a thank you page after they hit submit. I am getting this error: ...
2
votes
1answer
32 views

Using Developer Console & Checkpoints to debug w/ unit tests

Is it really possible to use the dev console & checkpoints to effectively debug code via unit tests? It seems like it should be possible, but I've never gotten it to really work for me. Here's ...
0
votes
1answer
12 views

Dynamic Visualforce Components: is there a smater way to add childComponents?

Playing around with Dynamic Visualforce Components I found it inconvenient to create child elements in such a bulky notation public Component.Apex.OutputPanel getNavPanel1(){ ...
0
votes
1answer
20 views

How to get default Task Status and all Closed Status values of Task Object

I have a requirement where I have to get Default Task Status and Closed Status. String defaultTaskStatus; // variable which contains Default Status Set<String> taskClosedStatusSet; // ...
2
votes
1answer
32 views

use bootstrap tooltip with apex:inputfield

I have a visualforce that I have built using bootstrap 3.2 but I want to enable a tooltip on one of the input boxes. I have not been able to make this work yet. Does anyone know how to do this? I ...
1
vote
1answer
20 views

How to use DescribeSObjectResult to fetch SObject field information

I have a requirement where I've to fetch all 10 fields of a custom Object My_Object__c and store it in a Map<String, String> labelMap // 1st string is the label and 2nd string is the Field Name ...
-1
votes
0answers
11 views

create Folders and can change folder hierarchy by admin when ever needed

creating an folder +folder1 +folder2 After clicking folder1, I want to load folder1 children (subfolder1, subfolder2) want to place documents in the folder -folder1 -subfolder1 Doc1 ...
3
votes
1answer
104 views

Create a Map<string, Set<String>>, where 1st string is the unique value

I have a requirement, where I have to fecth record and put it in a Map. I have a custom Object My_Object__c and it has 2 fields : child_Name__c and Parent_Name__c. What I did, I query from the ...
1
vote
1answer
30 views

Formula using INCLUDES function - how to reference merge field?

I need help creating this formula field. I am getting this error: 'Incorrect parameter type for function 'TEXT()'. Expected Number, Date, DateTime, Picklist, received Text (Related field: Formula)' ...
2
votes
2answers
75 views

<apex:input type=“date”> is not working in Mozilla

I'm using <apex:input> tag to display date. It's working fine in Chrome but it's not working in Mozilla. <apex:input type="date" id="dateid">
1
vote
1answer
23 views

How to Auto populate account name

I'm stuck and want a way to solve a problem . The requirement is when i click on custom button it should redirect me to the Contact page WITH auto populate Account field. I've reach with the redirect ...
1
vote
1answer
43 views

How to create a file inside a folder in google drive?

I am able to create a file in Google drive from salesforce with the below code: Http http = new Http(); HttpRequest req = new HttpRequest(); req.setMethod('POST'); ...
1
vote
1answer
76 views

Inbound email missing attachment?

I have a requirement to save attachment received from email in Salesforce object using Email To Salesforce. I tried using the below code but attachment are not getting saved, when I checked using the ...
-1
votes
0answers
17 views

No operation available for request {http://soap.sforce.com/schemas/class/WsOrder}UpsertOrders

since yesterday (after the maintenance) we are getting those errors for all out custom WSs. any idea why? it worked great last week..... thanks!
0
votes
2answers
38 views

SOQL Query for month operator

I have to compare month value of a custom object's date field, if it is of the current month. Please find the piece of code below. I am getting error here. Can someone help me? Code piece: ...
0
votes
1answer
17 views

Restrict on creating new Record by Record Type

I am having a Custom object "Service_Type__c". There are 3 record Types : Author, Consultant, Publish I want when record type is "Author", user of a perticular profile can't create a record. It will ...
3
votes
1answer
26 views

System.VisualforceException: Invalid value for property label: null

Sigh. So I am required to cover my Apex code with tests. I'm testing a piece of code that dynamically builds a tree of controls with a PageBlock as the root object. This code works fine when NOT ...
0
votes
0answers
21 views

Can anyone suggest a more generic way to convert HashMaps to/from Strings?

I'm storing HashMaps as Strings in long TextAreas (works up to 131,072 characters). Can anyone suggest an improved or more generic way over what's below? I know I could have the fromString method ...
-2
votes
1answer
20 views

How to write system.assert(equals) method in salesforce [on hold]

My requirement is how to write system.assert equals method.. here is my test class. MetadataService.ReadApprovalProcessResult m15 = new MetadataService.ReadApprovalProcessResult(); ...
0
votes
1answer
28 views

Display list of list on visual force page. Search results of inputtext from all objects using sosl

I am trying to search for a text from all the objects. The method in the controller returns the results as List of List. I am trying to display the results in the visualforce page but no results get ...
1
vote
1answer
26 views

How do I use a field to populate the mail.setToAddresses in a sendEmail class

I have set up a class that sends an email and I am using a VF Email Template that uses the Oppertunity fields. I have set up a custom field called Proposals_Senders_Email__c that is a text field. I ...
1
vote
0answers
32 views

CurrentPage getParameters() is empty the first time I post to a page

I have a VisualForce/APEX page that I am posting to through a form. I send over a list of contacts as a single string. When I get to the other page I use the following code to retrieve the post ...
3
votes
1answer
68 views
+50

Discovering API Limits via Custom APEX Rest API

According to the documentation, the Salesforce REST API returns a Limit Info Header with each request. So each REST API call gets a Sforce-Limit-Info: api-usage=18/5000 line returned in the response ...
2
votes
1answer
29 views

User Accessibility on Object Via Apex Code (Not for Logged In user )

Please Note : Not for Current Logged in User How to find a particular user A has what access on particular object (Read or Create access) say on Account Via Apex Class.
1
vote
1answer
19 views

IO Exception: External server did not return any content

I have a window service that is password protected.I have generate Apex class from that window service WSDL.Now i am try to call the service using stub method its shows me a error message"IO ExCeption ...
1
vote
2answers
31 views

Download files from Google drive

https://developers.google.com/drive/web/manage-downloads In the above link it is given that we have to make a GET request to the downloadUrl (which we get in the response when we upload the file) in ...
4
votes
0answers
44 views

Issue in parsing JSON when special characters are included

I have a Json file which has some special character as below:- { "TXT1": "Tést Data", "TXT2": "can®." }, The Special character (é.®) gives me a error BLOB is not a valid UTF-8 string while ...