• mdqh
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Hi,

 

Does anyone know how to get the label of an address as shown on the detail page? I'm not talking about the label of the individual address fields (eg. $ObjectType.Account.Fields.ShippingStreet.Label), but the label of the whole address.

 

I'm writing a VF page to be used as a "field" on a detail page. And I'd like to show the VF page's label with the VF page as they'll line up with the other fields on the page. My question is: is it possible for the VF page to change its own label because I'd like to derive its label from the label of another field. Or is there a way for the user to configure the label of this VF page?

 

Thanks,

mdqh

  • August 16, 2011
  • Like
  • 0

Hi,

 

I'm relatively new to Salesforce/Apex, and currently having problem getting the 75% test coverage.

 

FYI, I've customised the LMA's Licence object to include a few custom fields for our application. In doing so, I had to also create the following pages/classes - just to be consistent with the LMA's look-and-feel:

 

1) A Visualforce page - a modified version of the LMA's Modify Licence page. This is to allow me to edit my custom fields

2) A "duplicate" version of the LMA's statusPicklistExtension for my new page. I tried to use the LMA's extension but got an error saying that the class is "not marked as global and cannot be used as a controller or extension". I basically guessed what the extension does based on Status flow diagram in the LMA demo. Not sure if this is right though!

 

Now, I have also written the test methods and they do give me 100% coverage for every one of my Apex classes. But the overall coverage is still only at 64%.

 

 

Summary

 

Test ClassAcxTrackingTests
Tests Run2
Test Failures0
Code Coverage Total %64
Total Time (ms)1127.0

 

 

Code Coverage

 

 

 The Code Coverage section shows that I only get only 2% for the class TestLicenceseUpdates. But this test class belongs to the LMA. So, could this be dragging my test coverage down? And if so, how can I fix it?

 

I just remembered I have an another 'exception' class which extends Exception, and doesn't have any additional code. So I don't think it matters if I don't write any test for it.

 

Any help would be very much appreciated.

 

Thanks,

mdqh

 

 

  • August 06, 2009
  • Like
  • 0

Hi,

 

I'm relatively new to Salesforce/Apex, and currently having problem getting the 75% test coverage.

 

FYI, I've customised the LMA's Licence object to include a few custom fields for our application. In doing so, I had to also create the following pages/classes - just to be consistent with the LMA's look-and-feel:

 

1) A Visualforce page - a modified version of the LMA's Modify Licence page. This is to allow me to edit my custom fields

2) A "duplicate" version of the LMA's statusPicklistExtension for my new page. I tried to use the LMA's extension but got an error saying that the class is "not marked as global and cannot be used as a controller or extension". I basically guessed what the extension does based on Status flow diagram in the LMA demo. Not sure if this is right though!

 

Now, I have also written the test methods and they do give me 100% coverage for every one of my Apex classes. But the overall coverage is still only at 64%.

 

 

Summary

 

Test ClassAcxTrackingTests
Tests Run2
Test Failures0
Code Coverage Total %64
Total Time (ms)1127.0

 

 

Code Coverage

 

 

 The Code Coverage section shows that I only get only 2% for the class TestLicenceseUpdates. But this test class belongs to the LMA. So, could this be dragging my test coverage down? And if so, how can I fix it?

 

I just remembered I have an another 'exception' class which extends Exception, and doesn't have any additional code. So I don't think it matters if I don't write any test for it.

 

Any help would be very much appreciated.

 

Thanks,

mdqh

 

 

  • August 06, 2009
  • Like
  • 0