In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
The content of this article mainly focuses on the common SFDC anomalies in Salesforce. The content of the article is clear and well-organized. It is very suitable for beginners to learn and is worth reading. Interested friends can follow the editor to read together. I hope you can get something through this article!
As a rookie, we often need to fight with anomalies. In order that we will not panic or mess up when we encounter it again, we need to know the anomalies like the back of our hand, be able to face them calmly and solve them easily. When you encounter an exception, don't panic, find out the reason calmly. As the saying goes, a program without bug is not a good program. If there is no bug, most programmers may lose their jobs, and programmers may join the part-time trend.
If you don't say much, it's unusual:
1. UNABLE_TO_LOCK_ROW
Deadlocks occur in two scenarios: two transactions (transactions) update a record at the same time, or a transactions timeout.
2. STRING_TOO_LONG
The foreground does not make a limit on the length of the field, resulting in an error report submitted by the background.
3. LIMIT_EXCEEDED
1. Too many SOQL queries: 101
A transaction can only execute 100 SOQL at a time to check whether the SOQL or DML is written in a loop; if you need to change the context, you can use the @ future annotation to run the code asynchronously.
It should be noted that what is executed in a trigger belongs to a transaction.
I don't know if my friends often encounter this exception, but Xiao Meow often encounters ┭┮ ┭┮.
2. Too many DML rows: 10001
A transaction can only update 10000 records at a time, you can try to use batch instead of apex operation.
3. Apex CPU time limit exceeded
The SF server cpu performs synchronous execution with a maximum delay of 10s and async for 60s. Try to use more query-based map structures; try whether some code can be executed asynchronously (@ future); try merging SOQL; to try to reduce bad traversal of data.
4. CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY
Do not have permission to create, update a record (check fields, object permissions).
5. INVALID_FIELD_FOR_INSERT_UPDATE
It is common to assign illegal values to fields, assign values to read-only fields, and record DML operations on parent objects.
6. INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST
Assign a null value or a limit to a field of type picklist.
7. FIELD_FILTER_VALIDATION_EXCEPTION
Whether the update operation violates the lookp filter rules of the field.
8. FIELD_CUSTOM_VALIDATION_EXCEPTION
Cannot define a custom validation formula that violates field integrity rules.
9.INVALID_TYPE_ON_FIELD_IN_RECORD
The specified value is not valid for the type of the specified field.
Xiao Meow remembers that when he encountered this error, he encountered this error because he did not judge that the field was not empty when assigning a value to the field with a formula in the process generator, because the field was a check box. At that time, Xiao Meow thought that the value of the check box was either true or false, but did not think of null. As a result, this exception occurred. Later, under the suggestion of his predecessors, he judged that it was null and assigned it a value of false in the formula.
Example:
A.IsError__c = IF (IsError__c = = null,false,IsError__c)
10. No more than one executeBatch can be called from within a testmethod
Only one executeBatch can be called in a test method. Make sure that the iterable returned from the start method matches the batch size, resulting in an executeBatch call.
11. Database.executeBatch cannot be called from a batch or future method
This error was reported by Xiaomiao when making the Batch chain. The reason is that the API version is too low to support the operation of the Batch chain ┭┮ chains ┭┮. Salesforce introduced the function of implementing the Batch chain through Batch's finish method when Win13. The API version for Win 13 is 26.0, so our Batch batch class will need to use that version or later to use the Batch chain. At that time, the API version of a Batch in the middle of Meow's Batch chain happened to be 25.0, so this error occurred at run time.
Thank you for your reading. I believe you have some understanding of the question of "what are the common SFDC anomalies in Salesforce?" go to practice. If you want to know more about it, you can follow the website! The editor will continue to bring you better articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.