• JoeZaloom.ax395
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 8
    Replies

Is there any way to support person accounts in a managed package without making Person Account features a pre-requisite for installing the package?

 

I'd like to provide the option to create person-account instead of contacts in an Apex class that auto creates contacts after a certain event for those users  who have person-accounts enabled.   However, I don't want to have to require package users to install person-accounts.

 

Thanks,

We have a Salesforce integration implemented as a managed package. I have some test classes which provide test coverage for the apex code in the package. Yesterday I was attempting to move the test code into the classes the test code covered. I copied the test code, deleted the class "TestRecordTypes," and created a test function in the controller class. After running the test, code showed as not covered even though it showed as covered when the test function was implemented in a separate class.

When I tried to move the code back into the class I was unable to edit or recreate the original TestRecordTypes class. If I create a new class w/ the same name in Eclipse the original code shows in the newly created class (???), but if I try to save I get prompted w/ "Remote instance has been updated... Use synchronize perspective..." but the synchronize perspective won't let me save the restored code in the deleted class.

I tried to delete the class using the API, but I get a message like "The class is not deletable."

So, the deleted class still shows in Setup / Develop / Classes. I can't edit it, or make it go away so I can recreate the class

This is bad enough, but when checking for responses today I find my original post was deleted.

Does anybody have any input on this one?

 

thanks,
joezaloom
 

I posted this message yesterday, but it was deleted. Don't know why.

 

We have a Salesforce integration implemented as a managed package. I have some test classes which provide test coverage for the apex code in the package. Yesterday I was attempting to move the test code into the classes the test code covered. I copied the test code, deleted the class "TestRecordTypes," and created a test function in the controller class. After running the test, code showed as not covered even though it showed as covered when the test function was implemented in a separate class.

 

When I tried to move the code back into the class I was unable to edit or recreate the original TestRecordTypes class. If I create a new class w/ the same name in Eclipse the original code shows in the newly created class (???), but if I try to save I get prompted w/ "Remote instance has been updated... Use synchronize perspective..." but the synchronize perspective won't let me save the restored code in the deleted class.

 

I tried to delete the class using the API, but I get a message like "The class is not deletable."

 

So, the deleted class still shows in Setup / Develop / Classes. I can't edit it, or make it go away so I can recreate the class

 

This is bad enough, but when checking for responses today I find my original post was deleted.

 

Does anybody have any input on this one? Rock on my left, hard place on my right.

 

thanks,

joezaloom

Hello,

 

I had a test class "TestRecordTypes" that is part of a managed package. I deleted the class because I wanted to move the test methods inside the controller that was being tested. This didn't work like I thought it would, so I wanted to restore the code from the deleted class, which I had saved locally.

 

There seems to be no way to overwrite or undelete the class. In Eclipse if I create a new class w/ the same nameI get prompted w/ "Duplicate Component Found," and it asks me if I want to overwrite the remote instance. If I choose "OK" I get a local class w/ the deleted code in it. When I save I get errors for the class and it's meta.xml file saying "Save error: Conflict found while preparing to save 'TestRecordTypes.' to server.  Remote instance has been updated since last save or sync.  Use the Synchronize Perspective to resolve the conflict." But the Synchronize with Server tool doesn't let me upload the code to the server. If I try to deploy the newly created class to the server I get an error "Class is deleted". The deleted class still shows up in the SF UI under Develop / Apex Classes but there doesn't appear to be any way to undelete the class.

 

So I appear to be stuck in that Twilight Zone episode where you walk down a street but always end up back where you started. Is this a "feature" or is there a way to restore the class?

 

thanks in advance,

joezaloom

Hello,

 

We have an application that integrates our data through the Salesforce API. We create a new user in the client's SF org for the integration. In the past, some clients have disabled login to the SF UI for the integration user due to security restrictions on their side.

 

A new client just requested the same thing. I had assumed it was a setting like "Disable UI Login" somewhere in setup. But either I'm going blind, or the login was restricted in some other way. Does anybody know of a way to do this?

 

Thanks in advance,

JoeZaloom

Hi,

 

We have an application that we distribute as a managed package. In the dev org where I created the package, I can see all output from my System.debug() calls in the system log window. 

 

When we install the package in a client's SF org, we can't see any of the System.debug() output. We do see the SF profiling information, but no debug() calls.

 

I can't find any reference to this in the documentation. 

 

- Is this known behavior?

 

- Is there some way to enable System.debug() output in a managed package?

 

thanks for any feedback,

joezaloom

Hello,

I thought I'd seen reference to this in previous posts, but I can't seem to find any thing when I search.

When I run all tests in the SF web interface, I get 72% test coverage. When I attempt to deploy with the migration tool, I get a message like this:

Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

After running the test In the web interface, I see the test methods for both triggers listed under Test Success, and I can see debug output from the triggers in the test log.

Is there some xml I need to add to build.xml to specify the test methods for triggers? Maybe I'm doing something else wrong?

Here is one of the trigger test methods:

Code:
public class TestTriggers {

 public static testMethod void testChatTrigger()
 {

  isp__Chat__c chat = new isp__Chat__c(); //isp__email__c='fred@bedrock.gov');
  
  chat.isp__email__c  ='fred@bedrock.gov';
  chat.isp__Last_Name__c = 'Flinstone';
  chat.isp__first_name__c = 'Fred';
  chat.isp__phone__c  = '99955512121';
  
  // get Account, Contact to set chat references
  Account[] aa = [select id from Account];  
  if (aa.size() > 0)
  {
   chat.isp__account__c = aa[0].id;
  }
  
  Contact[] cc = [select id, account.id from Contact];  
  if (cc.size() > 0)
  {
   chat.isp__contact__c = cc[0].id;
  }
  
  insert chat;
  
  System.debug('NEW CHAT ID= ' + chat.id);
System.assert(chat.id != null);

  } }

Thanks.
joe

Hello,

Is there a way to use urlfor($Action.Account.New) from a custom controller? I'm trying to redirect a user to a new Account page after performing an action on the server. I have a command button w/ an "action" attribute pointing to a custom save function in the controller named "newAccount()". After updating other Accounts I'd like to redirect the user to a new Account page, passing in certain parameters.

I can't find a way to get to the $Action global variable in the controller. Is there a way to do this? I thought about passing the $Action.Account.New to a property on the controller, but that seems hacky and kinda messy.

Hi,

 

We have an application that we distribute as a managed package. In the dev org where I created the package, I can see all output from my System.debug() calls in the system log window. 

 

When we install the package in a client's SF org, we can't see any of the System.debug() output. We do see the SF profiling information, but no debug() calls.

 

I can't find any reference to this in the documentation. 

 

- Is this known behavior?

 

- Is there some way to enable System.debug() output in a managed package?

 

thanks for any feedback,

joezaloom

I posted this message yesterday, but it was deleted. Don't know why.

 

We have a Salesforce integration implemented as a managed package. I have some test classes which provide test coverage for the apex code in the package. Yesterday I was attempting to move the test code into the classes the test code covered. I copied the test code, deleted the class "TestRecordTypes," and created a test function in the controller class. After running the test, code showed as not covered even though it showed as covered when the test function was implemented in a separate class.

 

When I tried to move the code back into the class I was unable to edit or recreate the original TestRecordTypes class. If I create a new class w/ the same name in Eclipse the original code shows in the newly created class (???), but if I try to save I get prompted w/ "Remote instance has been updated... Use synchronize perspective..." but the synchronize perspective won't let me save the restored code in the deleted class.

 

I tried to delete the class using the API, but I get a message like "The class is not deletable."

 

So, the deleted class still shows in Setup / Develop / Classes. I can't edit it, or make it go away so I can recreate the class

 

This is bad enough, but when checking for responses today I find my original post was deleted.

 

Does anybody have any input on this one? Rock on my left, hard place on my right.

 

thanks,

joezaloom

Is there any way to support person accounts in a managed package without making Person Account features a pre-requisite for installing the package?

 

I'd like to provide the option to create person-account instead of contacts in an Apex class that auto creates contacts after a certain event for those users  who have person-accounts enabled.   However, I don't want to have to require package users to install person-accounts.

 

Thanks,

Hello,

 

We have an application that integrates our data through the Salesforce API. We create a new user in the client's SF org for the integration. In the past, some clients have disabled login to the SF UI for the integration user due to security restrictions on their side.

 

A new client just requested the same thing. I had assumed it was a setting like "Disable UI Login" somewhere in setup. But either I'm going blind, or the login was restricted in some other way. Does anybody know of a way to do this?

 

Thanks in advance,

JoeZaloom

Hi,

 

We have an application that we distribute as a managed package. In the dev org where I created the package, I can see all output from my System.debug() calls in the system log window. 

 

When we install the package in a client's SF org, we can't see any of the System.debug() output. We do see the SF profiling information, but no debug() calls.

 

I can't find any reference to this in the documentation. 

 

- Is this known behavior?

 

- Is there some way to enable System.debug() output in a managed package?

 

thanks for any feedback,

joezaloom

Hello,

I thought I'd seen reference to this in previous posts, but I can't seem to find any thing when I search.

When I run all tests in the SF web interface, I get 72% test coverage. When I attempt to deploy with the migration tool, I get a message like this:

Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required

After running the test In the web interface, I see the test methods for both triggers listed under Test Success, and I can see debug output from the triggers in the test log.

Is there some xml I need to add to build.xml to specify the test methods for triggers? Maybe I'm doing something else wrong?

Here is one of the trigger test methods:

Code:
public class TestTriggers {

 public static testMethod void testChatTrigger()
 {

  isp__Chat__c chat = new isp__Chat__c(); //isp__email__c='fred@bedrock.gov');
  
  chat.isp__email__c  ='fred@bedrock.gov';
  chat.isp__Last_Name__c = 'Flinstone';
  chat.isp__first_name__c = 'Fred';
  chat.isp__phone__c  = '99955512121';
  
  // get Account, Contact to set chat references
  Account[] aa = [select id from Account];  
  if (aa.size() > 0)
  {
   chat.isp__account__c = aa[0].id;
  }
  
  Contact[] cc = [select id, account.id from Contact];  
  if (cc.size() > 0)
  {
   chat.isp__contact__c = cc[0].id;
  }
  
  insert chat;
  
  System.debug('NEW CHAT ID= ' + chat.id);
System.assert(chat.id != null);

  } }

Thanks.
joe

Hello,

Is there a way to use urlfor($Action.Account.New) from a custom controller? I'm trying to redirect a user to a new Account page after performing an action on the server. I have a command button w/ an "action" attribute pointing to a custom save function in the controller named "newAccount()". After updating other Accounts I'd like to redirect the user to a new Account page, passing in certain parameters.

I can't find a way to get to the $Action global variable in the controller. Is there a way to do this? I thought about passing the $Action.Account.New to a property on the controller, but that seems hacky and kinda messy.