• Thomas Shelby 26
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 17
    Replies
HI,
I'm getting this error like
System.QueryException: only aggregate expressions use field aliasing


public static list<Property__c> getFilteredProperty(string Location,string BedRoom,string BathRoom,string MaxBudget)
  {
  list<Property__c> allPropertyLists = new list<Property__c>();
  string PropertyQuery = 'SELECT Id,Additional_Rooms__c,Available_From__c,Carpet_area_sqft__c,Covered_Area_sqft__c ';
     PropertyQuery = PropertyQuery+ 'Electricity_Status__c,Facing__c,Floor__c,For_Bachelor__c,For_Family__c,Furnishing_Available__c,Furnish_Type__c,Geo_Map__c,Landmark__c,Location__c,Area__c,Status__c,State__c,country__c,Maintainance_Charge__c,No_of_Balcony__c,No_of_Bathroom__c,No_of_Bedroom__c,Property_Description__c,Property_Main_Image__c,Property_Owner__c,Property_Video_URL__c,Name,Rent__c,Security_Deposit__c,Verified__c,Water_Availability__c ';
     PropertyQuery = PropertyQuery+' FROM Property__c ';
  string WhereClause= 'WHERE Rent__c != NULL';
      system.debug('*****Location'+Location);
      if(string.isNotBlank(Location))
      {
          if(Location !='ALL')
          {
              WhereClause=WhereClause+ ' AND Area__c =:Location ';
          }
      }
      system.debug('*****BedRoom'+BedRoom);
      integer BedRoomCount;
      if(string.isNotBlank(BedRoom))
      {
          if(BedRoom !='ALL')
          {
              BedRoomCount=integer.valueOf(BedRoom);
              WhereClause=WhereClause+ ' AND No_of_Bedroom__c=:BedRoom ' ;
          }
      }
       system.debug('*****BathRoom'+BathRoom);
      integer BathRoomCount;
      if(string.isNotBlank(BathRoom))
      {
          if(BathRoom !='ALL')
          {
              BathRoomCount=integer.valueOf(BathRoom);
              WhereClause=WhereClause+ ' AND No_of_Bathroom__c=:BathRoom ' ;
          }
      }
      system.debug('*****MaxBudget'+MaxBudget);
      double MaxBudgetValue;
      if(string.isNotBlank(MaxBudget))
      {
              MaxBudgetValue=double.valueOf(MaxBudget);
              WhereClause=WhereClause+ ' AND Rent__c <=:MaxBudget ' ;
      }
      PropertyQuery=PropertyQuery+' '+WhereClause;
      system.debug('PropertyQuery' +PropertyQuery);
      allPropertyLists = Database.query(PropertyQuery);
       system.debug('PropertyQuery' +allPropertyLists);     
      return allPropertyLists;
   }public static list<Property__c> getFilteredProperty(string Location,string BedRoom,string BathRoom,string MaxBudget)
  {
  list<Property__c> allPropertyLists = new list<Property__c>();
  string PropertyQuery = 'SELECT Id,Additional_Rooms__c,Available_From__c,Carpet_area_sqft__c,Covered_Area_sqft__c ';
     PropertyQuery = PropertyQuery+ 'Electricity_Status__c,Facing__c,Floor__c,For_Bachelor__c,For_Family__c,Furnishing_Available__c,Furnish_Type__c,Geo_Map__c,Landmark__c,Location__c,Area__c,Status__c,State__c,country__c,Maintainance_Charge__c,No_of_Balcony__c,No_of_Bathroom__c,No_of_Bedroom__c,Property_Description__c,Property_Main_Image__c,Property_Owner__c,Property_Video_URL__c,Name,Rent__c,Security_Deposit__c,Verified__c,Water_Availability__c ';
     PropertyQuery = PropertyQuery+' FROM Property__c ';
  string WhereClause= 'WHERE Rent__c != NULL';
      system.debug('*****Location'+Location);
      if(string.isNotBlank(Location))
      {
          if(Location !='ALL')
          {
              WhereClause=WhereClause+ ' AND Area__c =:Location ';
          }
      }
      system.debug('*****BedRoom'+BedRoom);
      integer BedRoomCount;
      if(string.isNotBlank(BedRoom))
      {
          if(BedRoom !='ALL')
          {
              BedRoomCount=integer.valueOf(BedRoom);
              WhereClause=WhereClause+ ' AND No_of_Bedroom__c=:BedRoom ' ;
          }
      }
       system.debug('*****BathRoom'+BathRoom);
      integer BathRoomCount;
      if(string.isNotBlank(BathRoom))
      {
          if(BathRoom !='ALL')
          {
              BathRoomCount=integer.valueOf(BathRoom);
              WhereClause=WhereClause+ ' AND No_of_Bathroom__c=:BathRoom ' ;
          }
      }
      system.debug('*****MaxBudget'+MaxBudget);
      double MaxBudgetValue;
      if(string.isNotBlank(MaxBudget))
      {
              MaxBudgetValue=double.valueOf(MaxBudget);
              WhereClause=WhereClause+ ' AND Rent__c <=:MaxBudget ' ;
      }
      PropertyQuery=PropertyQuery+' '+WhereClause;
      system.debug('PropertyQuery' +PropertyQuery);
      allPropertyLists = Database.query(PropertyQuery);
       system.debug('PropertyQuery' +allPropertyLists);     
      return allPropertyLists;
   }
This is on challenge 3.  The Register Node Name is "Create Seed Bank Agencies", the alias is "create_seed_bank_agencies", the Name is "Seed Bank Agencies".  I read the Pre-work and understand the alias should be with underscores and lower case.  I have tried a few combinations but I get this error:

Challenge Not yet complete... here's what's wrong: 
Couldn’t find 'Create Seed Bank Agencies' node. Please check the name and alias spelling.
Here is my trigger. I am not sure how to reference 3 different lead sources for the Lead to sutomatically convert. 

I need only the Leads whose lead source = Academy Regisatration, User Registration or  Organization Registration. 

Any help is appreciated!




I now got it to work. But how do I add more than one lead source? I only want it to run when the lead source is Academy Registration, User Registration or Organization Registration. 

trigger LeadConvert on Lead (after insert,after update) {
//Bulkified
List<String> LeadNames = new List<String>{};
for(Lead myLead: Trigger.new){
 if((myLead.isconverted==false) && (myLead.LeadSource = 'Academy Registration')) {
Database.LeadConvert lc = new database.LeadConvert();
        lc.setLeadId(myLead.Id);
        lc.convertedStatus = 'Qualified';
        //Database.ConvertLead(lc,true);
        lc.setDoNotCreateOpportunity(true);
        Database.LeadConvertResult lcr = Database.convertLead(lc);
        System.assert(lcr.isSuccess());
        }
        }
}
Hi,
We have a requirement to count the number of active entitlements under an account.
An entitlement is considered as acitve if "Status = Active AND  EndDate >= Today() and Support level (Text formula field) = 'GOLD or SILVER or PLATINUM' "

we have tried with the below ...
1: Created a rollup summary field on 'Account' to count the active entitlements which meet above criteria , but the problem here is we cannot filter the entitlements using the field status and support level since formula using product object

2:  > Created a custom checkbox field 'isActiveEntitlement' on entitlement object so that we can create a rollup summary field on account to count entitlements with isActiveEntitlement = true
> Created a trigger to set if entitlement is active or not. below is Sample code of trigger

if(Status = Active && EndDate >= Today() AND (Support level = GOLD / SILVER / PLATINUM))
{
      isActiveEntitlement = True;
}
else
{
     isActiveEntitlement = False;
}
Update Entitlement records;

The problem here is if I edit and change the endDate of entitlement manually, the status becomes expired and the trigger is firing and everything is working good but if the date is expired automatically then state is setting to expired but trigger is not firing, isActiveEntitlement is not setting to false hence count is not getting updated on account

3: Created a process builder with same logic as above trigger , this also works good if the entitlement is edited manually and not for automated / backend process.
Please help me to fix the issue or suggest any other ways to count active entitlements.

Thanks,
Anupama




 
I am not able to cover the below lines in test class. please help.
Contact con = new contact();
          con.id= rel.From_Individual__c;
          con.firstname= rel.From_Individual__r.firstname;
          con.lastname= rel.From_Individual__r.lastname;
          con.email= rel.From_Individual__r.email;
          conListForAdvisor.add(con);
        }
        if(conListForAdvisor.size()>0){
          update relationListForAdvisor;
          update conListForAdvisor;
        }
        for(Event ev : newEvents){
            System.debug(ev);
          if(ev.eventName != null && ev.eventName != ''){
            cEvent = new Event__c();

            String parishRegion = getCRSRegion(University);
            cEvent.Name = ev.eventName;
            cEvent.Status__c = 'Completed';
            cEvent.Description__c = ev.eventDescription;
            if(ev.eventCheckAllThatApply != null) {
              cEvent.Check_all_that_apply_to_your_campus__c = 
              String.valueOf(ev.eventCheckAllThatApply).remove('(').remove(')').replace(',',';');
            }
            if(ev.eventNuberAttended != null && ev.eventNuberAttended != ''){
              cEvent.Number_Attended__c = Decimal.ValueOf(ev.eventNuberAttended);
            }
            if(ev.eventLetters != null && ev.eventLetters != ''){
              cEvent.If_you_hand_wrote_letters_please_list__c = Decimal.ValueOf(ev.eventLetters);
              /*if(Decimal.ValueOf(ev.eventLetters) > 0 ){
                cEvent.Action__c = 'EN - Directing a LETTER WRITING campaign';
              }*/
            }
            
            String evSelectedOptions = '';
            for(String s: ev.eventCheckAllThatApply) {
              evSelectedOptions += s + ' ';
            }
            //evSelectedOptions.addAll(ev.eventCheckAllThatApply);
            System.debug('>>>evSelectedOptions: ' + evSelectedOptions);

            if(evSelectedOptions.contains('Chapter meetings')) {
              cEvent.Action__c = 'ED - Coordinating a MEETING';
            }
            else if(evSelectedOptions.contains('Legislative Visit')) {
              cEvent.Action__c = 'EN - Facilitating a CONGRESSIONAL VISIT';
            }
            else {
              cEvent.Action__c = 'ED - Providing general OUTREACH';
            } 
            
            cEvent.Category__c = catagory;
            String campaignName = ''; // hold the program initiative to attach the event to
            cEvent.Parish_or_School__c = University;
            cEvent.Primary_Institution__c = University;
            

            cEvent.CRS_Region__c = 'Replicator; ' + parishRegion;
            if(ev.eventDate != null && ev.eventDate !=''){
              cEvent.Start_Date__c = date.ValueOf(ev.eventDate);
              cEvent.End_Date__c = date.ValueOf(ev.eventDate);
              cEvent.Event_Date_Time__c = cEvent.End_Date__c;
            }
            cEvent.Association_if_other__c = ''; // reset after the field has been used.            
            lstEvents.add(cEvent);
          }

        }
        if(lstEvents.size() > 0){

          insert lstEvents;
          for(Event__c events : lstEvents){
            eventIds.add(events.Id);
          }
          eventId = lstEvents[0].Id;
        }
if flag changed from Red to Yellow/ from Yellow to Green/ from Red to Green, progress is 'better'
if flag changed from Yello to Red/ from Green to Yellow / from Green to Red, progress is 'worst'
if no change from last week, progress is 'no change'

Thanks
As of a couple of days ago we started getting this error and not sure where to go to get it fixed. Hope someone can help
 


Description:   A trigger that will generate the Property records when Lead is converted
Test Class:    TestTriggerGenerateNewProperty


trigger TriggerGenerateNewProperty on Lead (after update) {
    Map<String,Account> AccountMap= new map<String,Account>([Select name,Id, OwnerId from account]);    
    System.debug('@AccountMap'+AccountMap);   
    Property_Contacts__c propertyContact = new Property_Contacts__c();
    Property_Contacts__c propertyContactToUpdate = new Property_Contacts__c();
    List<Property_Contacts__c> propertyContactList = new List<Property_Contacts__c>();
    List<Property_Contacts__c> propertyContactListToUpdate = new List<Property_Contacts__c>();
    List<Property_Contacts__c> propertyContactListExistToUpdate = new List<Property_Contacts__c>();
    List<Property__c> PropertyList = new List<Property__c>();   
    Set<Id> leadId =new Set<Id>();
    Set<String> OppId = new Set<String>();
    Set<String> PropertyId = new Set<String>();
    Set<String> AccountId = new Set<String>();
    Map<Integer,Id> AccountExistmap = new Map<Integer,Id>();  
    List<String> LeadName = new List<String>();
    List<String> unitNumber = new List<String>();
    List<String> streetNumer = new List<String>();
    List<String> streetName = new List<String>();
    List<String> suburb = new List<String>(); 
    
    for(Lead lead: trigger.new){ 
    
        if(Lead.IsConverted){
            Integer i=0;
            Property__c property=new Property__c();
            if(lead.Property_Unit_Number__c!=null){
                property.Unit_Number__c = lead.Property_Unit_Number__c;
            }
            if(lead.Property_Street_Number__c!=null){
                property.Street_Number__c = lead.Property_Street_Number__c;
            }
            if(lead.Property_Street_Name__c!=null){
                property.Street_Name__c = lead.Property_Street_Name__c;
            }
            if(lead.Property_Suburb__c!=null){
                property.Suburb__c = lead.Property_Suburb__c;
            }
            if(lead.Property_Postcode__c!=null){
                property.Postcode__c = lead.Property_Postcode__c;   
            }   
            system.debug('@ AccountMap.get(lead.ConvertedAccountId).OwnerId'+ AccountMap.get(lead.ConvertedAccountId).OwnerId);     
            if(AccountMap.get(lead.ConvertedAccountId).OwnerId!=null){
                property.OwnerId = AccountMap.get(lead.ConvertedAccountId).OwnerId;
            }   
            
            if(lead.Property_Street_Type__c!=null){
                property.Street_Type__c = lead.Property_Street_Type__c;
            }   
            if(lead.Property_State__c!=null){
                property.State__c = lead.Property_State__c;
            }
            
            if(lead.Current_Agent__c!=null){
                property.Current_Agent__c = lead.Current_Agent__c;
            }
            if(lead.Rental_Amount__c!=null){
                property.Rental_Amount__c = lead.Rental_Amount__c;
            }
            
            if(lead.Property_Type__c!=null){
                property.Property_Type__c = lead.Property_Type__c;
            }   
            
            if(lead.Date_Last_Advertised__c!=null || lead.Date_Last_Advertised__c!=''){
                property.Date_Last_Advertised__c = lead.Date_Last_Advertised__c;
            }
            //REXP-35
            if(lead.Description != null || lead.Description != ''){
              property.Description__c = lead.Description;
            }
            if(lead.How_did_you_hear_about_Rental_Express__c != null || lead.How_did_you_hear_about_Rental_Express__c != ''){
              property.How_did_you_hear_about_Rental_Express__c = lead.How_did_you_hear_about_Rental_Express__c;
            }
            if(lead.I_would_like_to_rent_the_property__c != null || lead.I_would_like_to_rent_the_property__c != ''){
              property.I_would_like_to_rent_the_property__c = lead.I_would_like_to_rent_the_property__c;
            }
            if(lead.Property_Condition__c != null || lead.Property_Condition__c != ''){
              property.Property_Condition__c = lead.Property_Condition__c;
            }
            if(lead.Property_Furnishings__c != null || lead.Property_Furnishings__c != ''){
              property.Property_Furnishings__c = lead.Property_Furnishings__c;
            }
            if(lead.Pool__c != null || lead.Pool__c != ''){
              property.Pool__c = lead.Pool__c;
            }
            if(lead.Air_Conditioned__c != null || lead.Air_Conditioned__c != ''){
              property.Air_Conditioned__c = lead.Air_Conditioned__c;
            }
            if(lead.Car_Accomodation__c != null || lead.Car_Accomodation__c != ''){
              property.Car_Accomodation__c = lead.Car_Accomodation__c;
            }
            if(lead.Outdoor_Living_Areas__c != null || lead.Outdoor_Living_Areas__c != ''){
              property.Outdoor_Living_Areas__c = lead.Outdoor_Living_Areas__c;
            }
            if(lead.Living_Areas__c != null || lead.Living_Areas__c != ''){
              property.Living_Areas__c = lead.Living_Areas__c;
            }
            if(lead.Number_of_Bathrooms__c != null || lead.Number_of_Bathrooms__c != ''){
              property.Number_of_Bathrooms__c = lead.Number_of_Bathrooms__c;
            }
            if(lead.Number_of_Bedrooms__c != null || lead.Number_of_Bedrooms__c != ''){
              property.Number_of_Bedrooms__c = lead.Number_of_Bedrooms__c;
            }
            if(lead.Construction_Type__c != null || lead.Construction_Type__c != ''){
              property.Construction_Type__c = lead.Construction_Type__c;
            }
            if(lead.Age_of_Property__c != null || lead.Age_of_Property__c != ''){
              property.Age_of_Property__c = lead.Age_of_Property__c;
            }
            if(lead.Property_Status__c != null || lead.Property_Status__c != ''){
              property.Property_Status__c = lead.Property_Status__c;
            }
            AccountExistmap.put(i,lead.ConvertedAccountId); 
            
            OppId.add(lead.ConvertedOpportunityId);     
            leadId.add(lead.id);
            LeadName.add(lead.name);
            unitNumber.add(lead.Property_Unit_Number__c);   
            streetNumer.add(lead.Property_Street_Number__c);
            streetName.add(lead.Property_Street_Name__c);
            suburb.add(lead.Property_Suburb__c);
            if(lead.Property_Street_Number__c!=null && lead.Property_Street_Name__c!=null && lead.Property_Suburb__c!=null && lead.Property_Postcode__c!=null && lead.Property_State__c!=null){            
                PropertyList.add(property);
            }     
            
            propertyContact.Contact__c = lead.ConvertedAccountId;
            propertyContactList.add(propertyContact);
            
        }   
    }
    
    
    
    List<Property__c> propsExist = new List<Property__c>();
                    
    for(Property__c prop: [Select Id,Unit_Number__c, Street_Number__c, Street_Name__c, Suburb__c from Property__c where Unit_Number__c in:unitNumber and  // Check if Property exist
                        Street_Number__c in:streetNumer and Street_Name__c in:streetName and Suburb__c in:suburb]){
                        
        Integer loopCounter = 0;                    
        prop.Unit_Number__c=unitNumber[loopCounter];    
        prop.Street_Number__c=streetNumer[loopCounter];
        prop.Street_Name__c=streetName[loopCounter];
        prop.Suburb__c = suburb[loopCounter];   
        prop.Postcode__c = PropertyList[loopCounter].Postcode__c;
        prop.Street_Type__c = PropertyList[loopCounter].Street_Type__c;
        prop.State__c = PropertyList[loopCounter].State__c;
        prop.Current_Agent__c = PropertyList[loopCounter].Current_Agent__c;
        prop.Rental_Amount__c = PropertyList[loopCounter].Rental_Amount__c;
        prop.Property_Type__c = PropertyList[loopCounter].Property_Type__c;
        prop.Date_Last_Advertised__c = PropertyList[loopCounter].Date_Last_Advertised__c;
        PropertyId.add(prop.Id);            
        propsExist.add(prop);
    }
    System.debug('@propsExist'+propsExist);
    if(propsExist.size()>0){
        update propsExist;
        
        Property_Contacts__c propcontactNew = new Property_Contacts__c();
        for(Property_Contacts__c propcontact: [Select Id,Property__c, Contact__c from Property_Contacts__c where Property__c in: PropertyId limit 1]){ 
            Integer counter =0;           
            propertyContactListExistToUpdate.add(propcontact);
            counter++;
        }
        system.debug('@propertyContactListExistToUpdate'+propertyContactListExistToUpdate);
        if(propertyContactListExistToUpdate.size()>0){
            update propertyContactListExistToUpdate;
        }
    }
    else{
        if(PropertyList.size()>0){
            insert PropertyList;
            System.debug('@PropertyList'+PropertyList);
            
            for(Property__c p: PropertyList){
                Integer counter = 0;
                propertyContactToUpdate.Property__c = p.Id;         
                propertyContactToUpdate.Contact__c = propertyContactList[counter].Contact__c; 
                propertyContactListToUpdate.add(propertyContactToUpdate);
                    
                counter++;
            }
            
            if(propertyContactListToUpdate.size()>0){
                insert propertyContactListToUpdate;
            }
        }
        
    }
    
    List<Opportunity> OpportunityToUpdate = new List<Opportunity>();
    for(Opportunity op: [Select Id,property__c from Opportunity where Id in:OppId limit 1]){
        Integer counter = 0;
        if( PropertyList[counter].Id!=null){
            op.Property__c = PropertyList[counter].Id;
        }
        else{
            op.Property__c = propertyContactListExistToUpdate[counter].Property__c;
        }   
            
        OpportunityToUpdate.add(op);
        counter++;
    }
    System.debug('@OpportunityToUpdate'+OpportunityToUpdate);
    if(OpportunityToUpdate.size()>0){
        update OpportunityToUpdate;
    }
    
}

 
As a certified Salesforce consulting partner, PDO, and ISV, ForceBrain.com builds cloud & mobile apps. We've been a salesforce partner for over 6 years and you'll be joining a super fun team of true rockstars. We're seeking a Project Lead who will work-from-home as a full-time employee, managing 3 to 5 projects (zero travel required). This position requires managing the entire project life cycle from kickoff to go-live. You must have general salesforce expertise, the ability to lead the requirements gathering, and manage a few offshore developers.

RESPONSIBILITIES
• Manage complex development projects on-time, on-budget, and to-spec.
• Oversee developers to make sure requirements are being met and timeline is adhered to
• Identify detailed business requirements to support Salesforce.com implementation within the scope of prioritized initiatives.
• Develop comprehensive training materials and other change management collateral as appropriate for each initiative, deliver training to super users and end users as appropriate.
• Proactively audit Salesforce.com and improve configuration settings and keep current with the latest capabilities of each release.

REQUIREMENTS
• You are comfortable with speaking with clients - This position will require customer facing.
• 3+ years of Salesforce platform experience (Sales Cloud, Service Cloud, General Configuration, etc...)
• Take complex client and vendor concepts and articulate them to audiences of varying perception levels.
• Ability to lead enterprise engagements, facilitate meetings, and lead customer support projects.
• Excellent written, verbal presentation and organizational skills, ability to interface with all levels and business units.
• Must work independently in complex fast paced environment to ensure quality and timeliness of system information.

PREFERRED SKILLS
• Salesforce.com Certifications (Admin, Consultant, Developer).
• Current or past Project Management Certification (PMP or equivalent).
• Experience work with or managing an offshore team

INTERESTED?
• Send your resume to jobs(at)forcebrain.com
• Answer the questions on this form: https://docs.google.com/a/sumoscheduler.com/forms/d/1UwzGI0xCAJLoe6xaukrl7YVZKs1k2WSE5C0ce9BJReU/viewform
GENERAL STATS
• Full Time Employee
• Location: Remote, Work & Live Anywhere
• Salary with bonus and generous benefit package
• Applicant must be willing to work 8am PST - 5pm PST shift

ABOUT FORCEBRAIN.COM
• Established in 2008, ForceBrain.com manages an all-star team of Salesforce Consultants, Force.com Developers, and Technical Architects to design, develop, deploy, and support cloud & mobile solutions .
• We offer a competitive salary and benefits package, opportunity for continuous education & salesforce certifications, flexible working hours, tools for working remotely, casual dress at the office, quarterly company outings, and subsidized beverage and snack center.
• In 2010, ForceBrain.com became certified as a B-Corporation, recognizing the transparency in which we run our organization and our accountability in giving back.
We are seeking: CRM Administrator and Program Development Assistant

POSITION OVERVIEW: DCINY is seeking a musically passionate, dynamic and talented individual to join the team in the role of CRM Admin and Program Development Assistant.  We run our business on a custom object built Salesforce platform and are looking for a Salesforce certified administrator (plus plus) who can drive that machine.  Our dream candidate will be a rock star in customer service, provide exceptional overall office support and serve as our primary contact for phone calls and communications from prospective and current DCINY artists and performers. DCINY employees are integral to the successful preparation and presentation of DCINY concerts in prestigious performance venues including Carnegie Hall, Lincoln Center for the Performing Arts and Disney Hall, Los Angeles.  Salary is commensurate with experience which also includes full benefits and matching 401K.
 
ORGANIZATION DESCRIPTION: Distinguished Concerts International New York (DCINY) is a classical music production company based in New York City.  We work with national and international organizations to present full-scale choral masterworks, instrumental performances, chamber music series, and various innovative projects. 

DUTIES AND RESPONSIBILITIES:

Administration of record and field-level security, including territory and role hierarchies, groups, and profile permissions; page layouts, related lists, and filtering based on user role
Creation and maintenance of business critical reports and dashboards
Creation and maintenance of custom applications and functionality within Salesforce.com
Creation and maintenance of data integrations inbound to Salesforce.com
Provide basic information to clients and staff regarding concert season and various aspects of the company.
Responsible for correspondence, letters of invitation, and general written communications at the request of the development team.
 Assist in development of future programming for the series, including liaison with guest conductors, performing artists and ensembles by phone, email and in person.
 Occasional availability on evenings and concert weekends.
 
COMPETENCIES and QUALIFICATIONS:
To perform this job successfully, the individual selected should have:
Bachelor/Advanced Degree.
Excellent communication, interpersonal, organizational and listening skills.  Ability to successfully multi-task and excel in a fast paced environment and be attentive and precise in details.
Strong experience developing on the Force.com platform, including custom fields and objects, formula and roll-up fields, apex triggers, apex classes, and visualforce
Solid understanding of sales and marketing analytics, including reporting on territory and pipeline health, forecasting, campaign effectiveness, and data quality metrics
Solid understanding of social media and content data architecture, including groups, file management, and event feeds
Ability to manage phone and in-person inquiries in a professional, patient and friendly manner.
 Interest and background in classical music and concert production.

TO APPLY:
Resume showing work history
A killer cover letter telling us about you and why you think you’d be a great fit at DCINY.
Salary history or requirements, and contact information for at least three references
To learn more about our company, visit: www.DCINY.org   
Please email or fax your materials to Jobs@DCINY.org or 646.736.0437
 
 
On finish screens, I often include a link to a record in addition to setting finish behavior.  So far I have hard-coded the full URL which requires me to update each screen upon deployment to production / sandbox refresh.

So I am looking for how to set a relative URL in a flow.  

Just using /{!vaRecordId} did not resolve properly.

I know on visualforce pages you can do the API partner user thing to resolve sandbox vs prod.  
({!LEFT($Api.Partner_Server_URL_140, FIND(".com/",$Api.Partner_Server_URL_140)+3)

Is there anything similar that will work in a flow?  I suppose I could set a variable in the flow to the instance, and then I would just need to update that variable when I deploy, but trying to just have a nice clean flow deployment process (dream a little dream...)

Hi all,

 

I have written a trigger that is intended to create a record of the same object when certain fields are populated. Like a clone with different fields populated as required. 

 

The triggers works fine and clones when I update one record. When I try to update more than one (EG 10) in one time it just brings back either one clone or 2 of the same clone. 

 

Puzzling... Any one able to see what I am doing wrong?

 

Appreciate your time in advance:)

 

trigger cloneElecAMsignOff on Electricity_Meter__c (before update,after update) {

     List<Electricity_Meter__c> myList = new List<Electricity_Meter__c>();
      

     for(Electricity_Meter__c a: trigger.new) {

        // insert Elec meter if Deal Done
        if (
        a.Account_Manager_Sign_Off_Date_Time__c != Null &&
        a.Lam_Clone_Date_Time_Stamp__c == Null && (
        a.Deal_Done_Not__c == 'Deal Done (Existing client / Existing meter)' ||
        a.Deal_Done_Not__c == 'Deal Done (New Meter, New Client)' || 
        a.Deal_Done_Not__c == 'Deal Done (New Meter, Exisiting Client)')) {
        
        Electricity_Meter__c b = new Electricity_Meter__c();                
        b.Name = a.Name; 
        b.Site_name__c = a.Site_name__c;
        b.Contract_arranged_under_the_name_of__c = a.Winning_Contract_Arranged_Under_Name_of__c;
        b.Account__c = a.Account__c; 
        b.Linked_Basket__c = a.Linked_Basket__c;
        b.Linked_Monitor_Line__c = a.Linked_Monitor_Line__c;
        b.Current_Supplier__c = a.Winning_Supplier__c;
        b.Previous_Supplier__c = a.Current_Supplier__c;
        b.Meter_Status__c = '(2) Active (Not yet live)';
        b.COT_Disc_Deenerg_Date__c = a.COT_Disc_Deenerg_Date__c;       
        b.Auto_Manual_Term__c = a.Auto_Manual_Term__c;
              
        b.Linked_Affiliate_1__c = a.Linked_Affiliate_1__c;    
        b.Aff_1_Profit_Split__c = a.Aff_1_Profit_Split__c;
        b.Linked_Affiliate_2__c = a.Linked_Affiliate_2__c;    
        b.Aff_2_Profit_Split__c = a.Aff_2_Profit_Split__c;        
        b.Linked_Affiliate_3__c = a.Linked_Affiliate_3__c;    
        b.Aff_3_Profit_Split__c = a.Aff_3_Profit_Split__c;
        
        b.Site_Address_New__c = a.Site_Address_New__c;
        b.Site_Postcode__c = a.Site_Postcode__c;
        b.Co_Reg_FULL_Partnership_LLP_Sole_Trader__c = a.Co_Reg_FULL_Partnership_LLP_Sole_Trader__c;
        b.Billing_Address_New__c = a.Billing_Address_New__c;
        b.Billing_Postcode__c = a.Billing_Postcode__c;
        b.Number_of_employees__c = a.Number_of_employees__c;
        b.Annual_turnover_Euros__c = a.Annual_turnover_Euros__c;
        
        b.Profile_Class__c = a.Profile_Class__c;
        b.MTC_LLF__c = a.MTC_LLF__c;
        b.Meter_Details__c = a.Meter_Details__c; 
        b.MOP_CED__c = a.MOP_CED__c;
        b.Voltage_HV_LV_LVS__c = a.Voltage_HV_LV_LVS__c;
        
        b.Contract_start_date__c = a.Winning_Contract_Start_Date__c;
        b.Contract_expiry__c = a.Winning_Contract_End_Date__c;
        b.Payment_Method__c = a.Payment_Method__c;
        b.DD_Type__c = a.DD_Type__c;
        b.VAT__c = a.VAT__c;
        b.Monthly_Quarterly_Billing__c = a.Monthly_Quarterly_Billing__c;
        b.Copy_of_the_bills__c = a.Copy_of_the_bills__c;
        b.AQ__c = a.Winning_Supply_AQ__c;
        b.Total_KVA__c = a.Total_KVA__c; 
        b.Commission_p__c = a.Winning_Commision_p_kwh__c;
        b.Commission_per_year__c = a.Winning_Commission_year__c;
        b.Commission_Percent__c = a.Winning_Commission_Contract__c;  
        myList.add(b);  
        
        }


               
        // insert Elec meter if Deal Not Done
        else if (a.Account_Manager_Sign_Off_Date_Time__c != Null && 
        a.Lam_Clone_Date_Time_Stamp__c == Null && (
        a.Deal_Done_Not__c == 'Deal not done / Not responding - Client retained' ||
        a.Deal_Done_Not__c == 'Deal not done / Not responding - Client lost' ||
        a.Deal_Done_Not__c == 'Deal not done / Went direct with supplier - Client retained' ||
        a.Deal_Done_Not__c == 'Deal not done / Went direct with supplier - Client lost' ||
        a.Deal_Done_Not__c == 'Deal not done / Went with another consultant - Client retained' ||
        a.Deal_Done_Not__c == 'Deal not done / Went with another consultant - Client lost' ||
        a.Deal_Done_Not__c == 'Deal not done / Meter removed - Client retained' ||
        a.Deal_Done_Not__c == 'Deal not done / Meter removed - Client lost')) {
        
        Electricity_Meter__c c = new Electricity_Meter__c();                
        c.Name = a.Name; 
        c.Site_name__c = a.Site_name__c;
        c.Contract_arranged_under_the_name_of__c = a.Winning_Contract_Arranged_Under_Name_of__c; 
        c.Account__c = a.Account__c; 
        c.Linked_Basket__c = a.Linked_Basket__c;
        c.Linked_Monitor_Line__c = a.Linked_Monitor_Line__c;
        c.Current_Supplier__c = a.Winning_Supplier__c;
        c.Previous_Supplier__c = a.Current_Supplier__c;
        c.Meter_Status__c = '(5) Active (Not with Maxim Eyes)';
        c.COT_Disc_Deenerg_Date__c = a.COT_Disc_Deenerg_Date__c;        
        c.Auto_Manual_Term__c = a.Auto_Manual_Term__c;
              
        c.Linked_Affiliate_1__c = a.Linked_Affiliate_1__c;    
        c.Aff_1_Profit_Split__c = a.Aff_1_Profit_Split__c;
        c.Linked_Affiliate_2__c = a.Linked_Affiliate_2__c;    
        c.Aff_2_Profit_Split__c = a.Aff_2_Profit_Split__c;        
        c.Linked_Affiliate_3__c = a.Linked_Affiliate_3__c;    
        c.Aff_3_Profit_Split__c = a.Aff_3_Profit_Split__c;
        
        c.Site_Address_New__c = a.Site_Address_New__c;
        c.Site_Postcode__c = a.Site_Postcode__c;
        c.Co_Reg_FULL_Partnership_LLP_Sole_Trader__c = a.Co_Reg_FULL_Partnership_LLP_Sole_Trader__c;
        c.Billing_Address_New__c = a.Billing_Address_New__c;
        c.Billing_Postcode__c = a.Billing_Postcode__c;
        c.Number_of_employees__c = a.Number_of_employees__c;
        c.Annual_turnover_Euros__c = a.Annual_turnover_Euros__c;
        
        c.Profile_Class__c = a.Profile_Class__c;
        c.MTC_LLF__c = a.MTC_LLF__c;
        c.Meter_Details__c = a.Meter_Details__c; 
        c.MOP_CED__c = a.MOP_CED__c;
        c.Voltage_HV_LV_LVS__c = a.Voltage_HV_LV_LVS__c;
        
        c.Contract_start_date__c = a.Winning_Contract_Start_Date__c;
        c.Contract_expiry__c = a.Winning_Contract_End_Date__c;
        c.Payment_Method__c = a.Payment_Method__c;
        c.DD_Type__c = a.DD_Type__c;
        c.VAT__c = a.VAT__c;
        c.Monthly_Quarterly_Billing__c = a.Monthly_Quarterly_Billing__c;
        c.Copy_of_the_bills__c = a.Copy_of_the_bills__c;
        c.AQ__c = a.Winning_Supply_AQ__c;
        c.Total_KVA__c = a.Total_KVA__c; 
        c.Commission_p__c = a.Winning_Commision_p_kwh__c;
        c.Commission_per_year__c = a.Winning_Commission_year__c;
        c.Commission_Percent__c = a.Winning_Commission_Contract__c;
        myList.add(c);           
        
        }

         
    try {
        insert myList; 
    } catch (system.Dmlexception e) {
        system.debug (e);   
        
    }
        
    }
        
        
}

Hi Team,

 

I have a requirement if Lawn and Garden field is true then the below select option needs to display.

 

 

Please help me, it is throwing variable doesnt exist.

 

private transient List<SelectOption> cacheProductFamilies = null;
    global List<SelectOption> productFamilies
    { 
        get {
            if (cacheProductFamilies==null){
                cacheProductFamilies = newSelectList(false);
                cacheProductFamilies.add(new SelectOption('CP','CP'));
                cacheProductFamilies.add(new SelectOption('Seeds','Seeds'));

  if (Account__r.Lawn_and_Garden_Agent__c==true){
                cacheProductFamilies.add(new SelectOption('Lawn and Garden','Lawn and Garden'));

}
            }
            return cacheProductFamilies;           
        }
    }
   
    global boolean readyForSearch {
        get {
            return selectedProductFamily!=null;
        }
    }

 

 

 

 

  • February 11, 2013
  • Like
  • 0

I found a terrific trigger enabling me to insert or update event from a custom object.  I adapted it to work from opportunitylineitem and it works beautifully.  I am trying to get the trigger to work conditionally IF(oli.Start_Date_Time__c >= Date.Today()){ so that the trigger will only fire when the Start_Date_Time__c field is populated with data.

 

Here is the code:

trigger CreateOliEvent on OpportunityLineItem (after insert, after update){

    List<Event> OliEvents = new List<Event>(); //creates a list that holds new events

        if(trigger.isinsert) { //actions if record is being inserted
        
            for (OpportunityLineItem Oli : System.Trigger.new){ //for loop that defines new event

                Event event = new Event(
                    StartDateTime = Oli.Start_Date_Time__c ,
                    EndDateTime = Oli.End_Date_Time__c,
                    Subject = Oli.Product__c,
                    IsRecurrence = FALSE,
                    Description = 'Test',
                    DurationInMinutes = 1,
                    Location = 'Academy', 
                    ProductId__c = Oli.Id,
                    WhatId = Oli.OpportunityId,
                    RecordTypeID = '01280000000Fu8m',
                    OwnerID = '00580000001kPN9',
                    IsAllDayEvent = False); 
                OliEvents.add(event);            
            } //closes for loop
          
        if(OliEvents.size() > 0) insert OliEvents; //adds events if OliEvents list > 0
                
        }else{ //closes if statement and states actions for all other triggers besides insert

            Set<String> idSetEvent = new Set<String>(); //creates a list that holds Event IDs
            
            for (OpportunityLineItem Oli : System.Trigger.New) { //for loop that adds the Event_ID__c 
 
                idSetEvent.add(Oli.Id);
            } //closes for loop

            Map<String, Event> evMap = new Map<String, Event>(); // creates a map to hold the event_ID__c that needs to be updated
             
            for(Event ev :[SELECT ProductId__c FROM Event WHERE ProductId__c in : idSetEvent]){ //for loop that assigns Event_ID__c into evMap            
                evMap.put(ev.ProductId__c, ev); //inserts Event_ID__c, ev into evmap Map
            } //closes for loop
         
            for (OpportunityLineItem Oli : System.Trigger.New) { //for loop
            
                  Event event = evMap.get(Oli.Id);
                    if(event == null){ // if no Event_ID__c is found present error message
                        event.addError('Event ID is wrong');
                        continue;
                    } //closes if statement
                    
                    event.StartDateTime = Oli.Start_Date_Time__c;
                    event.EndDateTime = Oli.End_Date_Time__c;
                    event.Subject = Oli.Product__c; 
                    event.Description = 'TestTest';
                    event.WhatId = Oli.OpportunityId;
                    event.Location = 'Aquarium'; 
                    OliEvents.add(event);
            } //closes for loop
         
            if(OliEvents.size() > 0) update OliEvents; // updates event if OliEvents > 0        
        }
        
} //closes trigger

 I have tried the obvious and placed the IF Statements as follows:

trigger CreateOliEvent on OpportunityLineItem (after insert, after update){

    List<Event> OliEvents = new List<Event>(); //creates a list that holds new events

        if(trigger.isinsert) { //actions if record is being inserted
        
            for (OpportunityLineItem Oli : System.Trigger.new){ //for loop that defines new event
            IF(oli.Start_Date_Time__c >= Date.Today() || oli.Start_Date_Time__c != Null){
                Event event = new Event(
                    StartDateTime = Oli.Start_Date_Time__c ,
                    EndDateTime = Oli.End_Date_Time__c,
                    Subject = Oli.Product__c,
                    IsRecurrence = FALSE,
                    Description = 'Test',
                    DurationInMinutes = 1,
                    Location = 'Academy', 
                    ProductId__c = Oli.Id,
                    WhatId = Oli.OpportunityId,
                    RecordTypeID = '01280000000Fu8m',
                    OwnerID = '00580000001kPN9',
                    IsAllDayEvent = False); 
                OliEvents.add(event);            
            } //closes for loop
        } // closes conditional date statement  
        if(OliEvents.size() > 0) insert OliEvents; //adds events if OliEvents list > 0
                
        }else{ //closes if statement and states actions for all other triggers besides insert

            Set<String> idSetEvent = new Set<String>(); //creates a list that holds Event IDs
            
            for (OpportunityLineItem Oli : System.Trigger.New) { //for loop that adds the Event_ID__c 
              
                idSetEvent.add(Oli.Id);
            } //closes for loop

            Map<String, Event> evMap = new Map<String, Event>(); // creates a map to hold the event_ID__c that needs to be updated
             
            for(Event ev :[SELECT ProductId__c FROM Event WHERE ProductId__c in : idSetEvent]){ //for loop that assigns Event_ID__c into evMap            
                evMap.put(ev.ProductId__c, ev); //inserts Event_ID__c, ev into evmap Map
            } //closes for loop
         
            for (OpportunityLineItem Oli : System.Trigger.New) { //for loop
            IF(oli.Start_Date_Time__c >= Date.Today() || oli.Start_Date_Time__c != Null){
                  Event event = evMap.get(Oli.Id);
                    if(event == null){ // if no Event_ID__c is found present error message
                        event.addError('Event ID is wrong');
                        continue;
                    } //closes if statement
                   
                    event.StartDateTime = Oli.Start_Date_Time__c;
                    event.EndDateTime = Oli.End_Date_Time__c;
                    event.Subject = Oli.Product__c; 
                    event.Description = 'TestTest';
                    event.WhatId = Oli.OpportunityId;
                    event.Location = 'Aquarium'; 
                    OliEvents.add(event);
            } //closes for loop
                   } // closes conditional date statement
            if(OliEvents.size() > 0) update OliEvents; // updates event if OliEvents > 0        
        }
        
} //closes trigger

 

The problem is when the trigger runs, I get the following error: CreateOliEvent: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object.  Trigger.CreateOliEvent: line 46, column 1. This error only happens on Opportunity Line Items without the Start_Date_Time__c field populated.  In line items where the Start_Date_Time__c field is populated, there is no problem.

In my application, there is one component named cash account which is displaying data properly on salesforce & when i try to print the same component on page as PDF format then it shows me following error so please tell me what to so for this ???

 

An internal server error has occurred
An error has occurred while processing your request. The salesforce.com support team has been notified of the problem. If you believe you have additional information that may be of help in reproducing or correcting the error, please contact Salesforce Support. Please indicate the URL of the page you were requesting, any error id shown on this page as well as any other related information. We apologize for the inconvenience. 

Thank you again for your patience and assistance. And thanks for using salesforce.com! 

Error ID: 1433747999-1629 (-95108586)



I have an xml I get from an external program. this XML holds information about multiple, unknown fields and their values.  the fields are a subset of a custom object in SF.
My question:
How can I set the value I get from the XML in the SF object? 
Limitations:
I dont' want to use a long if else/switch list
I don't want to update the code when in the future I add new fields to the SF object (the XML program will know of the new fields - and update them if needed)
 
XML example:
*The attribute : SF_Module_Name - holds the name of the SF Object member I want to set to true.
Code:
<—xml version="1.0" encoding="iso-8859-1"–>
<sale>
  <trxdata>
    <action>new</action>
  </trxdata>
  <Plugs>
    <Plug>
      <Dongle_ID__c>1576718528</Dongle_ID__c>
      <License_Expiration_Date>
      </License_Expiration_Date>
    </Plug>
  </Plugs>
  <Modules>
    <Module>
      <Dongle_ID__c></Dongle_ID__c>
      <Id>
      </Id>
      <Module_Name>OptiMark</Module_Name>
      <Module_Version>900</Module_Version>
      <SF_Module_Name>X1</SF_Module_Name>
    </Module>
    <Module>
      <Dongle_ID__c></Dongle_ID__c>
      <Id>
      </Id>
      <Module_Name>Optikk</Module_Name>
      <Module_Version>900</Module_Version>
      <SF_Module_Name>X2</SF_Module_Name>
    </Module>
    <Module>
      <Dongle_ID__c></Dongle_ID__c>
      <Id>
      </Id>
      <Module_Name>Opti33</Module_Name>
      <Module_Version>900</Module_Version>
      <SF_Module_Name>X3</SF_Module_Name>
    </Module>
  </Modules>
</sale>

 
I couldn't really figure how to use reflection on my object, since I couldnt' see how it is hashable, nor is it a mapped table.
 
Does anyone have an idea?
 
 
 
 

Company Overview

Rising peak demand creates unprecedented challenges in today’s energy industry: escalating electricity costs, uncertain grid reliability, and an increased risk of rolling blackouts or brownouts. Demand response, the voluntary reduction of electric demand at the end-use customer level in response to electric grid instability or high wholesale electricity prices, substantially lowers peak demand and helps stabilize the grid. Demand response achieves the same effect as a peaking power plant—at significantly lower costs and with no incremental carbon emissions—and EnerNOC pays participating businesses and organizations for agreeing to reduce demand, regardless of whether or not the need arises.

EnerNOC’s energy expertise, award-winning technology, and operational excellence establish the company as a premiere demand response and energy management solutions provider.

Position Description

EnerNOC has an immediate need for an Applications Support Analyst.  The Applications Support Analyst will own the ongoing end user support of Customer Relationship Management (Salesforce.com), ERP (Epicor) and Human Resources (People-Trak) business applications.

Salesforce.com is used as a customer-centric corporate repository for Operations, Sales, Marketing,  Corporate Development and Finance information. As EnerNOC does not fit into common CRM business models, the Applications Support Analyst will be responsible for the significant configuration and customization that takes place in the application. It is the mission of the Applications Support Analyst to find creative ways of using the application to promote adoption and continually improve ease of use. 

Key Responsibilities

  • Application Support
    • Answer application usage questions for both office-based and home-based employees
    • Administer licensing, including maintaining users, roles, and access rights
    • Resolve login problems/password resets
    • Create views, reports, and dashboards in Salesforce.com
    • Interface with vendor technical support for Level 2/3 incidents, enhancement requests and software updates
  • Training
    • Train new hires for Operations, Sales, Marketing, Finance, and Corporate Development on Salesforce.com
    • Provide Level 1 support on Salesforce.com, People-Trak, and Epicor
    • Develop and maintain training material where appropriate
  • Data Maintenance
    • Ensure data quality on a routine basis
    • De-duplicate records as needed
    • Import data from external sources into Salesforce.com
  • Business Systems Analysis
    • Document business requirements
    • Improve existing implementation of Salesforce.com
    • Implement new Salesforce applications
    • Participate in vendor selections

Required Qualifications/Skills/Education:

  • BA/BS
  • A minimum of one year experience providing customer service or business applications support, especially CRM-focused
  • A minimum of one year experience in IT, software development, or other relevant experience
  • A minimum of one year experience with Salesforce.com administration
  • Demonstrated knowledge of relational database design concepts
  • Strong knowledge of advanced Excel data manipulation functions and modeling capabilities
  • Ability to apply creativity and objectivity to design and implement solutions to real business problems
  • Self-motivation with the ability to work in a fast paced, forward moving environment
  • Outstanding written and verbal communication skills. Must utilize these skills to communicate effectively across all groups in the organization
  • Broad understanding of the business considerations when implementing new applications
  • Ability to work with business users and systems personnel in a team environment
  • Willingness and desire to learn new technologies

Desired Qualifications/Skills/Education:

  • Experience in energy management and technology
  • Experience implementing and supporting business application software packages, especially Salesforce.com, Epicor, and/or People-Trak
  • Experience using marketing data quality and enrichment tools such as DemandTools for AppExchange and Hoovers/Dun & Bradstreet
  • Experience managing SQLServer
  • Passion for energy management and environmental conservation
  • ITIL certification, COBIT, or other IT service delivery methodology experience
  • Experience in Sarbanes-Oxley compliance

Message Edited by Peter Yao on 07-01-2007 07:41 AM