function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Laurent LemazurierLaurent Lemazurier 

long text field's value in javascript

Hy all,

Since I changed a text field to a text area field, I can no longer use the value of the field in a javascript code of a lightning component.
The code simply assigns the value of my field ( called MyTextField in the code bellow) to another one:
myOpportunity.anotherfield__c = myCustomObject.MyTextField__c;

Notice the other field is also a text area and this worked well before we changed the type of myTextField to a text area field.

Thanks for your help

Laurent
 
 
Best Answer chosen by Laurent Lemazurier
VinayVinay (Salesforce Developers) 
Hi Laurent,

Do you see anything in debug logs?  Check below references that can help you.

https://salesforce.stackexchange.com/questions/201282/custom-lightning-components-text-area-content-not-available-during-initial-page
https://salesforce.stackexchange.com/questions/285720/lightningtextarea-value-to-have-new-line-in-lightning-component

Thanks,

All Answers

VinayVinay (Salesforce Developers) 
Hi Laurent,

Do you see anything in debug logs?  Check below references that can help you.

https://salesforce.stackexchange.com/questions/201282/custom-lightning-components-text-area-content-not-available-during-initial-page
https://salesforce.stackexchange.com/questions/285720/lightningtextarea-value-to-have-new-line-in-lightning-component

Thanks,
This was selected as the best answer
Laurent LemazurierLaurent Lemazurier
Hi Vinay,

Thanks for your precious help and this meaningfull answer.
Finally, I've found a workarround using a process builder to retreive my textarea field value. 

Best regards