0

I have a question, I wrote trigger and a handler class that takes record type field from Opportunity line item and displays on QuoteLineItem record. It worked in sandbox but after deploying I can see blank value in record type field in QuoteLineitem. Please let me know what is the issue with this? And also I need to make some changes in code to take the record type value. Please let me know where to do this as I already deployed to production Do I have to make changes directly in Prod or should I do it in sandbox and deploy again?

0

I think you have deployed the apex class and recordtype through change set and you didn't include any profiles in the change set. So, code and recordtype got deployed but recordtype has not been included in any profiles.

Even if you deploy the change set as system admin profile, recordtype will not get included system admin profile. So, you need to manually add the recordtype in each profile.

Secondly, you cannot directly change the class, triggers at production. You need to change those in sandbox and then deploy that in production.

  • Just an FYI as it could be useful at some point - You can edit code directly in production using an IDE, although it is NOT a best practice. Using an IDE and editing the class, on save it does a metadata deploy. In a way your local machine is the "sandbox". It cannot be done if IDE is using tooling API for saves though. – Eric Dec 3 '17 at 1:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.