Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  1. So that we don’t pull in multiple GRC records into two rows we Show this step's records in 2 column blocks

  2. Because we changed the structure of step 3, we will have to update the Calculated Step fields to refer to the correct “Step”

    1. Email Priority
      Gift Recognition Credit. bcecomes Gift Recognition Credit 1.

      Code Block
      languagejs
      {!Gift Recognition Credit 1.Contact Credited.Best Contact Email} ? {!Gift Recognition Credit 1.Contact Credited.Best Contact Email} : ({!Gift Recognition Credit 1.Donor Account.Email} ? {!Gift Recognition Credit 1.Donor Account.Email} : "")
    2. LC-S

      Code Block
      languagejs
      ({!Gift Recognition Credit 1.Gift Recognition Credit.Legal Credit %}== 100) && ((({!Account.Secondary Contact.Name}+{!Account.Secondary Contact.Best Contact Email})==({!Gift Recognition Credit 1.Contact Credited.Name}+{!Gift Recognition Credit 1.Contact Credited.Best Contact Email})) || ({!Account.Secondary Contact.Name}=={!Gift Recognition Credit 1.Contact Credited.Name})) ? "S" : ""
    3. LC-P

      Code Block
      languagejs
      ({!Gift Recognition Credit 1.Gift Recognition Credit.Legal Credit %}==100) && ((({!Account.Primary Contact.Name}+{!Account.Primary Contact.Best Contact Email})==({!Gift Recognition Credit 1.Contact Credited.Name}+{!Gift Recognition Credit 1.Contact Credited.Best Contact Email})) || ({!Account.Primary Contact.Name}=={!Gift Recognition Credit 1.Contact Credited.Name})) ? "P" : ""

    4. LC Both Same Last Name

    5. LC Both Different Last Name

    6. Salutation

      Code Block
      languagejs
      ({!Account.Account.Account Type} == "Household" && ({!Gift Recognition Credit 1.Gift Recognition Credit.Legal Credit %} == 100) ? {!Gift Recognition Credit 1.Contact Credited.Salutation}+" "+{!Gift Recognition Credit 1.Contact Credited.Last Name} : ({!Account.Account.Account Type} == "Household" && ({!Gift Recognition Credit 1.Gift Recognition Credit.Legal Credit %} < 100) && ({!Account.Primary Contact.Last Name}=={!Account.Secondary Contact.Last Name}) ?  ({!Account.Primary Contact.Salutation}+" and "+{!Account.Secondary Contact.Salutation}+" "+{!Account.Primary Contact.Last Name}) : ({!Account.Account.Account Type} == "Household" && ({!Gift Recognition Credit 1.Gift Recognition Credit.Legal Credit %} < 100) && ({!Account.Primary Contact.Last Name}!={!Account.Secondary Contact.Last Name}) ? ({!Account.Primary Contact.Salutation}+" "+{!Account.Primary Contact.Last Name}+" and "+{!Account.Secondary Contact.Salutation}+" "+{!Account.Primary Contact.Last Name}):"Sir/Madam")))
    7. Salutation - Java

      Code Block
      languagejs
      (function () {
          
      	// define all  merge fields to be used as variables for shorter reference
      	var accountType = {!Account.Account.Account Type};
          var grclc1 = {!Gift Recognition Credit 1.Gift Recognition Credit.Legal Credit %};
      	var grclc2 = {!Gift Recognition Credit 2.Gift Recognition Credit.Legal Credit %};
      	
      	var grc1Contact = {!Gift Recognition Credit 1.Gift Recognition Credit.Contact Credited} ? {!Gift Recognition Credit 1.Gift Recognition Credit.Contact Credited} : "";
      	var grc1ConactFN = {!Gift Recognition Credit 1.Contact Credited.First Name} ? {!Gift Recognition Credit 1.Contact Credited.First Name} : "";
      	var grc1ConactLN = {!Gift Recognition Credit 1.Contact Credited.Last Name} ? {!Gift Recognition Credit 1.Contact Credited.Last Name} : "";
      	var grc1ConactSal = {!Gift Recognition Credit 1.Contact Credited.Salutation} ? {!Gift Recognition Credit 1.Contact Credited.Salutation} : "";
      	
      	var grc2Contact = {!Gift Recognition Credit 2.Gift Recognition Credit.Contact Credited} ? {!Gift Recognition Credit 2.Gift Recognition Credit.Contact Credited} : "";
      	var grc2ConactFN = {!Gift Recognition Credit 2.Contact Credited.First Name} ? {!Gift Recognition Credit 2.Contact Credited.First Name} : "";
      	var grc2ConactLN = {!Gift Recognition Credit 2.Contact Credited.Last Name} ? {!Gift Recognition Credit 2.Contact Credited.Last Name} : "";
      	var grc2ConactSal = {!Gift Recognition Credit 2.Contact Credited.Salutation} ? {!Gift Recognition Credit 2.Contact Credited.Salutation} : "";
          
      		
          var PContact 	= {!Account.Account.Primary Contact} ? {!Account.Account.Primary Contact} : "";
      	var Psalutation = {!Account.Primary Contact.Salutation} ? {!Account.Primary Contact.Salutation} : "";
      	var PFirstName 	= {!Account.Primary Contact.First Name} ? {!Account.Primary Contact.First Name} : "";
      	var PLastName 	= {!Account.Primary Contact.Last Name} ? {!Account.Primary Contact.Last Name} : "";
      	
          var SContact 	= {!Account.Account.Secondary Contact} ? {!Account.Account.Secondary Contact} : "";
          var Ssalutation = {!Account.Secondary Contact.Salutation} ? {!Account.Secondary Contact.Salutation} : "";
      	var SLastName 	= {!Account.Secondary Contact.Last Name} ? {!Account.Secondary Contact.Last Name} : "";
          var SFirstName 	= {!Account.Secondary Contact.First Name} ? {!Account.Secondary Contact.First Name} : "";
      	
          
          var careof = {!Account.Account.Receipting Care of} ? {!Account.Account.Receipting Care of} : "";
          var method = 0;
      	
       	var PstandaloneSal = {!Contact Primary.Salutation Link.Standalone Salutation};
      	var SstandaloneSal = {!Contact Secondary.Salutation Link.Standalone Salutation};
      	
      	// if standalone salutation, don't print the names
      	if (PstandaloneSal) {
      		PLastName = "";
      		PFirstName = "";
      	}
      	
      	// if standalone salutation, don't print the names
      	if (SstandaloneSal) {
      		SLastName = "";
      		SFirstName = "";
      	} 
          
          if (grclc1 == 100) {
      		if (grc1Contact == PContact) {
      			// only one contact gets legal credit, we get the first GRC record and the credit contact of that GRC Record
      			PLastName = PLastName;
      			PFirstName = PFirstName;
      			Psalutation = Psalutation;
              }
      		if (grc1Contact == SContact) {
      			// only one contact gets legal credit, we get the first GRC record and the credit contact of that GRC Record
      			PLastName = SLastName;
      			PFirstName = SFirstName;
      			Psalutation = Ssalutation;
              }
      		
       		// if standalone salutation, don't print the names
      		if (PstandaloneSal) {
      			PLastName = "";
      			PFirstName = "";
      		} 
       
      		// second contact is blank
      		Ssalutation = "";
      		SLastName = "";
              SFirstName = "";
          }
      	
          if (grclc2 == 100) {
      		if (grc2Contact == PContact) {
      			// only one contact gets legal credit, we get the first GRC record and the credit contact of that GRC Record
      			PLastName = PLastName;
      			PFirstName = PFirstName;
      			Psalutation = Psalutation;
              }
      		if (grc2Contact == SContact) {
      			// only one contact gets legal credit, we get the first GRC record and the credit contact of that GRC Record
      			PLastName = SLastName;
      			PFirstName = SFirstName;
      			Psalutation = Ssalutation;
              }
      		
       		// if standalone salutation, don't print the names
      		if (PstandaloneSal) {
      			PLastName = "";
      			PFirstName = "";
      		}
       
      		// second contact is blank
      		Ssalutation = "";
              SLastName = "";
              SFirstName = "";
          }
      
          
          // if no salutation to either of the two contacts, set the Method : use first name or Supporter
      	if ((PLastName != "" && Psalutation == "") || (SLastName != "" && Ssalutation == "")){
              if (PFirstName != "" && PFirstName.length > 1 && SFirstName == ""){ // one contact, first name is not one character, 
                  method = 1; // use first name
              } else if (PFirstName != "" && PFirstName.length > 1 && SFirstName != "" && SFirstName.length > 1){ // two contacts, first name is not one character
                  method = 1; // use first name for both contacts
              } else {
                  method = 2; // no salutation and no first name, use Dear Supporter
              }
          }
          
      	
      	// Household and two contact same surname - Dear Mr Ryan and Mrs Francesca Bryant
          if ((accountType == 'Household') && (grclc1 < 100 && grclc1 > 0) && (PLastName == SLastName)) {
                  switch(method){    
                      case 1: // Dear Ryan and Francesca Bryant
                          return (PFirstName + " " + "and" + " " + SFirstName + " " + SLastName);
                          break;
                      case 2: // Dear Supporter
                          return ("Supporter");
                          break;
                      default: // Dear Mr and Mrs Bryant or Dear Chancellor and Mrs Bryant
                          return (Psalutation + " " + "and" + " " + Ssalutation + " " + SLastName);
                      
                  }
                  
          // Household and two contact different surname - Dear Mr Ryan Bryant and Mrs Francesca Parkes
          } else if ((accountType == 'Household') && (grclc1 < 100 && grclc1 > 0) &&  (PLastName != SLastName)) {
                      switch(method){
                          case 1: // Dear Ryan and Francesca
                              return (PFirstName + " " + "and" + " " + SFirstName);
                              break;
                          case 2: // Dear Supporter
                              return ("Supporter");
                              break;
                          default: // Dear Mr Bryant and Mrs Parkes or Dear Chancellor and Mrs Parkes
                              return (Psalutation + " " + PLastName + " " + "and" + " " + Ssalutation + " " + SLastName);
                      }
      				
      			// Not Household with careof
                  } else if ((accountType != 'Household') && (careof)){
                          return ({!Account.Account.Receipting Care of});                        
                      } else if ((accountType != 'Household')){
                                  return ("Sir/ Madam");
                      } else if ((grclc1 == 100 || grclc2 == 100)){ // Household and only one LC
                    
                              switch(method){    
                                  case 1: // Dear Ryan
                                      return (PFirstName);
                                      break;
                                  case 2: // Dear Supporter
                                      return ("Supporter");
                                      break;
                                  default: // Dear Mr Bryant or Dear Chancellor
                                      return (Psalutation + " " + PLastName);
                              }                        
                      } else {
                          return "";
                      }
      })()
    8. To support standalone salutation

      Jira Legacy
      serverSystem JIRA
      serverIde9de0c6d-9ef6-3ada-b4ce-7168c44d7e8a
      keyTAPSS-913

    9. on Step 1 added the following fields

      Image Added