• mng0827
  • NEWBIE
  • 10 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 11
    Replies
Hi,

I'm trying to create a trigger which updates the Account owner based on the detail object criteria. The account assignment should be in a round robin fashion so that accounts will be distributed equally.

However, I get this error upon editing the detail object:

System.NullPointerException: Script-thrown exception

Below is my code:

trigger AssignNewClient on Master_Tracker__c (before insert) {
    List<Id> AccountId = new list <id>();
    for(Master_Tracker__c mt: Trigger.new) 
    {
        if((mt.Product_Code__c == 'Advisory Services')
        &&(mt.Agreement_Signed_Date__c != null)
        &&(mt.Date_Payment_Info_Received__c != null)
        &&(mt.Renewal__c = false)){
        AccountId.add(mt.Account_Name__c);  
    }
        {
       
            Integer x = Integer.valueof(mt.Date_Payment_Info_Received__c);
            Integer y = math.mod(x, 5);
            Account a = new Account();
            if(y == 0)
            {
                //When Mod = O update the owner to User 1 ID 005d0000001mr2u
                //new org ID 005d0000001mr2u
                a.OwnerId = '005d0000001mr2u';
            }
           
           
            else if(y == 1)
            {
                //When Mod = 2 update the owner to User 2 ID 005d0000001nHMY  
                a.OwnerId = '005d0000001nHMY';
            }
           
            else if(y == 2)
            {
                //When Mod = 3 update the owner to User 3 ID 005d0000002KBv1
                a.OwnerId = '005d0000002KBv1';
            }  
           
            else if(y == 3)
            {
               //When Mod = 4 update the owner to User 4 ID 005d0000001mr1u
               a.OwnerId = '005d0000001mr1u';
            }
           
            else if(y == 4)
            {
               //When Mod = 5 update the owner to User 5 ID 005d0000002LDuq
               a.OwnerId = '005d0000002LDuq';
            }
        }
    }
}
Hi,

I keep getting this error on one my triggers:

"System.ListException: Duplicate id in list:..."

I'm not sure where the issue is but below is the trigger:

trigger updateContactExactTarget on xtma_Individual_Email_Result__c (after insert) {

List <String> Code = new List <String> ();
   
    for (Integer i = 0; i < Trigger.new.size(); i++) {
        if(Trigger.new[i].Report_Name__c != null && Trigger.new[i].Contact__c != null) {
            Code.add(Trigger.new[i].Code2__c);       // List of the codes
        }
    }
   
    // get all the ContactExactTarget which have the same code as the code of IndividualEmailResult
    List <ContactExactTarget__c> CodeList = new List <ContactExactTarget__c> ([Select Id, Name, Code__c, Individual_Email_Result2__c from ContactExactTarget__c where Code__c in :Code and Individual_Email_Result2__c = null]);
List <ContactExactTarget__c> CETsToUpdate = new List <ContactExactTarget__c>();
    
    for(ContactExactTarget__c c : codeList) {
   
        for (Integer i = 0; i < Trigger.new.size(); i++) {
            if (c.code__c == Trigger.new[i].Code2__c) {
                c.Individual_Email_Result2__c = Trigger.new[i].Id; // Populating the Individual Email Result field
                CETsToUpdate.add(c);
            }
        } 
         
    }
   
  
    if(CETsToUpdate != null || CETsToUpdate.size() >0)
       update CETsToUpdate;                   // Update the list of ContactExactTarget
}



Can someone help me fix this trigger?
  • September 18, 2014
  • Like
  • 0
Hi,

Can someone help me with this trigger? I'm getting this error upon saving it:

Error: Compile Error: Variable does not exist: AccountIds at line 9 column 13

Here's my trigger:

trigger updatePCFPMPRopp on Master_Tracker__c (after insert) {
    Master_Tracker__c mt = trigger.new[0];
   
        if(mt.Product_Code__c == 'PCFP' && (mt.GLAS_Offer_Status__c == 'Initiated' || mt.GLAS_Offer_Status__c == 'Offer in Review'))

        List<Id> AccountIds = new List<Id>();
        for (Integer i=0;i<Trigger.new.size();i++){
        {
            AccountIds.add(Trigger.new[i].Account_Name__c);
        }
        }
       
        List<Opportunity> OppList = new List<Opportunity>([SELECT Id,AccountId FROM Opportunity WHERE RecordTypeId = '012d0000000go7t' and Closed = false]);
            for (Opportunity opp: OppList){
            opp.StageName = 'Closed Won'; }
       
        update OppList;
}
Hi,

We currently store our client's documents on our database in the client vault. Each client has their own vault where they can upload docs in different folders. What is the best way to directly store these documents with the same structure in Salesforce? How do we implement this?

Thanks!
Hi,

Is it possible to update a child record of all contacts when one of the contact child record is updated? We have a custom object associated to contacts and would like the same record to reflect on all contacts within the same account. For example, Account A has 2 contacts, Contact 1 and Contact 2. Each contact has a child record, namely Child Record 1.a and Child Record 2.a. When Child Record 1.a is updated, Child Record 2.a should also update. Both child records should have the same info.

Is this possible? How do I do this?

Thanks!
Hi,

The Primary checbox field on our Contacts is enabled to "Checked" by default. If we want to add more contacts under the same account, then this should no longer be checked if it already has a primary contact. How can this be done using a trigger?

Thanks
Hi,

I'm trying to create a visualforce page which filters the standard Opportunity record type selection page based on the related Account record type. I'm getting this error upon saving my VF:

Error: Unknown property 'AccountStandardController.recTypeID'

Here's my code:

VF:
<apex:page standardController="Account">
    <apex:form >
            <apex:selectList value="{!recTypeID}" size="1">
                <apex:selectOptions value="{!myOptions}"></apex:selectOptions>
            </apex:selectList>         
    <apex:commandButton value="Next" Action="{!continue}"/>
    </apex:form>
</apex:page>


Controller:

public class myController {

        public List<SelectOption> opts             {get;set;}
        private String oType                        {get;set;}
        public Id recTypeId                         {get;set;}

        myController(){
            oType = 'Opportunity';
        }

        public List<SelectOption> myOptions() {
            opts = new List<SelectOption>();

            opts.add(new SelectOption('','--Please Select Record Type --'));

            for(RecordType rts : [Select Id, DeveloperName, Name From RecordType Where SObjectType = 'Opportunity']) {
            opts.add(new SelectOption(rts.id,rts.name));
            }

                Map<String,List<String>> mapping = new Map<String,List<String>>();
                mapping.put('Small_Medium_Sized_Business', new List<String>{'Defined_Benefit_Retirement','Defined_Contribution_Retirement'});


            return opts;
        }
    }



Hi,

I have an apex trigger on Account which updates an Account field based on another Account field. Upon testing, it only triggers when I attempt to meet the criteria the second time. On the first attempt, it doesn't fire. Here's my code:


trigger UpdateHHIncome on Account (before update) {
           
         Account acct = trigger.new[0];
   
    {    if(acct.HH_Income_ID__c == 1){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = 'Up to $8,925';
        } else if (acct.HH_Income_ID__c == 2){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$8,926 - $36,250';
        } else if (acct.HH_Income_ID__c == 3){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$36,251 - $87,850';
        } else if (acct.HH_Income_ID__c == 4){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$87,851 - $183,250';
        } else if (acct.HH_Income_ID__c == 5){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$183,251 - $398,350';
        } else if (acct.HH_Income_ID__c == 6){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$398,351 - $400,000';
        } else if (acct.HH_Income_ID__c == 7){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$400,001 or more';
        } else if (acct.HH_Income_ID__c == 8){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = 'Up to $17,850';
        } else if (acct.HH_Income_ID__c == 9) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$17,851 - $72,500';
        } else if (acct.HH_Income_ID__c == 10) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$72,501 - $146,400';
        } else if (acct.HH_Income_ID__c == 11) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$146,401 - $223,050';
        } else if (acct.HH_Income_ID__c == 12) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$223,051 - $398,350';
        } else if (acct.HH_Income_ID__c == 13) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$398,351 - $450,000';
        } else if (acct.HH_Income_ID__c == 14){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$450,001 or more';
        } else if (acct.HH_Income_ID__c == 15){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = 'Up to $8,925';
        } else if (acct.HH_Income_ID__c == 16){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$8,926- $36,250';
        } else if (acct.HH_Income_ID__c == 17){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$36,251 - $73,200';
        } else if (acct.HH_Income_ID__c == 18){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$73,201 - $111,525';
        } else if (acct.HH_Income_ID__c == 19){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$111,526 - $199,175';
        } else if (acct.HH_Income_ID__c == 20){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$199,176 - $225,000';
        } else if (acct.HH_Income_ID__c == 21){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$225,001 or more';
        } else if (acct.HH_Income_ID__c == 22){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = 'Up to $12,750';
        } else if (acct.HH_Income_ID__c == 23){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$12,751 - $48,600';
        } else if (acct.HH_Income_ID__c == 24){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$48,601 - $125,450';
        } else if (acct.HH_Income_ID__c == 25){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$125,451 - $203,150';
        } else if (acct.HH_Income_ID__c == 26){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$203,151 - $398,350';
        } else if (acct.HH_Income_ID__c == 27){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$398,351 - $425,000';
        } else if (acct.HH_Income_ID__c == 28){ 
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$425,001 or more';     
        } else{acct.Tax_Filing_Status_Peakfolio__c = null;
             acct.Household_Income__c = null;}
    }
}
Hi,

I would like to create a visualforce page to customize the standard Opportunity record type selection page based on the Account's record type. For example,
Account record type = A, the Opp record type selection should only show opp record types 1,2;
Account record type = B, the Opp record type selection should only show opp record types 3,4

Can someone provide a sample code for me to start with?
Hi,

We installed a managed package in our org which includes visualforce page components. One of the pages displays a field called 'Total Account Value' but this is not being stored. Is it possible to use this field in creating triggers when you can only access this field from a visualforce page?
Hi,

I'm trying to create a simple trigger which creates an opportunity whenever an account field is updated. However, I'm getting this error upon saving:

Error: Compile Error: Loop variable must be of type SOBJECT:Opportunity at line 3 column 19

Here's my trigger:

trigger CreateNewOppinPeakfolio on Account (after insert, after update){
     List <Opportunity> insertopp = new List <Opportunity> ();    
     for (Account acc: Trigger.new){
        if(acc.Analysis_Status_in_Peakfolio__c == 'Portfolio Analysis'){
            Opportunity o = new Opportunity ();
            o.Name = acc.Name;
            o.StageName = 'Portfolio Analysis';
            o.CloseDate = system.today() + 30;
            o.AccountId = acc.Id;
            insertopp.add(o);
        }
    }
    try {
            insert insertopp;
    }
    catch (system.Dmlexception e) {
            Trigger.new[0].addError(e);
    }
}
Hi,

Can someone provide me a sample code which updates the First Name of the primary contact when the custom First Name in the account is updated?

Thanks!
Hi,

I'm trying to create a trigger to update 2 picklist fields based on the value of a number field. However, I get the following error on line 5:

"Comparison arguments must be compatible types: String, Integer"

Here's my code:
________________________________________________________

trigger UpdateHHIncome on Account (before insert, before update) {

    Account acct = trigger.new[0];
    {
        if(acct.Household_Income__c == 1){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = 'Up to $8,925';}
        else if(acct.Household_Income__c == 2){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';
           acct.Household_Income__c = '$8,926 - $36,250';}
        else{acct.Tax_Filing_Status_Peakfolio__c = 'Single';
             acct.Household_Income__c = '$36,251 - $87,850';}
    }
}
Hi,

I'm trying to create a roll-up summary trigger for contacts to account. However, I get the following error:

Incompatible key type Schema.SObjectField for MAP<Id,Account>

Can someone help me with this? Here's my code:

trigger UpdateAccountAfterContactInsert on Contact (after insert, after update, after delete) {

    //unique Account object Ids
    private Set<Id> accountIdSet = new Set <Id>();
   
    //hold list of Account Record to be updated
    private List<Account> accountListUpdatable = new List<Account>();
   
    //when insert & update the Contact
    if(trigger.isInsert || trigger.isUpdate){
       
        for(Contact c: Trigger.new){
            accountIdSet.add(c.AccountId);
        }
    }
    //when update & delete the Contact
    if (Trigger.isUpdate || Trigger.isDelete){
        for(Contact c: Trigger.old){
            AccountIdSet.add(c.AccountId);
        }
    }
    //select the Account list
    Map<Id, Account> accountMap = new Map<ID, Account> ([Select Id from Account WHERE ID IN: accountIds]);
   
    for(Account a: [Select ID,(Select ID FROM Contacts)from Account WHERE ID IN:accountIds]){
       
        accountMap.get(account.ID) = a.Contacts.size();//assigning Size
        accountListUpdatable.add(accountMap.get(account.ID));
    }
    if(accountListUpdatable != NULL && accountListUpdatable.size()>0)
        UPDATE accountListUpdatable;
}

Hi,

I have a trigger which prevents duplicate contacts being entered into Salesforce. When creating the test class, I'm getting this error:
"Initial term of field expression must be a concrete SObject: LIST<Contact>" on this line:
  User-added image

Below is the test class:

@isTest
public class TestContactDupeCatcher {
    static testMethod void testContactDupeCatcher() {    
      // First make sure there are no contacts already in the system
      // that have the email addresses used for testing
      Set<String> testEmailAddress = new Set<String>();
      testEmailAddress.add('test1@duptest.com');
      testEmailAddress.add('test2@duptest.com');
      testEmailAddress.add('test3@duptest.com');
      testEmailAddress.add('test4@duptest.com');
      testEmailAddress.add('test5@duptest.com');
      System.assert([SELECT count() FROM Contact
                     WHERE Email IN :testEmailAddress] == 0);
      // Seed the database with some contact, and make sure they can
      // be bulk inserted successfully.
      Contact contact1 = new Contact(LastName='Test1',
                            Email='test1@duptest.com');
      Contact contact2 = new Contact(LastName='Test2',
                            Email='test4@duptest.com');
      Contact contact3 = new Contact(LastName='Test3',
                            Email='test5@duptest.com');
      Contact[] contact = new Contact[] {contact1, contact2, contact3};
      insert contact;     
      // Now make sure that some of these contacts can be changed and
      // then bulk updated successfully. Note that contact1 is not
      // being changed, but is still being passed to the update
      // call. This should be OK.
      contact2.Email = 'test2@duptest.com';
      contact3.Email = 'test3@duptest.com';
      update contact;
      // Make sure that single row contact duplication prevention works
      // on insert.
      Contact dup1 = new Contact(LastName='Test1Dup',
                           Email='test1@duptest.com');
      try {
         insert dup1;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 1);
         System.assert(e.getDmlIndex(0) == 0);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
      }
      // Make sure that single row lead duplication prevention works
      // on update.
      dup1 = new Contact(Id = contact1.Id, LastName='Test1Dup',
                      Email='test2@duptest.com');
      try {
         update dup1;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 1);
         System.assert(e.getDmlIndex(0) == 0);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
        }
      // Make sure that bulk contact duplication prevention works on
      // insert. Note that the first item being inserted is fine,
      // but the second and third items are duplicates. Note also
      // that since at least one record insert fails, the entire
      // transaction will be rolled back.
      dup1 = new Contact(LastName='Test1Dup',
                      Email='test4@duptest.com');
      Contact dup2 = new Contact(LastName='Test2Dup',
                           Email='test2@duptest.com');
      Contact dup3 = new Contact(LastName='Test3Dup',
                           Email='test3@duptest.com');
      Contact[] dups = new Contact[] {dup1, dup2, dup3};
      try {
         insert dups;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 2);
         System.assert(e.getDmlIndex(0) == 1);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
         System.assert(e.getDmlIndex(1) == 2);
         System.assert(e.getDmlFields(1).size() == 1);
         System.assert(e.getDmlFields(1)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(1).indexOf(
            'A contact with this email address already exists.') > -1);
      }
      // Make sure that bulk contact duplication prevention works on
      // update. Note that the first item being updated is fine,
      // because the email address is new, and the second item is
      // also fine, but in this case it's because the email
      // address doesn't change. The third case is flagged as an
      // error because it is a duplicate of the email address of the
      // first contact's value in the database, even though that value
      // is changing in this same update call. It would be an
      // interesting exercise to rewrite the trigger to allow this
      // case. Note also that since at least one record update
      // fails, the entire transaction will be rolled back.
      dup1 = new Contact(Id=contact1.Id, Email='test4@duptest.com');
      dup2 = new Contact(Id=contact2.Id, Email='test2@duptest.com');
      dup3 = new Contact(Id=contact.Id, Email='test1@duptest.com');
      dups = new Contact[] {dup1, dup2, dup3};
      try {
         update dups;
         System.assert(false);
      } catch (DmlException e) {
         System.debug(e.getNumDml());
         System.debug(e.getDmlMessage(0));
         System.assert(e.getNumDml() == 1);
         System.assert(e.getDmlIndex(0) == 2);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
        }
      // Make sure that duplicates in the submission are caught when
      // inserting contacts. Note that this test also catches an
      // attempt to insert a contact where there is an existing
      // duplicate.
      dup1 = new Contact(LastName='Test1Dup',
                      Email='test4@duptest.com');
      dup2 = new Contact(LastName='Test2Dup',
                      Email='test4@duptest.com');
      dup3 = new Contact(LastName='Test3Dup',
                      Email='test3@duptest.com');
      dups = new Contact[] {dup1, dup2, dup3};
      try {
         insert dups;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 2);
         System.assert(e.getDmlIndex(0) == 1);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'Another new contact has the same email address.') > -1);
         System.assert(e.getDmlIndex(1) == 2);
         System.assert(e.getDmlFields(1).size() == 1);
         System.assert(e.getDmlFields(1)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(1).indexOf(
            'A contact with this email address already exists.') > -1);
      }      
      // Make sure that duplicates in the submission are caught when
      // updating contacts. Note that this test also catches an attempt
      // to update a contact where there is an existing duplicate.
      dup1 = new Contact(Id=contact1.Id, Email='test4@duptest.com');
      dup2 = new Contact(Id=contact2.Id, Email='test4@duptest.com');
      dup3 = new Contact(Id=contact3.Id, Email='test2@duptest.com');
      dups = new Contact[] {dup1, dup2, dup3};
      try {
         update dups;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 2);
         System.assert(e.getDmlIndex(0) == 1);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'Another new contact has the same email address.') > -1);
         System.assert(e.getDmlIndex(1) == 2);
         System.assert(e.getDmlFields(1).size() == 1);
         System.assert(e.getDmlFields(1)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(1).indexOf(
            'A contact with this email address already exists.') > -1);
      }
   }
}

Can someone help me with this error? Thanks!
Hi,

I have a trigger which displays the account owner's phone and meeting url in the account record. I'd like to apply this trigger only for specific account owners (users) but don't know where to include this criteria in the trigger below:

trigger OwnerDetailsToAccount on Account (before insert, before update) {
    
    Set<id> ownerIds = new Set<id>();
    if (Trigger.isInsert){
    for (Account a : Trigger.new){
        ownerIds.add(a.OwnerId);  
        }
        }
       
        if (Trigger.isUpdate){ 
    for (Account a : Trigger.new){
    for (Account b : Trigger.old){
   if(a.OwnerId != b.OwnerId){
        ownerIds.add(a.OwnerId);  
       }
        }
        }
        }

    Map<id, User> owners = new Map<id, User>([Select FirstName, LastName, Email, Phone, Title, Time_Trade_Client_Meeting_URL__c from User Where Id in :ownerIds]); 

    for (Account a : Trigger.new)
    {
    if(owners.size()>0){
    if(a.OwnerId == owners.get(a.OwnerId).Id)
    {
        a.Owner_Email__c = owners.get(a.OwnerId).Email;
        a.Owner_First_Name__c = owners.get(a.OwnerId).Firstname;
        a.Owner_Last_Name__c = owners.get(a.OwnerId).Lastname;
        a.Owner_Phone__c = owners.get(a.OwnerId).Phone;
        a.Owner_Title__c = owners.get(a.OwnerId).Title;
        a.Owner_Time_Trade_Client_Meeting_URL__c = owners.get(a.OwnerId).Time_Trade_Client_Meeting_URL__c;
  }   
  } 
}
}

I'd like to specify 3 users in this trigger. Can someone help me how to do this?
Thanks!
 I have a scheduled daily task in Informatica which queries data from Salesforce to SQL. This task has been working fine but has been failing in the past few days. There were no changes made on this task recently. Below is a screenshot from the activity log with the error message:

User-added image

I've read a few discussions about this error and most of them would say that it is Salesforce-related. Any ideas on how to get rid of this error?
I'm trying to create a trigger which updates the custom Contact__c lookup field on the Opportunity record. It uses the Contact record associated with the related Account record and selects the Contact record marked as isPrimary firsthen selects the Contact record with the earliest Created Date.

The trigger works on a custom object but when I do this in Opp, I get this error:

Error: Compile Error: Incompatible element type SOBJECT:Account for collection of Id at line 14 column 13



trigger updateOppContact on Opportunity (before insert, before update) {


//This Trigger updates the direct contact link/ Contact__c lookup field on the Opportunity record
//It uses the Contact record associated with the related Account record
//Selects the Contact record marked as isPrimary first
//Then selects the Contact record with the earliest Created Date


    List <Id> AccountIds = new List <Id> ();
   
    for (Integer i = 0; i < Trigger.new.size(); i++) {
         {
            AccountIds.add(Trigger.new[i].Account);       // Add AccountIds to List
        }
    }
   
    //Select the Contact that has the same Account, choose the primary first, then the first created
   
    List <Contact> ContactList = new List <Contact> ([Select Id, AccountId, isPrimary__c from Contact where AccountId in :AccountIds ORDER BY isPrimary__c ASC, createdDate DESC]);
   
    for(Contact con : ContactList) {
   
        for (Integer i = 0; i < Trigger.new.size(); i++) {
            if (con.AccountId  == Trigger.new[i].Account) {
                Trigger.new[i].Contact__c = con.Id;
            }
        } 
         
    }
   

}

I have written a trigger to update the "Email Opt Out" and "Do Not Call" Contact fields when the "Lead Status" in Accounts is equal to "Dead". Here is the code:

 

trigger updateContactfields on Account (before update) {
for (Account accts: Trigger.new)
{
if (accts.Lead_Status__c == 'Dead'){
List<Contact> con = new List<Contact>();
con = [SELECT Id FROM Contact WHERE AccountId = :accts.ID];
for(Contact c: con)
{c.DoNotCall = True;
c.HasOptedOutOfEmail = True;}
update con;
}
}
}

 

In addition, I would also like to update a custom object, which is a detail object of the Account. I've tried adding this on my trigger but I get an error saying that "No such column 'AccountID' on entity 'Master_c'. Can you help me on this? Here's the code I'm trying to add:

 

 List<Master_c> con = new List<Master_c>();
        mt = [SELECT Id FROM Master_c WHERE AccountId = :accts.ID];
        for(Master_c m: mt)
        m.Shut_Off_c = True;
        update mt;

Hi,

 

Can someone share to me a code that I can use to create a custom Notes and Attachments related list? I actually just need to remove the Action column so that users cannot edit or delete a note.

 

Thanks

  • September 12, 2013
  • Like
  • 0
Hi,

I have a trigger which prevents duplicate contacts being entered into Salesforce. When creating the test class, I'm getting this error:
"Initial term of field expression must be a concrete SObject: LIST<Contact>" on this line:
  User-added image

Below is the test class:

@isTest
public class TestContactDupeCatcher {
    static testMethod void testContactDupeCatcher() {    
      // First make sure there are no contacts already in the system
      // that have the email addresses used for testing
      Set<String> testEmailAddress = new Set<String>();
      testEmailAddress.add('test1@duptest.com');
      testEmailAddress.add('test2@duptest.com');
      testEmailAddress.add('test3@duptest.com');
      testEmailAddress.add('test4@duptest.com');
      testEmailAddress.add('test5@duptest.com');
      System.assert([SELECT count() FROM Contact
                     WHERE Email IN :testEmailAddress] == 0);
      // Seed the database with some contact, and make sure they can
      // be bulk inserted successfully.
      Contact contact1 = new Contact(LastName='Test1',
                            Email='test1@duptest.com');
      Contact contact2 = new Contact(LastName='Test2',
                            Email='test4@duptest.com');
      Contact contact3 = new Contact(LastName='Test3',
                            Email='test5@duptest.com');
      Contact[] contact = new Contact[] {contact1, contact2, contact3};
      insert contact;     
      // Now make sure that some of these contacts can be changed and
      // then bulk updated successfully. Note that contact1 is not
      // being changed, but is still being passed to the update
      // call. This should be OK.
      contact2.Email = 'test2@duptest.com';
      contact3.Email = 'test3@duptest.com';
      update contact;
      // Make sure that single row contact duplication prevention works
      // on insert.
      Contact dup1 = new Contact(LastName='Test1Dup',
                           Email='test1@duptest.com');
      try {
         insert dup1;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 1);
         System.assert(e.getDmlIndex(0) == 0);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
      }
      // Make sure that single row lead duplication prevention works
      // on update.
      dup1 = new Contact(Id = contact1.Id, LastName='Test1Dup',
                      Email='test2@duptest.com');
      try {
         update dup1;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 1);
         System.assert(e.getDmlIndex(0) == 0);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
        }
      // Make sure that bulk contact duplication prevention works on
      // insert. Note that the first item being inserted is fine,
      // but the second and third items are duplicates. Note also
      // that since at least one record insert fails, the entire
      // transaction will be rolled back.
      dup1 = new Contact(LastName='Test1Dup',
                      Email='test4@duptest.com');
      Contact dup2 = new Contact(LastName='Test2Dup',
                           Email='test2@duptest.com');
      Contact dup3 = new Contact(LastName='Test3Dup',
                           Email='test3@duptest.com');
      Contact[] dups = new Contact[] {dup1, dup2, dup3};
      try {
         insert dups;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 2);
         System.assert(e.getDmlIndex(0) == 1);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
         System.assert(e.getDmlIndex(1) == 2);
         System.assert(e.getDmlFields(1).size() == 1);
         System.assert(e.getDmlFields(1)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(1).indexOf(
            'A contact with this email address already exists.') > -1);
      }
      // Make sure that bulk contact duplication prevention works on
      // update. Note that the first item being updated is fine,
      // because the email address is new, and the second item is
      // also fine, but in this case it's because the email
      // address doesn't change. The third case is flagged as an
      // error because it is a duplicate of the email address of the
      // first contact's value in the database, even though that value
      // is changing in this same update call. It would be an
      // interesting exercise to rewrite the trigger to allow this
      // case. Note also that since at least one record update
      // fails, the entire transaction will be rolled back.
      dup1 = new Contact(Id=contact1.Id, Email='test4@duptest.com');
      dup2 = new Contact(Id=contact2.Id, Email='test2@duptest.com');
      dup3 = new Contact(Id=contact.Id, Email='test1@duptest.com');
      dups = new Contact[] {dup1, dup2, dup3};
      try {
         update dups;
         System.assert(false);
      } catch (DmlException e) {
         System.debug(e.getNumDml());
         System.debug(e.getDmlMessage(0));
         System.assert(e.getNumDml() == 1);
         System.assert(e.getDmlIndex(0) == 2);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'A contact with this email address already exists.') > -1);
        }
      // Make sure that duplicates in the submission are caught when
      // inserting contacts. Note that this test also catches an
      // attempt to insert a contact where there is an existing
      // duplicate.
      dup1 = new Contact(LastName='Test1Dup',
                      Email='test4@duptest.com');
      dup2 = new Contact(LastName='Test2Dup',
                      Email='test4@duptest.com');
      dup3 = new Contact(LastName='Test3Dup',
                      Email='test3@duptest.com');
      dups = new Contact[] {dup1, dup2, dup3};
      try {
         insert dups;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 2);
         System.assert(e.getDmlIndex(0) == 1);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'Another new contact has the same email address.') > -1);
         System.assert(e.getDmlIndex(1) == 2);
         System.assert(e.getDmlFields(1).size() == 1);
         System.assert(e.getDmlFields(1)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(1).indexOf(
            'A contact with this email address already exists.') > -1);
      }      
      // Make sure that duplicates in the submission are caught when
      // updating contacts. Note that this test also catches an attempt
      // to update a contact where there is an existing duplicate.
      dup1 = new Contact(Id=contact1.Id, Email='test4@duptest.com');
      dup2 = new Contact(Id=contact2.Id, Email='test4@duptest.com');
      dup3 = new Contact(Id=contact3.Id, Email='test2@duptest.com');
      dups = new Contact[] {dup1, dup2, dup3};
      try {
         update dups;
         System.assert(false);
      } catch (DmlException e) {
         System.assert(e.getNumDml() == 2);
         System.assert(e.getDmlIndex(0) == 1);
         System.assert(e.getDmlFields(0).size() == 1);
         System.assert(e.getDmlFields(0)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(0).indexOf(
            'Another new contact has the same email address.') > -1);
         System.assert(e.getDmlIndex(1) == 2);
         System.assert(e.getDmlFields(1).size() == 1);
         System.assert(e.getDmlFields(1)[0].getDescribe().getName() == 'Email');
         System.assert(e.getDmlMessage(1).indexOf(
            'A contact with this email address already exists.') > -1);
      }
   }
}

Can someone help me with this error? Thanks!
Hi,

I'm trying to create a trigger which updates the Account owner based on the detail object criteria. The account assignment should be in a round robin fashion so that accounts will be distributed equally.

However, I get this error upon editing the detail object:

System.NullPointerException: Script-thrown exception

Below is my code:

trigger AssignNewClient on Master_Tracker__c (before insert) {
    List<Id> AccountId = new list <id>();
    for(Master_Tracker__c mt: Trigger.new) 
    {
        if((mt.Product_Code__c == 'Advisory Services')
        &&(mt.Agreement_Signed_Date__c != null)
        &&(mt.Date_Payment_Info_Received__c != null)
        &&(mt.Renewal__c = false)){
        AccountId.add(mt.Account_Name__c);  
    }
        {
       
            Integer x = Integer.valueof(mt.Date_Payment_Info_Received__c);
            Integer y = math.mod(x, 5);
            Account a = new Account();
            if(y == 0)
            {
                //When Mod = O update the owner to User 1 ID 005d0000001mr2u
                //new org ID 005d0000001mr2u
                a.OwnerId = '005d0000001mr2u';
            }
           
           
            else if(y == 1)
            {
                //When Mod = 2 update the owner to User 2 ID 005d0000001nHMY  
                a.OwnerId = '005d0000001nHMY';
            }
           
            else if(y == 2)
            {
                //When Mod = 3 update the owner to User 3 ID 005d0000002KBv1
                a.OwnerId = '005d0000002KBv1';
            }  
           
            else if(y == 3)
            {
               //When Mod = 4 update the owner to User 4 ID 005d0000001mr1u
               a.OwnerId = '005d0000001mr1u';
            }
           
            else if(y == 4)
            {
               //When Mod = 5 update the owner to User 5 ID 005d0000002LDuq
               a.OwnerId = '005d0000002LDuq';
            }
        }
    }
}
Hi,

Can someone help me with this trigger? I'm getting this error upon saving it:

Error: Compile Error: Variable does not exist: AccountIds at line 9 column 13

Here's my trigger:

trigger updatePCFPMPRopp on Master_Tracker__c (after insert) {
    Master_Tracker__c mt = trigger.new[0];
   
        if(mt.Product_Code__c == 'PCFP' && (mt.GLAS_Offer_Status__c == 'Initiated' || mt.GLAS_Offer_Status__c == 'Offer in Review'))

        List<Id> AccountIds = new List<Id>();
        for (Integer i=0;i<Trigger.new.size();i++){
        {
            AccountIds.add(Trigger.new[i].Account_Name__c);
        }
        }
       
        List<Opportunity> OppList = new List<Opportunity>([SELECT Id,AccountId FROM Opportunity WHERE RecordTypeId = '012d0000000go7t' and Closed = false]);
            for (Opportunity opp: OppList){
            opp.StageName = 'Closed Won'; }
       
        update OppList;
}
Hi,

Is it possible to update a child record of all contacts when one of the contact child record is updated? We have a custom object associated to contacts and would like the same record to reflect on all contacts within the same account. For example, Account A has 2 contacts, Contact 1 and Contact 2. Each contact has a child record, namely Child Record 1.a and Child Record 2.a. When Child Record 1.a is updated, Child Record 2.a should also update. Both child records should have the same info.

Is this possible? How do I do this?

Thanks!
Hi,

The Primary checbox field on our Contacts is enabled to "Checked" by default. If we want to add more contacts under the same account, then this should no longer be checked if it already has a primary contact. How can this be done using a trigger?

Thanks
Hi,

I have an apex trigger on Account which updates an Account field based on another Account field. Upon testing, it only triggers when I attempt to meet the criteria the second time. On the first attempt, it doesn't fire. Here's my code:


trigger UpdateHHIncome on Account (before update) {
           
         Account acct = trigger.new[0];
   
    {    if(acct.HH_Income_ID__c == 1){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = 'Up to $8,925';
        } else if (acct.HH_Income_ID__c == 2){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$8,926 - $36,250';
        } else if (acct.HH_Income_ID__c == 3){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$36,251 - $87,850';
        } else if (acct.HH_Income_ID__c == 4){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$87,851 - $183,250';
        } else if (acct.HH_Income_ID__c == 5){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$183,251 - $398,350';
        } else if (acct.HH_Income_ID__c == 6){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$398,351 - $400,000';
        } else if (acct.HH_Income_ID__c == 7){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = '$400,001 or more';
        } else if (acct.HH_Income_ID__c == 8){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = 'Up to $17,850';
        } else if (acct.HH_Income_ID__c == 9) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$17,851 - $72,500';
        } else if (acct.HH_Income_ID__c == 10) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$72,501 - $146,400';
        } else if (acct.HH_Income_ID__c == 11) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$146,401 - $223,050';
        } else if (acct.HH_Income_ID__c == 12) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$223,051 - $398,350';
        } else if (acct.HH_Income_ID__c == 13) {
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$398,351 - $450,000';
        } else if (acct.HH_Income_ID__c == 14){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing jointly';     
           acct.Household_Income__c = '$450,001 or more';
        } else if (acct.HH_Income_ID__c == 15){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = 'Up to $8,925';
        } else if (acct.HH_Income_ID__c == 16){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$8,926- $36,250';
        } else if (acct.HH_Income_ID__c == 17){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$36,251 - $73,200';
        } else if (acct.HH_Income_ID__c == 18){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$73,201 - $111,525';
        } else if (acct.HH_Income_ID__c == 19){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$111,526 - $199,175';
        } else if (acct.HH_Income_ID__c == 20){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$199,176 - $225,000';
        } else if (acct.HH_Income_ID__c == 21){
           acct.Tax_Filing_Status_Peakfolio__c = 'Married filing separately';     
           acct.Household_Income__c = '$225,001 or more';
        } else if (acct.HH_Income_ID__c == 22){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = 'Up to $12,750';
        } else if (acct.HH_Income_ID__c == 23){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$12,751 - $48,600';
        } else if (acct.HH_Income_ID__c == 24){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$48,601 - $125,450';
        } else if (acct.HH_Income_ID__c == 25){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$125,451 - $203,150';
        } else if (acct.HH_Income_ID__c == 26){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$203,151 - $398,350';
        } else if (acct.HH_Income_ID__c == 27){
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$398,351 - $425,000';
        } else if (acct.HH_Income_ID__c == 28){ 
           acct.Tax_Filing_Status_Peakfolio__c = 'Head of household';     
           acct.Household_Income__c = '$425,001 or more';     
        } else{acct.Tax_Filing_Status_Peakfolio__c = null;
             acct.Household_Income__c = null;}
    }
}
Hi,

I would like to create a visualforce page to customize the standard Opportunity record type selection page based on the Account's record type. For example,
Account record type = A, the Opp record type selection should only show opp record types 1,2;
Account record type = B, the Opp record type selection should only show opp record types 3,4

Can someone provide a sample code for me to start with?
Hi,

Can someone provide me a sample code which updates the First Name of the primary contact when the custom First Name in the account is updated?

Thanks!
Hi,

I'm trying to create a trigger to update 2 picklist fields based on the value of a number field. However, I get the following error on line 5:

"Comparison arguments must be compatible types: String, Integer"

Here's my code:
________________________________________________________

trigger UpdateHHIncome on Account (before insert, before update) {

    Account acct = trigger.new[0];
    {
        if(acct.Household_Income__c == 1){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';     
           acct.Household_Income__c = 'Up to $8,925';}
        else if(acct.Household_Income__c == 2){
           acct.Tax_Filing_Status_Peakfolio__c = 'Single';
           acct.Household_Income__c = '$8,926 - $36,250';}
        else{acct.Tax_Filing_Status_Peakfolio__c = 'Single';
             acct.Household_Income__c = '$36,251 - $87,850';}
    }
}
I'm trying to create a trigger which updates the custom Contact__c lookup field on the Opportunity record. It uses the Contact record associated with the related Account record and selects the Contact record marked as isPrimary firsthen selects the Contact record with the earliest Created Date.

The trigger works on a custom object but when I do this in Opp, I get this error:

Error: Compile Error: Incompatible element type SOBJECT:Account for collection of Id at line 14 column 13



trigger updateOppContact on Opportunity (before insert, before update) {


//This Trigger updates the direct contact link/ Contact__c lookup field on the Opportunity record
//It uses the Contact record associated with the related Account record
//Selects the Contact record marked as isPrimary first
//Then selects the Contact record with the earliest Created Date


    List <Id> AccountIds = new List <Id> ();
   
    for (Integer i = 0; i < Trigger.new.size(); i++) {
         {
            AccountIds.add(Trigger.new[i].Account);       // Add AccountIds to List
        }
    }
   
    //Select the Contact that has the same Account, choose the primary first, then the first created
   
    List <Contact> ContactList = new List <Contact> ([Select Id, AccountId, isPrimary__c from Contact where AccountId in :AccountIds ORDER BY isPrimary__c ASC, createdDate DESC]);
   
    for(Contact con : ContactList) {
   
        for (Integer i = 0; i < Trigger.new.size(); i++) {
            if (con.AccountId  == Trigger.new[i].Account) {
                Trigger.new[i].Contact__c = con.Id;
            }
        } 
         
    }
   

}

I have written a trigger to update the "Email Opt Out" and "Do Not Call" Contact fields when the "Lead Status" in Accounts is equal to "Dead". Here is the code:

 

trigger updateContactfields on Account (before update) {
for (Account accts: Trigger.new)
{
if (accts.Lead_Status__c == 'Dead'){
List<Contact> con = new List<Contact>();
con = [SELECT Id FROM Contact WHERE AccountId = :accts.ID];
for(Contact c: con)
{c.DoNotCall = True;
c.HasOptedOutOfEmail = True;}
update con;
}
}
}

 

In addition, I would also like to update a custom object, which is a detail object of the Account. I've tried adding this on my trigger but I get an error saying that "No such column 'AccountID' on entity 'Master_c'. Can you help me on this? Here's the code I'm trying to add:

 

 List<Master_c> con = new List<Master_c>();
        mt = [SELECT Id FROM Master_c WHERE AccountId = :accts.ID];
        for(Master_c m: mt)
        m.Shut_Off_c = True;
        update mt;

Hi,

 

Can someone share to me a code that I can use to create a custom Notes and Attachments related list? I actually just need to remove the Action column so that users cannot edit or delete a note.

 

Thanks

  • September 12, 2013
  • Like
  • 0