• Kitty S
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi. I am a complete coding novice so don't know if this is possible or not.

We have a custom object which returns voucher numbers, these can have an availability of Used, Available or Expired.  There is currently a custom button on the account page that produces a PDF of all the vouchers on that account.  I have been asked if we can limit this PDF to only show those vouchers with a status of Available.  Is this possible?

This is what the code looks like currently:
User-added image
I'm really struggling with Apex and the code coverage of our org.  I'm not a developer and I'm completely stuck.

We have 74% code coverage in our production org. We also have 4 Apex triggers and 15 Apex classes that are completely redundant and relate to a custom object that is never used.  We want to delete the complete object and all related code.  The Apex classes all fail so getting rid of them would bring our code coverage up to a decent level.

I can't seem to get rid of them. I can't deactivate the triggers in Sandbox and deploy them to production because code coverage is not high enough.  Plus some of our code also has 0% coverage. I've had Eclipse installed but when I try and make one of the unwanted triggers inactive I get errors:

System.QueryException:List has no rows for assignment to SObject
System:Exception:Assertion Failed
System:Exception:Assertion Failed
System:Exception:Assertion Failed
And two 'System.DmlException:Update failed' that trigger a validation rule on the Account in the production org

How do I unravel this so that I can get rid of this code?  Is there a simple way?  I can't deploy anything that requires code changes at the moment so I have to fix it somehow.

Can anyone help explain it in simple terms so that a dummy can understand it please?

Thank you.
Hi. I am a complete coding novice so don't know if this is possible or not.

We have a custom object which returns voucher numbers, these can have an availability of Used, Available or Expired.  There is currently a custom button on the account page that produces a PDF of all the vouchers on that account.  I have been asked if we can limit this PDF to only show those vouchers with a status of Available.  Is this possible?

This is what the code looks like currently:
User-added image
I'm really struggling with Apex and the code coverage of our org.  I'm not a developer and I'm completely stuck.

We have 74% code coverage in our production org. We also have 4 Apex triggers and 15 Apex classes that are completely redundant and relate to a custom object that is never used.  We want to delete the complete object and all related code.  The Apex classes all fail so getting rid of them would bring our code coverage up to a decent level.

I can't seem to get rid of them. I can't deactivate the triggers in Sandbox and deploy them to production because code coverage is not high enough.  Plus some of our code also has 0% coverage. I've had Eclipse installed but when I try and make one of the unwanted triggers inactive I get errors:

System.QueryException:List has no rows for assignment to SObject
System:Exception:Assertion Failed
System:Exception:Assertion Failed
System:Exception:Assertion Failed
And two 'System.DmlException:Update failed' that trigger a validation rule on the Account in the production org

How do I unravel this so that I can get rid of this code?  Is there a simple way?  I can't deploy anything that requires code changes at the moment so I have to fix it somehow.

Can anyone help explain it in simple terms so that a dummy can understand it please?

Thank you.