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
Kathy ThomsonKathy Thomson 

I have an error

There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Delete failed. First exception on row 0 with id 001o000000U6x0kAAB; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Cannot delete account with related opportunities. - Can any help me with this?
Pankaj_GanwaniPankaj_Ganwani
Hi,

Are you getting this error during trigger execution or batch or vf page? It seems from the error that there is an existing custom validation rule which is restricting the DML from taking place. Can you please check the existing validation rules?

If possible, Can you please share the code with us?
 
Kathy ThomsonKathy Thomson
I am getting this error on the Using Formula Fields Challenge.  What would you like me to send to you?
Pankaj_GanwaniPankaj_Ganwani
Hi,

Sorry, I was not known that you were using formula field. Are you taking up trailhead challenge? If so, Can you please share the link for the module which you are facing this error in?
Kathy ThomsonKathy Thomson
https://developer.salesforce.com/trailhead/force_com_introduction/point_click_business_logic/formula_fields#challenge
Pankaj_GanwaniPankaj_Ganwani
Hi,

I think you are using below mentioned formula in your formula field:
IF( SLAExpirationDate__c < TODAY() , true,false)

Can you please deactivate the validation rules on Account object once and then try to verify your challenge?
Kathy ThomsonKathy Thomson
Can you tell me how to do that?
Pankaj_GanwaniPankaj_Ganwani
Go to Setup-> Account->validation rules->click on each validation rule and uncheck the Active checkbox.
 
Kathy ThomsonKathy Thomson
There are not any validation rules for Account
Rachel_NatikRachel_Natik
Was this resolved? I am having this issue with the validation rule challenge. I deactivated the rule and got this message:
Challenge not yet complete... here's what's wrong: 
The validation rule failed to enforce the business logic
Kathy ThomsonKathy Thomson
I am out of the office until 05/01/2015. Note: This is an automated response to your message "(Salesforce Developers): New reply to your question." sent on 04/30/2015 12:45:15. This is the only notification you will receive while this person is away. Please note: Florida has very broad public records laws. Many written communications to or from The Florida Bar regarding Bar business may be considered public records, which must be made available to anyone upon request. Your e-mail communications may therefore be subject to public disclosure.
Kathy ThomsonKathy Thomson
I have resolved it myself. I went in and deleted all my custom fields and the issue went away. I can send you my code for the validation rule if you would like. Please note: Florida has very broad public records laws. Many written communications to or from The Florida Bar regarding Bar business may be considered public records, which must be made available to anyone upon request. Your e-mail communications may therefore be subject to public disclosure.
deep kaurdeep kaur
Challenge not yet complete in My Trailhead Playground 2
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, AccountDeletion: execution of BeforeInsert caused by: System.NullPointerException: Attempt to de-reference a null object External entry point: []