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

learn more… | top users | synonyms

0
votes
0answers
2 views

Unable to set custom Picklist value from Class to VF page

I am having a small issue while assigning a value to custom picklist in my VF. I am storing values (0 or 1) in a custom field (Match_Filter__c). With my logic I am able to get the value of above ...
1
vote
1answer
19 views

Javascript Alert on change of picklist value

Can someone suggest me a way to display an alert message onchange of picklist values(Different alert message, for different picklist values). Below is the sample code that I'm using, but the ...
3
votes
1answer
20 views

SANDBOX - Access webservice getting below error - added my machine IP in the Remote Site Detail

ERROR The requested URL could not be retrieved While trying to retrieve the URL: The following error was encountered: • Access Denied. Access control configuration prevents your request from ...
-1
votes
0answers
25 views

How to write trigger in such scenario? [on hold]

I need to write a method in a controller(It will be opportunityTriggerHandlerClass) for following requirement: When ever the StageName Field on opportunity changes from A to B from ui then following ...
2
votes
1answer
23 views

Updating scheduled apex class

If you schedule a class using scheduled apex, it is impossible to update that class. Moreover, any class referenced by this scheduled class is also not possible to be updated. This is because the ...
-1
votes
0answers
23 views

DML requires SObject or SObject list type: createProduct.ResponseBody at line 114 column 17

i am writing the apex rest api where it consist one product(master record) with multiple attribute (with multiple child record). iam getting the dml when i try to upsert the master record. ...
0
votes
1answer
24 views

calling webservices in apex trigger

Documentation in here says • You can only use the webService keyword in a trigger when it is in a method defined as asynchronous; that is, when the method is defined with the @future keyword. ...
1
vote
1answer
19 views

Check Date is within THIS_WEEK

I have to check whether "mydate" is in within the current week or not. DateTime mydate= DateTime.newInstance(Date.Today().Year(),obj.Birthdate.Month(),obj.Birthdate.Day()); if(mydate==THIS_WEEK){ ...
0
votes
1answer
17 views

Schedule batch run in developer console without implementing database.execute in it

Can someone please tell me how to do the below activity (Overcome database.execute not implemented error runtime). Schedule batch run in developer console without implementing database.execute in it.
1
vote
1answer
16 views

Using the MVC, the Visualforce page times out when calculating discounts of large amount of Quotelineitems

I am using an MVC to calculate all discounts to valid products and display them out on a Visualforce page. The problem I encounter is if the Quote has over 500 quote line items, the MVC will finish ...
0
votes
1answer
22 views

Remove whitespace before html5 doctype

I've got the following <apex:page> tag in a Visualforce page: <apex:page docType="html-5.0" showHeader="false" applyHtmlTag="false" applyBodyTag="false" standardStylesheets="false" ...
1
vote
1answer
25 views

Can I late translate labels in Salesforce Apex - Dynamic lookup of Label texts?

We need to store messages in the database. We could store the English text, but this could be less friendly if a French user wanted to review the messages. Is there a way I could look up a Custom ...
1
vote
0answers
17 views

Error while getting response in SOAP Webservice Integration

I am facing issue while invoking a webservice call. Request is getting processed properly at other system end but since its an async call I get back response with empty body. Problem is this ...
1
vote
1answer
190 views

How to write test coverage for private method in controller?

How can I test private methods in an apex controller ? For instance this example: private static string getUserId(String str){ string UserId = ''; if(ref != null){ ...
1
vote
0answers
33 views

Exact Target Triggered Send using salesforce APEX

I am trying to send an Exacttarget triggered email using the Salesforce APEX developer console. In the end I would like a member update on Salesforce to send a triggered email from Exacttarget. I have ...
1
vote
1answer
28 views

Resetting picklist value back to none onchange

Picklist 1 values: Yes No Picklist2 values: one two three I was able to attain the rerendering functionality from the below sample code. If I select picklist1 value as "yes", I am able to display ...
4
votes
2answers
42 views

Batch Apex: Can I run code prior to running 'Execute' code on batches, and will it affect governors limits?

Below is my question in a nutshell, using the framework for a batch apex class: global class ActOn_Batchable implements Database.Batchable<sObject>{ string query = 'query here'; **CAN ...
2
votes
0answers
17 views

Automatic Resizing of Canvas App in Visualforce Page

I have created a canvas app and am hosting it on Heroku. I then added this app to a Visualforce page, along with the required Salesforce SDK (which is hosted on heroku). Because this app will be used ...
0
votes
1answer
39 views

Error: 'System.LimitException: Too many SOQL queries: 101'

I am getting an error: 'System.LimitException: Too many SOQL queries: 101' when I run a testing class for another class similar to this one, which is located in the same Object. I am trying to use ...
2
votes
1answer
26 views

Dynamic Type Casting of Inputs

I am using apex:input on a VisualForce page to take in a variety of input types. I store values separately for Dates, DateTimes and Strings, as they have their own input 'types.' However, for numeric ...
0
votes
0answers
9 views

Creating a user in aws/iam from apex using aws iam api

I want to create a user in AWS IAM in Apex .I have followed the procedure given in aws IAM docs and I am using query parameter mechanism . When I send the request in response I get the Homepage of ...
-1
votes
0answers
16 views

apex rest api creating account with multiple contacts in saleforce

I need to create account with multiple contacts at same time . i will be getting the response in json . please help me how to parse the contact multiple contacts with single account. as we know ...
1
vote
1answer
27 views

System.NullPointerException: Argument cannot be null

Im getting the error 'System.NullPointerException: Argument cannot be null' when I run my test class, in the below test method. /* * update a existing report */ static testMethod void ...
-1
votes
0answers
19 views

How do i fix Cross site scripting errors [on hold]

21.public ProjectDetailsExtensionController (ApexPages.StandardController controller) 28. membs= [Select Role__c, Type__c, User_Email__c FROM Members__c where ProjMembers__c=:workId]; `` 65. ...
2
votes
0answers
14 views

Salesforce SAP Integration

I have created a APEX class from WSDL ( WSDL provided by SAP ). Need Help in calling this APEX class in Salesforce. This is a Demo Flight Object. When I pass Flight Number and Name, it will return ...
1
vote
2answers
21 views

The CheckMarx security scanner says that this lines is a Stored XSS vulnerability

14. public void LoadData() 16. plan = [Select id, name,Icon__c,Bar_color__c from Activitytype__c limit 20]; 41. <div ...
0
votes
1answer
23 views

test class is not covering email messaging

trigger: trigger TaskCompletion on Task (after insert,after update){ IF(trigger.isinsert){ for (Task E : Trigger.new){ If((E.CreatedById != ...
0
votes
1answer
29 views

Webservice failure to call

Please find the class below. The method called is ASCS_DaaS_APISoap. I am unable to understand where it breaks and not fetching real data.Can some one please help me out in this? //Generated by ...
0
votes
1answer
22 views

Get all the month year(MM-YY) dates between two dates

Is there a way to get all the dates between two dates if i have a start date: Feb 2014 end date : April 2014 Output: Feb 2014 March 2014 April 2014 I have this code: startYear = 2014; ...
1
vote
2answers
39 views

Formula fields retrieve value from Trigger.new/old

I have found similar queries in here But nothing gave me a straight answer I have a custom field on account say custom__C which is a formula field and derives value from another custom ...
0
votes
0answers
16 views

How to populate Dependent PickList value in Apex Class/ Trigger [duplicate]

I need to populate some picklist value on an Opportunity Trigger. There are two pickList : 'PickList1' and 'PickList2' . Both of them are on same Opportunity Object, 2nd one is the dependent on the ...
0
votes
1answer
21 views

Visual Force page display name of given Id

ok i have this: <apex:column headerValue="Provider"> <apex:outputLink target="_blank" value="/{!o.WhoId}">{!o.WhoId}</apex:outputLink> </apex:column> this returns me this ...
0
votes
2answers
43 views

VisualForce apex:relatedlist - button redirection

I am having a little problem with visualforce and displaying a related list. The task is to display account related contacts and opportunities as a related list on a custom object. Account is a ...
5
votes
2answers
24 views

API and static variables reset

As per this documentation Trigger Note that static variable values are reset between API batches, but governor limits are not. Do not use static variables to track state information between ...
0
votes
0answers
18 views

Bulk API and Static Variable State

Our trigger logic has some recursion detection built in. Essentially, we have some static variables that act as counters for trigger executions. When our set "max" gets hit, our triggers quit to avoid ...
0
votes
0answers
19 views

Sorting on date gives me error

I've an issue while sorting date by arrow sorting. I successfully implemented this for "Subject" and "Status" field on Task object but while i click on Date column , it gives me error saying : ...
1
vote
3answers
26 views

Using and modifying Apex trigger variable in Apex Test Class

Is it possible to use and modify any apex trigger variable in the apex test class ?? will the @TestVisible notation helps in this scenario ??
3
votes
2answers
150 views

Order of execution of trigger and workflow

I am aware of the flow of execution in salesforce(validation, autoresponse, assignment...etc). I also have knowledge of the order of execution of a visualforce page. I have 2 questions on execution: ...
2
votes
2answers
66 views

Values don't update after I call action on a commandbutton?

I am trying to implement functionality in SalesForce where when a user clicks a button then the following count increases. Currently I have a simple test page that just shows the following count. ...
0
votes
1answer
30 views

Getting null pointer exception running a batch apex

I am getting an error like "Argument 1 cannot be null" while running this batch apex Batchupdate_Montly_DepthTracker. Please note this batch runs on result sets returned from a scheduled apex. ...
0
votes
1answer
29 views

Issue of not filtering by Id on Task

I'm performing Search for OwnerId on Task object . I have a User (i.e. Owner) named "Nisarg" . Hence when I search for "Nisarg" it does not give me anything. When I Debug this in the Console , the ...
0
votes
0answers
22 views

Help regarding test case code coverage

public with sharing class searchpn { //variables Public Id parentId; public Integer qliRowNum1{get;set;} public Integer qliRowNum{get;set;} public Integer finalRowNum{get;set;} ...
3
votes
2answers
47 views

actionFunction working only when I have certain parameters in the URL

I am having a weird issue when using apex:actionFunction as it only works sometimes (Only when I am passing a parameter in the URL). The visualforce page sometimes will have a parameter in the url, ...
0
votes
2answers
28 views

Need help writing a Custom Object Trigger

I need the custom object (Installed Products) to have the same owner as the account as it will resolve some sharing issues. The API name is SVMXC__Installed_Product__c and the Owner field name on the ...
0
votes
1answer
22 views

Delete button gives me error

My delete button does not work after putting endless efforts and thought to post here.When i click on Delete button, its just rerendering and not deleting after trying with actionSupport. It gives me ...
0
votes
0answers
16 views

How can I implement filter logic in python or javascript? [on hold]

Is here a way to implement filter logic in python or javascript? Valid examples: (1 and 2) or (3 and 2); 1 and (2 and 3), 1 and 2 (or 3) Invalid examples: 1 (2 and 3); 1 2(3 and 1), etc.
1
vote
3answers
52 views

0% code coverage Test APEX class

I have set up a simple APEX class that is an extension for a Visualforce page. The VF page has a commandButton that saves and takes you to a different page called "Congratulations.vfp" I have been ...
0
votes
1answer
27 views

Question on trigger to roll up on formula field on detail object

Consider me a beginner in Apex and Programming in general, so i am sorry for what may be a fundamentally dumb question. I am writing a trigger to roll up a formula field, Elapsed_Time_days__c, in a ...
2
votes
3answers
45 views

Visualforce page doesn't renderAs pdf (used as attachment it's blank)

I have a requirement where I need to send an email with attached PDF of Invoice . But I am getting blank PDF. please suggest how can this be rectified. When I add renderAs = "PDF" , I am getting the ...
1
vote
1answer
37 views

How can I generate a sequence based on conditions?

I have fields region, revision and Quote. The Quote field will be automatically generated based on selecting region and revision. Quote will be combination of region, alphabetic and count value. for ...