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

learn more… | top users | synonyms

0
votes
0answers
11 views

Pageblocktable row order is changed .change and update S.No number in the list using apex

visualforcepage: <apex:pageblockTable value="{!ob}" var="o" style="width:80%;" align="center" id="myTable"> <apex:column > <apex:facet ...
-4
votes
0answers
19 views

Can anyone help me out with this code [duplicate]

Can anyone help me out with this code ? THis Code WORKS fine when we Create CASES MANUALLY. BUt as per my requirement this code should WORK WHEN WE CREATE CASES THRU EMAIL .The cases get created ...
1
vote
1answer
24 views

Collapse a PageBlockSection once a commandlink has been pressed

i have been asked to have a pageblocksection minimize as soon as commandlink has been pressed to make our page look less crammed, so far i have set the area i need to minimize to collapsible true and ...
0
votes
1answer
20 views

How to avoid to send the mail to owner field

I have used the default email code for sending the mail with template. but I don't want to send the mail to owner. If we set setTargetObjectId, the mail send to owner field. So, how to avoid that?
0
votes
0answers
11 views

Add Multiple Topic for a Chatter post through APEX

I am trying to add multiple Topic for a chatter post through APEX code. I am trying to give topics as comma separated value (Test1,Test2,Test3). But when I check in chatter post its coming as a ...
0
votes
1answer
9 views

transfer feeditem

I have a button "transfer" on account. Upon clicking that button, the feeditem on account have to be transferred or migrated to its opportunity. Modifiying the parentid on FeedItem cannot be done as ...
1
vote
1answer
23 views

Send list in HTTP Request in particular order taking order by as row num?

Apex code: List<order_batch__c> bcList = new List<order_batch__c>(); bcList= [select ...
0
votes
3answers
26 views

Bulkify code with Map

I'm still new to map Usage.. How could this code be bulkified? trigger OppyStatusCheck on Opportunity (before insert, before update) { for(Opportunity opp : Trigger.new) { ...
0
votes
1answer
11 views

Display VF page on customer portal sidebar?

I have a really simply VF page thats outputs some figures I have in one of my custom objects. I would like to show this VF page on the side panel (narrow content pane) of my customer portal however VF ...
0
votes
1answer
28 views

Can you help me with a trigger adding a contact to a public group?

Here is the code from my trigger which saves without syntax errors but gives the below error when I edit a contact. Code trigger AddToPG on Contact (after insert, after update) { ...
2
votes
0answers
15 views

upload image from ios app to notes & attachment

I would like to upload image to notes & attachement filed of a custom object via ios app. Tried to upload via apex class but it always upload it to the commom "document folder". struggling for ...
2
votes
0answers
32 views

Multiple Tasks are created. Need only one

I have a scenario,where Business Development Manager(BDM) will conduct promotions on company's products. The members attened for that promotions are added as Promotion members(PMM) Promotion is Master ...
-1
votes
0answers
27 views

need help creating a test class [on hold]

my visual force page looks like: <apex:page controller="China_MSR_Q"> <apex:messages /> <apex:outputLabel style="font-size:12pt" >For Admin</apex:outputLabel> ...
2
votes
1answer
32 views

Apex properties in helper class

I have an apex helper class named "PricingConversion" called from my apex controller "DeaRowEdit". PricingConversionHelper.CalculationSecondPricingTon(dealrow); I would like to move the properties ...
4
votes
1answer
127 views

What is the difference between list controllers and set controllers?

What is the difference between list controllers and set controllers?
0
votes
0answers
39 views

Customized Related List in Visualforce, suppress edit/delete buttons

I am fairly new to Visualforce and I have been trying to create a Related List in VF on object Employee__c to show all of the devices with an ‘Active’ status (Status__c field on Device__c object). ...
0
votes
2answers
36 views

User created a child record must capture and reflect the child status to the parent record [on hold]

Hello I'm a beginner here in Salesforce so bare with me. I created a Case (child record) with a STATUS field after saving the case it should capture/reflect its STATUS to the Account (parent record). ...
1
vote
1answer
36 views

Email Notfication based on the field value

HI I have the following field value. type (pick-list) values [daily, weekly] Count (number). end date If I choose daily and 2 in the above field. two mail should send to the owner. till the endate ...
11
votes
1answer
56 views

Is it possible to simulate record locks in test methods?

I would like my test cases to also test exception handling. In theory an easy way to cause an exception on DML is to lock a record that it'll update so that the update will fail. But I'm having ...
1
vote
0answers
25 views

Apex Scheduled jobs stopped executing unexpectedly

We have 2 scheduled jobs which are executing hourly basis in our app. In few of our client's org, they stopped executing unexpectedly. They are shown in Setup->Monitoring->Scheduled Jobs But, the ...
0
votes
2answers
52 views

Heap Storage Limit exception while creating attachment

I have a custom object Call2_vod__c which is detail to Account. It has a Signature_vod__c field that is in encoded base64 format. Now for one Account, I can create an attachment from any of the ...
1
vote
2answers
27 views

Can we Display a Error Message on Standard Detail Page of Opportunity on Load

I have a requirement on Loading Standard Opportunity Detail Page, if Opportunity Amount is greater than certain value say 500K i need to display a message on top of page. is it possible without ...
0
votes
2answers
22 views

field value contained in list

I have an apex class where I need to check if a field value of a particular record is contained in a pre-defined list. Please find my code here.Can someone please help? Apex class: global class ...
1
vote
0answers
32 views

Http callout not giving correct response when calling fom visualforce page

I am stuck in to one strange problem. I am sending http request as below. The below request giving me perfect result when i m calling it from developer console, but for some reasons it is not working ...
2
votes
1answer
29 views

Force.com IDE v31.0 - Can't save to Server, only locally with Warning “Force.com sync state”

Using plugin version 31.0.0.201406301722 on eclipse 4.4.0.v20140606-1558 it was perfectly usable for about a week... it was even fast with toolingAPI Starting of today, I can't save anymore to ...
6
votes
0answers
31 views

New Force.com IDE logging changes against entire Apex code base?

I recently started using the new Force.com IDE plugin (in Eclipse Kepler). Since that happened, today I looked in the Setup Audit Trail log and was shocked to see that against my name there have been ...
4
votes
1answer
54 views

System.QueryException: No Such Column - Strange RunAs Behavior with Summer '14?

Question Is there any known reason a SOQL Query would return a runtime System.QueryException on a custom field in test methods, in particular one one via a parent lookup in a test? I would have ...
7
votes
1answer
54 views

How do I set DML Options when using the REST API?

My question is nearly identical to an existing question. To summarize the problem, my case owners aren't receiving an e-mail notification when a new comment is added to their cases. Please view the ...
6
votes
0answers
44 views

Sending an email from a trigger with an addError

We have the requirement that if a Case is created via email2case and the Account has a flag (SecureSupport__c) checked then we should block the case creation and send a notification to the contact ...
1
vote
1answer
21 views

Changing custom field type

I need to change the field type of custom field from Text to Text Area (Long). I have around 2000 records for an object requiring this change. I also have apex and visualforce code referring to the ...
1
vote
3answers
32 views

How to auto-refresh page after Visualforce Error

is there any way to refresh page after an Visualforce error: like 'Unable to lock row' please I need help, i was trying to use window.onerror to reload the page but that doesn't work. so I was curious ...
1
vote
1answer
38 views

Trigger to update record on other object

I am new to Apex. The scope of the trigger are 2 objects. Product__c and Specific_Product__c. There is an after insert trigger on Product__c to create a corresponding record on Specific_Product__c ...
0
votes
1answer
17 views

How to get Metadata info on a custom setting?

I have a custom setting that I created with some variable, one of which is a number field. In apex, I want to determine the number of digits that the field is allowed. I'm new to the world of custom ...
1
vote
3answers
46 views

Is it possible to get 100% Apex code coverage all the time?

Is it possible to get 100% code coverage all the time by considering all cases such as positive/negative, bulk/single etc. Are there any cases which can't be covered by test classes? I often hear that ...
0
votes
0answers
18 views

UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []

The code below is for an API that runs all day long. sometimes I get this error:UNABLE_TO_LOCK_ROW I made some research about this issue and I am using FOR UPDATE in the query but is still happening. ...
0
votes
0answers
19 views

Suggested Unit Testing Approach When Checking for XML Child Nodes

Unit testing is currently at 60% code coverage on a specific class. Many of the lines of code that aren't covered by tests look like the following: global class IFXIndividuals { global ...
5
votes
5answers
277 views

Why isn't a SOQL query of mine populating a list in an Apex test class?

Why does my taskOpp query below not return any records when I run this test? The query works fine in Workbench and my taskRT query works fine in both my code and in Workbench. public class ...
4
votes
1answer
24 views

Triggers and order of execution on two different objects

Hi I'm trying to totally wrap my head around how one trigger's execution could affect another. To make things clearer here's a scenario. Say I have 2 objects A and B. Both objects have a trigger each ...
2
votes
1answer
25 views

Display VF custom components with user-defined order

We want to allow users to add/remove modules (custom components) from a VF page and set their order of display. We will use a dialog similar to the standard SF one (see image) on the front-end and ...
4
votes
1answer
60 views

Ajax custom button calling apex method errors out

i have one Ajax custom button {!REQUIRESCRIPT("/soap/ajax/24.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} alert("k"); ...
0
votes
1answer
16 views

Customer Portal User foreign key in Contacts?

When enabling Customer Portal access for a Contact, Salesforce creates a new Portal User for the person. I am creating an apex trigger for when the user creates a record in an object and would like to ...
1
vote
3answers
25 views

Why style.display = 'block' works only on Firefox?

I'm using the code below : <apex:outputPanel id="myID" style="display: none;"> ... </apex:outputPanel> <apex:commandButton value="Display" onclick="display()"/> <script ...
7
votes
4answers
80 views

How to get the Runtime-Type of an Object dynamically (for Primitive Data Types and SObjects)

Is it possible to get the Type of an Object (it's not an SObject)? String s = 'test'; doSomething(s); public static void doSomething(o Object) { // need to find out if o is a string or an ...
5
votes
1answer
39 views

Apex Modular Programming

I have a big Apex controller of a visual force page ,2500 lines of code, so i m wondering how can i separate implemented features in different module according to the topic. DealRowEdit(Apex ...
0
votes
1answer
19 views

Hitting Soql Governor Limit in my method

I've to test my sharing code. In my test classs I have to test if user1 creates record then it is visible to all user(400)..for that I have to get all manager id(399 user) based on user1 id... ...
1
vote
2answers
26 views

@future method: Unsupported parameter type

I am trying to copy records from one org to other via web services. I am calling a class which has logic written into a trigger. But @ future method is not taking sObject list as a parameter. Can ...
1
vote
0answers
26 views

Calling a webservice method from apex test class

I have a simple webservice method that updates Account Status from a custom Button in the Opportunity page: Global class Backoffice { WebService static Integer GenerateBackofficeTask(id opId) { ...
0
votes
1answer
19 views

Sort Wrapper List by two values

I need to sort Wrapper List by two values(Quantity and Price). The below code Sorts List only by Quantity.How to sort list by both Quantity and Price. public Class SortByTwoValues implements ...
0
votes
0answers
20 views

Salesforce Integration with Twilio [closed]

I am doing salesforce integration with twilio. can we get Auth token on button click from VF page or we need to manually get this from Twilio Dashboard
-1
votes
0answers
21 views

Test class doesn't cover Trigger [duplicate]

Can anyone give me the test code for my apex trigger: trigger Test_Share on Test__c (after insert) { Id UserId=UserInfo.getUserId(); Boolean bln=false; List<Id> ParentUserId = new ...