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
sunayasunaya 

Disabling Triggers using Change Sets

I am trying to Disable Triggers using Change Sets. It is resulting in these errors which is coming from the Test Class

 

 Failure Message: "System.DmlException: Insert failed. First exception on
row 0; first error: STANDARD_PRICE_NOT_DEFINED, No standard price
defined for this product: []", Failure Stack Trace:
"Class.ActivateQuote.updateForecast: line 222, column 1
Class.AddKittTest.AddKittTestMethod: line 79, column 1"

 

 

How can I resolve this? How can I disable the Test Class too.

Rahul_sgRahul_sg

you cannot disable the test class, what you can do is:

1) comment the code in your test class and include that test class in the change set along with the deactivated trigger.

2) also for the apex class ActivateQuote , it seems you have not defined std price for one of the product.

kreshokresho

This is a common problem with unit tests that depend on the standard pricebook. Add this annotation on your your test method, and it will be able to see the standard price book:

 

@IsTest(SeeAllData=true)
static void testmethod testSomething() {
   // ...
}

 

Hope this helps,

Kresimir
Apex Editor LS - free alternative to Force.com apex editor.

Miles Smith 5Miles Smith 5
Thanks for sharing.I found a lot of interesting information here. A really good post, very thankful and hopeful that you will write many more posts like this one.
for me, this thread solution worked https://salesforce.stackexchange.com/questions/164931/is-there-a-way-to-call-javascript-after-action-on-visualforce-page​
with regards
https://viamichelin.onl/ https://putlocker.ooo/ https://googleearth.onl/