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
Smita Hodiggeri (Admin)Smita Hodiggeri (Admin) 

Quick solution to auto clear Text field(Text(255)) once user clicks in the field on Account Records

Looking to build a solution that will auto clear  Text Field Text(255) on Account records when user clicks into it.
I understand that this can be achived only through code.(Would love to know if there are any non code ways)
Can I get some ideas thrown at me for achiveing this? 

Many thanks,
Smita Hodiggeri
SwethaSwetha (Salesforce Developers) 
Hi Smita,
I don't there there is an out-of-the-box functionality that salesforce offers to achieve this. 

For the code approaches, I recommend reviewing code snippets from below posts:

In VF Page:https://salesforce.stackexchange.com/questions/203655/clear-inputtext-field-on-command-button-click
<apex:commandButton id="cmdClear" value="Clear" onclick="clearSearchField('{!$Component.page.form.pgtable.srchFld}')" reRender="results,errors"/> 

//In your Javascript use the value attribute to set it to empty

document.getElementById("searchField").value = ""

Lightning component: https://developer.salesforce.com/forums/?id=9060G0000005nKVQAY
https://salesforce.stackexchange.com/questions/181870/how-to-clear-value-of-force-inputfield-in-lightning

If this information helps, please mark the answer as best. Thank you