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
Sandeep ChannaSandeep Channa 

Salesforce1 validations


I have few questions regarding salesforce1 mobile app:
1. In salesforce1 mobile app the error message for custom field validations are not shown properly.
2. How can we make fields mandatoty in mobile app.
3. How to add custom fields in salesforce1 mobile app.
Can you please suggest me the best way to achieve it.
NagaNaga (Salesforce Developers) 
Hi Sandeep,

To display the same custom fields on Salesforce1, you will have to create new Tasks Compact Layout (salesforce website version) and added the new custom fields.

If you make the fields mandatory on the website version, then automatically they will be mandatory on the salesforce1 app.

Can you also please let me know what issues are occuring with the error message?

Please also follow the below link for more information

Best Regards
Naga kiran

Gaurav KheterpalGaurav Kheterpal
1) Can you clarify what you mean by error messages are not shown properly?
2) There's nothing special you need to do in Salesforce1 for this (as Naga mentioned), if you create it mandatory for your VF page/ layout, it will be respected in Salesforce1
3) You don't directly add a field on Salesforce1 app. You would normally add it on a standard or custom object and then make it available in your custom layouts.

If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

Gaurav Kheterpal

Developer Forums Moderator| Certified Developer| Dreamforce Speaker| Salesforce Mobile Evangelist
Sandeep ChannaSandeep Channa
Thanks (Naga Kiran & Gaurav Kheterpal),

When I am not filling the mandatory custom field then it is not showing error message to fill that field and nor saving that record. As it is showing correct error message to fill the standard fields.