• Mimica
  • NEWBIE
  • 0 Points
  • Member since 2012

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

Hi,

 

I'm a new SFDC developer and I would like to ask some help about  Accounts and Events.

 

When I change the ownership of an Account, all Events that were associated to the old owner are transfered to the new owner. Is there a way to prevent this?

 

This behavior happens too for Tasks, but in this case it's ok, because our business rules required that, but not for Events.

 

Thanks

Mimica

  • March 08, 2012
  • Like
  • 0

Hi,

 

After the go live of Spring 12 a lot of tests code failed in our Org and the error was always the same: to create an user, we

used the profile name 'Usuário Padrão' that failed to be retrieved from a Map.

 

I developed a small test class (testMap) that shows the error, testMethod01, and another that shows a workaround, testMethod02.

 

Could anyone confirm that it's a bug or if I'm doing something wrong?

 

Thanks in advance!

 

@isTest 
public class testMap {
@isTest 
public static void myTestMethod1() {
  Map<String,ID> profNameId= new Map<String,ID>();
  for (Profile prof : [select Id, Name from Profile where Name in ('Usuário padrão','Administrador Funcional')]) 
  { 
    profNameId.put(prof.Name , prof.Id); 
  }
  System.assert(profNameId.size() == 2, 'The map should have 2 elements'); 
  System.assert(profNameId.get('Administrador Funcional') <> null, 'The map for Administrador Funcional should not be null');
  System.assert(profNameId.get('Usuário padrão') <> null, 'The map for Usuário padrão should not be null'); 
}
@isTest 
public static void myTestMethod2() {
  Map<String,ID> profNameId= new Map<String,ID>();
  for (Profile prof : [select Id, Name from Profile where Name in ('Usuário padrão','Administrador Funcional')]) 
  { 
    if (prof.Name == 'Usuário padrão') { 
      profNameId.put('Usuario padrao', prof.Id); 
    } else { 
      profNameId.put(prof.Name , prof.Id); 
    } 
  }
  System.assert(profNameId.size() == 2, 'The map should have 2 elements'); 
  System.assert(profNameId.get('Administrador Funcional') <> null, 'The map for Administrador Funcional  should not be null');
  System.assert(profNameId.get('Usuario padrao') <> null, 'The map for Usuário padrão should not be null'); 
}
}

 

  • March 07, 2012
  • Like
  • 0

Hi,

 

After the go live of Spring 12 a lot of tests code failed in our Org and the error was always the same: to create an user, we

used the profile name 'Usuário Padrão' that failed to be retrieved from a Map.

 

I developed a small test class (testMap) that shows the error, testMethod01, and another that shows a workaround, testMethod02.

 

Could anyone confirm that it's a bug or if I'm doing something wrong?

 

Thanks in advance!

 

@isTest 
public class testMap {
@isTest 
public static void myTestMethod1() {
  Map<String,ID> profNameId= new Map<String,ID>();
  for (Profile prof : [select Id, Name from Profile where Name in ('Usuário padrão','Administrador Funcional')]) 
  { 
    profNameId.put(prof.Name , prof.Id); 
  }
  System.assert(profNameId.size() == 2, 'The map should have 2 elements'); 
  System.assert(profNameId.get('Administrador Funcional') <> null, 'The map for Administrador Funcional should not be null');
  System.assert(profNameId.get('Usuário padrão') <> null, 'The map for Usuário padrão should not be null'); 
}
@isTest 
public static void myTestMethod2() {
  Map<String,ID> profNameId= new Map<String,ID>();
  for (Profile prof : [select Id, Name from Profile where Name in ('Usuário padrão','Administrador Funcional')]) 
  { 
    if (prof.Name == 'Usuário padrão') { 
      profNameId.put('Usuario padrao', prof.Id); 
    } else { 
      profNameId.put(prof.Name , prof.Id); 
    } 
  }
  System.assert(profNameId.size() == 2, 'The map should have 2 elements'); 
  System.assert(profNameId.get('Administrador Funcional') <> null, 'The map for Administrador Funcional  should not be null');
  System.assert(profNameId.get('Usuario padrao') <> null, 'The map for Usuário padrão should not be null'); 
}
}

 

  • March 07, 2012
  • Like
  • 0

Hi, i'm a sf newbie, just joined an existing development environment. I am about to start my first assignment, which is changing an existing module. This will take at least a couple of weeks to finish, but in the mean time our app is being packages every week (sometimes even more frequently). Is there a way to copy the entire environment, so i can paly around a little bit before i really start changing the existing code in the development org?

Many thanks in advance!

Br, Marco

  • March 07, 2012
  • Like
  • 0