• 0 Points
  • Member since 2014

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
  • 3
Suppose I have a string: 500 090,00. How to use format() method to this string. It is in french locale. you cannot use decimal.value of this string also. it gives error.
format() method is not supported with a decimal with comma seperated. it only takes dot as decimal seperator. But there are many locales which uses comma or inverted quote as decimal seperator?
Any help is appreciated.
Can we write custom error messages in data loader error file by apex?? I mean when we upload a file by data loader if it fails it shows predefined messages given by salesforce in the error column. I need to change that error message by my own custom message.. 
Any idea on this??
the timesheet should look like this. http://semu.github.io/timesheet.js/  ,using jquery. I am new to jquery so couldnot figure it out. Help is needed.. 

I want to get all the values of a multi select picklist custom field, no matter what values are selected through apex code. Can anyone tell me how could I approach this? 

I've created a custom button to allow users to create a case from the Contact related list on the Account tab.  It works great when a user scrolls down and uses the related list.  But if you use the related list hover at the top, the new case opens up in the hover itself and them promptly disappears when you move away.


I'm looking for a way to have this work whether you are in the hover or not without having the button open in a new window.  If there any way to tell my button if it's opening up from the hover or from the bottom related list?


This is the button code:



var records = {!GETRECORDIDS($ObjectType.Contact)}; //grabs the Contact records displayed on the search page.

var updateRecords = []; //array for holding records that this code will ultimately update

if (records[0] == null)
{ //if the button was clicked but there was no record selected
alert("Please select at least one Contact."); //alert the user that they didn't make a selection

//otherwise, there was a record selection

for (var a=0; a<=0; a++) { //for all records
var objContact = new sforce.SObject("Contact"); //create a new sObject for storing updated record details
objContact = records[a]; //set the Id of the selected Contact record
updateRecords.push(objContact); //add the updated record to our array


window.location.href= "/500/e?&def_contact_id="+updateRecords;

//window.open( "/500/e?&def_contact_id="+updateRecords,'name');



Thanks in advance for any help!

Hey everyone.


I'm running a controller extension of the Opportunity Standard Controller being used across 3 pages.


On Page 1, I have an outputfield of all fields that get used on Page 1 - 3 that are rendered false (to accomodate the SOQL Query method used by visualforce).


In my controller extension I have a method that uses one of these fields and returns a list of strings. If I load each page separately (via URL not using Page References) it works perfectly. However, if I use any of my page references to move from Page 1 to 2 I get:


System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Opportunity.New_Contract_Start_Date__c


Class.OpportunityPAWizardExtension.getInvoiceDates: line 80, column 43
Class.OpportunityPAWizardExtension.<init>: line 11, column 9
External entry point


I know there's values for the fields on using. It's the same Opportunity ID that used between the page references, although I do have the redirect set to true (one of the references is in the apex page and without redirect true I get an invalid root component error).  The method causing the error doesn't use any user input just calculates some difference between dates for a list of invoice dates.


Code giving me the errror it errors online 2 when I call the New Contract Start Date Field:

Opportunity Opp = (Opportunity)controller.getRecord(); date StartDate = date.valueof(Opp.New_Contract_Start_Date__c); date EndDate = date.valueof(Opp.New_Contract_End_Date__c);


So why does this work on all 3 pages called separate, but breaks when using a page reference? I thought it might have to do with the SoQL error, but I check and I have both the fields listed above on the pages. So the standard controller would query them right?