1. What are validation rules?
Validation rule contains an error condition and error message. If evaluation of error condition results in true value, record is not saved, and the error message is generated. Validation rules can be attached to fields. They are executed when a record is created or updated.
2. Can we avoid deletion of records through validation rules?
No. Validation rules fire in insert and update operation.
3. Can we bypass validation Rules?
Validation rules can never be bypassed. If we have upload records and need to bypass validation, then deactivate validation rule and upload records. After upload, again activate validation rule.
4. Is it possible to fire validation only for records which is being getting updated not to newly inserted records?
Yes, We can use ISNEW() function which will return true whenever new record is getting created in validation rule. We can use this function and check our criteria only if ISNEW() function is returning false(means record is being updated).
5. Is there is any way through which validation rule is bypassed while doing upload through data loader but not when user is creating record from user interface?
Yes. Create a checkbox field as API upload and make this field hidden in page layout. Create a validation rule and in evaluation criteria first check if checkbox is false and then check other validation criteria.
Whenever user upload record through data loader, specify value for this checkbox as true in .csv file and then upload it to salesforce. While upload, validation rule will fire and will find checkbox value as true so it will not check other criteria and system will allow to upload records.
6. What is the difference between ISBLANK() AND ISNULL()?
ISNULL() works only for number data type fieds, if we don't populate with value for number fields it will return true.
ISNULL() won't support TEXT data type fields because text fields never become null.
ISBLANK() supports both number as well as text data types.
7. What are cross object formula fields?
Cross-object formulae span two or more objects by referencing merge fields. By using this you can refer parent fields from child record.
8. What are different ways to make field required in salesforce?
Yes. First create a roll up summary field on parent which calculates the total count of child records. Now write a validation rule on parent object which checks if previous value of total count is less than new value. If yes, then display error message.
Suppose field name is total_count__c in parent object then validation rule criteria will be:
Priorvalue(total_count__c) <total_count__c
When we delete the child record then roll up summary field value will get reduced by 1. System will update the parent record roll up summary field which will fire the validation rule and avoid user from deleting child record.
Validation rule contains an error condition and error message. If evaluation of error condition results in true value, record is not saved, and the error message is generated. Validation rules can be attached to fields. They are executed when a record is created or updated.
2. Can we avoid deletion of records through validation rules?
No. Validation rules fire in insert and update operation.
3. Can we bypass validation Rules?
Validation rules can never be bypassed. If we have upload records and need to bypass validation, then deactivate validation rule and upload records. After upload, again activate validation rule.
4. Is it possible to fire validation only for records which is being getting updated not to newly inserted records?
Yes, We can use ISNEW() function which will return true whenever new record is getting created in validation rule. We can use this function and check our criteria only if ISNEW() function is returning false(means record is being updated).
5. Is there is any way through which validation rule is bypassed while doing upload through data loader but not when user is creating record from user interface?
Yes. Create a checkbox field as API upload and make this field hidden in page layout. Create a validation rule and in evaluation criteria first check if checkbox is false and then check other validation criteria.
Whenever user upload record through data loader, specify value for this checkbox as true in .csv file and then upload it to salesforce. While upload, validation rule will fire and will find checkbox value as true so it will not check other criteria and system will allow to upload records.
6. What is the difference between ISBLANK() AND ISNULL()?
ISNULL() works only for number data type fieds, if we don't populate with value for number fields it will return true.
ISNULL() won't support TEXT data type fields because text fields never become null.
ISBLANK() supports both number as well as text data types.
7. What are cross object formula fields?
Cross-object formulae span two or more objects by referencing merge fields. By using this you can refer parent fields from child record.
8. What are different ways to make field required in salesforce?
- While field creation, specify required field as true.
- Through page layouts
- Validation rule
- Apex trigger
Yes. First create a roll up summary field on parent which calculates the total count of child records. Now write a validation rule on parent object which checks if previous value of total count is less than new value. If yes, then display error message.
Suppose field name is total_count__c in parent object then validation rule criteria will be:
Priorvalue(total_count__c) <total_count__c
When we delete the child record then roll up summary field value will get reduced by 1. System will update the parent record roll up summary field which will fire the validation rule and avoid user from deleting child record.
This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.
ReplyDeleteSalesforce Training in Chennai
Sorry to be frank and straignt forward, I have been attending interviews from 3 months, None of them asked like this STRAIGHT forward questions, these are very good for those TRAINERS but Not at all for Real time interviews.
ReplyDeleteWhat kid of questions were you asked?
DeleteThis comment has been removed by the author.
ReplyDeleteFor Ques#9 conditions should be Priorvalue(total_count__c) >total_count__c
ReplyDeleteI think NO...
Deleteand Author made no Mistake...
This comment has been removed by the author.
DeleteValidation rule can be bypassed by selecting "ignore validation" in user detail page.The provided answer is not correct.
ReplyDeletePlease explain how this is possible. Thanks.
DeleteThis is brilliant. Kudos!
ReplyDeleteIn 9th question this is the correct logic:
ReplyDelete"PRIORVALUE( counting__c ) > counting__c"
I mean use > symbol.if you have used < , then you'll not be able to retrive the deleted child back from the recycle bin.
Yeah i think he is right,it's working
DeleteCan we bypass validation Rules?
ReplyDeleteYes -using Permission Set we can bypass validation Rules
Really helpful content. These are all repetitive and very important questions which interviewers asks all the time. Thank you!!
ReplyDeleteThanks, this is generally helpful.
ReplyDeletesalesforce cpq training
Visit us: salesforce cpq course
Hot And Sexy Independent Model Escort Service In Delhi Unlimited Enjoy Genuine 100% Profiles And Trusted Door Step Call Girls Feel Free To Call Us 24/7Hours Opens Thanks..
ReplyDeleteCall girls in Noida
Noida Call Girls
Escorts in Noida
Noida Escorts
Do you Need Instant Loan from $2,000 to $50,000,000.00 with no collateral required and receive a no obligation loan approval.We welcome the opportunity to show you how effective we are at helping our clients obtain the money they need to succeed. Our professional staff is available for a Free Consultation.At Patiala legitimate company Pvt , contact us now 2% interest rate, both long and short term cash reply to us (Whats App) number: +919394133968 patialalegitimate515@gmail.com
ReplyDeleteMr Jeffery
Liên hệ Aivivu, đặt vé máy bay tham khảo
ReplyDeletevé máy bay đi Mỹ Vietnam Airline
đăng ký bay từ mỹ về việt nam
khi nào có chuyến bay từ đức về việt nam
giá vé máy bay từ moscow về hà nội
các chuyến bay từ anh về việt nam
chuyến bay từ pháp về việt nam
Chi phi cho chuyen gia nuoc ngoai
Data Validation Security System
ReplyDeleteData Validation Security System - Pharmacies: Monitoring and recording of the environmental conditions of medical supplies storage Captemp.com.
Admin please remove the unwanted comments
ReplyDeletethank you sir i liked your post very much can you give me any tip so that i can start my new blog i try very hard to make a good block but i can not make so sir please help me
ReplyDeleteGurgaon Sector 74 Service Girls
Gurgaon Sector 76 Service Girls
Gurgaon Sector 80 Service Girls
Gurgaon Sector 81 Service Girls
Gurgaon Sector 82 Service Girls
Gurgaon Sector 83 Hot Service Girls
What Is Salesforce in Hindi
ReplyDeletekya aap bhi chhote penis se pareshan hain toh aap fr aap market se penis size badhane ki dava oil use karke bada aur mota kare skte hain aise karne se aap ka ling bhi bada hoga aur uska size mota hoga aur sath hi sath aapki sex karni ki timing bhi badegi
ReplyDeleteThe principal region is in choosing the lawyer and the subsequent region is botches made in the wake of choosing the lawyer.
ReplyDeleteBrain Injury Attorneys
A few lawyers have expounded broadly on the law. https://frouharlaw.com/
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteagar aap bhee apni bibi or girlfriend ko santusht nahi kar paate hai aur jaldi discharge ho jaate hain to Timing Badhane Ke Liye Spray ka use kar sakte hain.
ReplyDeleteYou’ve shared some excellent material. I’m grateful for this post
ReplyDeleteDiscover the impeccable world of luxury dresses by Ammara Khan. Elevate your fashion game with our exquisite collection of Pakistani Luxury Formals and indulge in the finest luxury clothes that Pakistan has to offer.
ReplyDelete