You need to sign in to do that
Don't have an account?

A Question about data type
Hi all,
Can I make an text data type equals to a string value in the syntax like object1.textField =(text)object1.stringField? If not, how can i get it. Many thanks for any help.
The Text data type takes number as well as string values so no need to convert string value in text. If you need then there is methods for the conversion of the data types-
Boolean b = s.equals('TRUE');
String s = '19';
a.NumberOfEmployees = Double.valueOf(s);
Date myDate = Date.Today();
String sDate = String.valueOf(myDate);
Double myDouble = 12.34;
String myString = String.valueOf(myDouble);
All Answers
What you mean by 'object1.stringField'?
When you create new custom field there is only 'Text' data type which stores alphanumeric characters(also strings).
The Text data type takes number as well as string values so no need to convert string value in text. If you need then there is methods for the conversion of the data types-
Boolean b = s.equals('TRUE');
String s = '19';
a.NumberOfEmployees = Double.valueOf(s);
Date myDate = Date.Today();
String sDate = String.valueOf(myDate);
Double myDouble = 12.34;
String myString = String.valueOf(myDouble);
Thanks a lot