You need to sign in to do that
Don't have an account?
Deployment To Production failed
I created my first trigger and apex test class in the Sandbox. I had 100% code coverage and everything seemed to be working fine in the Sandbox. I used the Outbound Change Sets to deploy to production. When I validated the Inbound Change Set in my production environment, it failed and I don't understand what the error is.
API Name - KnowledgeController.null()
Type = Class
Problem = Failure Message: "line -1, column -1: Dependent class is invalid and needs recompilation: knowledgecontroller: line 292, column 16: No such column 'permissionsviewknowledge' on entity 'Profile'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the...
I don't understand why it says line 292 because I don't have anywhere close to 200 lines of code. Also, I'm not doing anything with knowledge base. How do I determine what is causing this error?
Thanks,
Wendy
Hi Wendy,
can you try by changing the where clause during your assertion check. Because there might be some records in the system owned by User you are checking against.
I believe this will work for you.
with best,
crmtech
All Answers
If its not code you've written or know about, it could possibly be part of a package you've installed from the AppExchange or elsewhere ?
yes the most probable scenario is that you have been testing Knowledge in your environment, but did not go further - Knowledge was then disabled.
And during your testing you have probably installed the AppExcahnge package "Sample Public Knowledge Base for Salesforce Knowledge".
You then need to remove (manually) the Apex classes and the VisualForce package from this package. (tip: they all have Knowledge in their name)
Let us know if this solves your issue!
Thanks
Etienne
Thanks for the replies. Etienne, I've taken over as Salesforce Admin from someone who has left the company and am not sure what all we have tested. I see that there is an app installed in both our production and sandbox orgs that is called "Sample Public Knowledge Base for Salesforce Knowledge". It looks like there are two apex classes installed - KnowledgeController and KnowledgeControllerTest. One thing I don't know is if it is being used. I've asked our support manager and she doesn't think we are using it.
However, if we are using it, how would I deploy my trigger and keep that active. When you say, I need to remove them manually from the Apex classes and the VisualForce package from this package what do you mean? I'm not sure how to do that.
Thanks so much for your help,
Wendy
Etienne,
I removed the "Sample Public Knowledge Base for Salesforce Knowledge" app and validating the deploy got past that but now it's failing on the test class.
Thanks for your help with the Knowledge base errors.
Wendy
is the failure in your test class (created for the trigger) ?
If so, please ensure that the test class is not data dependent. I mean to say you dont have any hard coded SOQL in your test class.
If you wish you can share test class code so we can have better view to check the test failures.
with best,
Yes, the failure is in my test class. The error is on Line 74: Failure Message: "System.AssertException: Assertion Failed: Expected: 001234, Actual: null", Failure Stack Trace: "Class.TestVDUpdateAccountNumber.testBulkInsert: line 74, column 21 External entry point". Here is my code.
Here's the trigger code:
I don't really know what I'm doing yet and am planning on going through the lab exercises. Any advice and help is greatly appreciated.
Wendy
Hi Wendy,
can you try by changing the where clause during your assertion check. Because there might be some records in the system owned by User you are checking against.
I believe this will work for you.
with best,
crmtech
Thanks so much crmtech. That fixed it.