• Jes@NZ
  • NEWBIE
  • 0 Points
  • Member since 2013

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

Due to a change in our procedures we need to create new object and restructure our information.

 

Is there any easy way to create new objects and copy some field from one object to another?

 

Thank you

Jes

  • December 03, 2013
  • Like
  • 0

Hi 

 

I need to create a child object when a user is created.

 

I tried inside the "after insert" trigger but I can't.

 

Any idea how to solve it?

 

Thanks

Jes

  • December 03, 2013
  • Like
  • 0

Hi everyone

 

My first trigger in salesforce, is working in sandbox but I'm having a problem with the coverage.

 

I was already reading about it and couldn't find a solution, can anyone help?

 

I'm a new at salesforce so any help will be more than welcome.

 

The code is:

 

trigger AccountTrigger on Account (before insert) {
    
    List<Account> lst_in = trigger.new;
      for(Account acc:lst_in){
      
         
         acc.ShippingCity = acc.BillingCity;
         acc.PersonMailingCity = acc.BillingCity;
         acc.PersonOtherCity = acc.BillingCity;
    
         acc.ShippingStreet = acc.BillingStreet;
         acc.PersonMailingStreet = acc.BillingStreet;
         acc.PersonOtherStreet = acc.BillingStreet;
   
         acc.ShippingState = acc.BillingStreet;
         acc.PersonMailingState = acc.BillingState;
         acc.PersonOtherState = acc.BillingState;
       
         acc.ShippingPostalcode = acc.BillingPostalcode;
         acc.PersonMailingPostalcode = acc.BillingPostalcode;
         acc.PersonOtherPostalcode = acc.BillingPostalcode;
 
         acc.ShippingCountry = acc.BillingCountry;
         acc.PersonMailingCountry = acc.BillingCountry;
         acc.PersonOtherCountry = acc.BillingCountry;
    
   }
}

 

The errors are:

 

AccountTrigger

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

      Average test coverage across all Apex Classes and Triggers is 66%, at least 75% test coverage is required.

 

I can understand that I will have to tweak the code to have more than the minimum expected, but how?

 

Thank you

  • November 20, 2013
  • Like
  • 0

Hi everyone

 

My first trigger in salesforce, is working in sandbox but I'm having a problem with the coverage.

 

I was already reading about it and couldn't find a solution, can anyone help?

 

I'm a new at salesforce so any help will be more than welcome.

 

The code is:

 

trigger AccountTrigger on Account (before insert) {
    
    List<Account> lst_in = trigger.new;
      for(Account acc:lst_in){
      
         
         acc.ShippingCity = acc.BillingCity;
         acc.PersonMailingCity = acc.BillingCity;
         acc.PersonOtherCity = acc.BillingCity;
    
         acc.ShippingStreet = acc.BillingStreet;
         acc.PersonMailingStreet = acc.BillingStreet;
         acc.PersonOtherStreet = acc.BillingStreet;
   
         acc.ShippingState = acc.BillingStreet;
         acc.PersonMailingState = acc.BillingState;
         acc.PersonOtherState = acc.BillingState;
       
         acc.ShippingPostalcode = acc.BillingPostalcode;
         acc.PersonMailingPostalcode = acc.BillingPostalcode;
         acc.PersonOtherPostalcode = acc.BillingPostalcode;
 
         acc.ShippingCountry = acc.BillingCountry;
         acc.PersonMailingCountry = acc.BillingCountry;
         acc.PersonOtherCountry = acc.BillingCountry;
    
   }
}

 

The errors are:

 

AccountTrigger

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

      Average test coverage across all Apex Classes and Triggers is 66%, at least 75% test coverage is required.

 

I can understand that I will have to tweak the code to have more than the minimum expected, but how?

 

Thank you

  • November 20, 2013
  • Like
  • 0

Hi,

 

I want to access mobile camera from salesforce VF page to capture photo and save it in salesforce object.

 

Please help me. Thanks in advance.

 

OM