You need to sign in to do that
Don't have an account?
Bob.390672021994282E12
How to use public static Integer valueOf(String toInteger)
I was trying to figure out how to use value of in Salesforce. I want to grab the number of string on a field.
parent = [select id, Name, version_number__c, Text_Field__c from Parent__c where id = :parent.id];
newParent = parent.clone(false, true);
newparent.Text_Field__c = valueOf(parent); // doesnt work.I would think that it would bring back the number of chars.
insert newParent;
public static Integer valueOf(String toInteger){
Integer myInt = Integer.valueOf('123');
return myInt;
}
parent = [select id, Name, version_number__c, Text_Field__c from Parent__c where id = :parent.id];
newParent = parent.clone(false, true);
newparent.Text_Field__c = valueOf(parent); // doesnt work.I would think that it would bring back the number of chars.
insert newParent;
public static Integer valueOf(String toInteger){
Integer myInt = Integer.valueOf('123');
return myInt;
}
I'm Shingo.
Did you define your original static method named "valueOf", which takes String type argument?
It looks you're passing the sObject "parent" to this method, not String.
above method works when you try to converat a numeric string to a integer number.
Ex :
newparent.Text_Field__c = valueOf(totalMarks);
Your code doesn't right. this code having lot of mistakes.
ParentChildRecords not returning any page reference .
please let me know your whole requirement...
Thanks