• jayhunter
  • NEWBIE
  • 0 Points
  • Member since 2009

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

Please email me if interested @ jhunter@drivecam.com

 

We are looking for a full time SFDC admin / analyst.  The ideal candidate should be familiar with all aspects of salesforce (certification a definite plus).  Apex and visualforce experience desirable but not necessary.  DriveCam uses salesforce heavily in all customer facing areas in a number of innovative ways.  If you enjoy a fast paced environment and have a passion to drive innovation via the force.com platform this is the role for you!

 

No recruiters please.

I'm fresh out of the DEV501 class, and trying to create my first controller extension and accompanying test class.  I've got the extension done (it's really basic), but I struggled off and on all day yesterday with a test class for the extension.  I've looked at as many examples as I can find, but I can't figure otu how to call the  extension's 1 method from the test class.  It's all very easy stuff I know, I'm hoping someone in the community can spot my error easily.  It shouldn't be tough!  Here's what I've got:

 

public class ProjectBOMPrintoutExtension { public DriveCamProject__c project {get; set;} //This extension does a very simple thing. From a starting DriveCamProject__c, it polls the DB //for any associated project BOM line items that have quantity. These are the line items that //users are interested in when creating a site SO. There's a VF page that uses this list to //build a BOM printout. public List<Project_Product__c> siteBOM { get{ siteBOM = [Select Unit_Price__c, Site_Qty__c, Site_Extended_Amount__c, Part__c, Description__c From Project_Product__c where Project_Name__c=: apexpages.currentPage().getParameters().get('id') and Site_Qty__c > 0 Order by Part__c desc]; return siteBOM; } set;//not sure if we need a setter, but putting it in for now } public ProjectBOMPrintoutExtension (ApexPages.StandardController stdController){ this.project = (DriveCamProject__c)stdController.getRecord(); } //Test Method public static testMethod void testSiteBOMController() { // Create new Project and BOM line item Account TestAccount = [select id from Account limit 1]; String TestAccountId = TestAccount.Id; RecordType TestRecordType = [select id from RecordType where SobjectType='DriveCamProject__c' limit 1]; String TestRecordTypeId = TestRecordType.id; DriveCamProject__c p = new DriveCamProject__c(Name='Test Project',Account__c= TestAccountId, Status__c='Account Notification', RecordTypeId=TestRecordTypeId); insert p; Project_Product__c pp = new Project_Product__c(Name='Test PP', Project_Name__c = p.id); insert pp; // Get a page reference to our newly created project PageReference pg1 = new PageReference('/apex/ProjectBOMprintout?id='+p.Id); System.test.setCurrentpage(pg1); // TODO: Instantiate the controller (call it "controller") //ApexPages.standardController controller = new ApexPages.standardController(new DriveCamProject__c()); ApexPages.standardController controller = new ApexPages.standardController(p); // TODO: Instantiate the extension (call it "extension") ProjectBOMPrintoutExtension extension = new ProjectBOMPrintoutExtension(controller); // TODO: Instantiate the project from the extension DriveCamProject__c project = extension.project; //p = extension.project; ///!!!!!!!!!!Here's where it goes bad. I just need to call the controller method, but

////!!!!!!!!!I get errors about the method not existing or incorrect sig. // Execute the controller method List<Project_Product__c> BOMList = project.siteBOM(); // Check list isn't null System.assert(BOMList!=null); // Check list is expected size System.assertEquals(1, BOMList.size()); // Check contents of list are as expected System.assertEquals(BOMList[0].id, pp.id);

} }

 

 As I said, I'm sure this is easy stuff.   It's almost embarrassing posting something so simple, but I'm stuck.

 

I am diving into my first Apex trigger creation, and I'm hoping someone out there has some sample code that I can drop in.  We rely heavily on account hierarchies, and I'm writing some triggers to automatically update a few fields across the entire hierarchy when a user changes a value on one account in a family.  The starting point of this trigger is therefore being able to traverse the entire account family, and get a Set of IDs to update that represent all the accounts in that account family.  Our hierarchies can be fairly deep -- sometimes as many as 3 or 4 levels, and I'd like the code to be able to work from anywhere in the hierarchy and update ALL related accounts.

Does anyone have a sample that would take a single account ID as its input and return a set of IDs for all accounts in the family?  It would be a huge time saver.

I'll be sure to post my finished trigger for all to use when it's done!

Thanks in advance.

I'm fresh out of the DEV501 class, and trying to create my first controller extension and accompanying test class.  I've got the extension done (it's really basic), but I struggled off and on all day yesterday with a test class for the extension.  I've looked at as many examples as I can find, but I can't figure otu how to call the  extension's 1 method from the test class.  It's all very easy stuff I know, I'm hoping someone in the community can spot my error easily.  It shouldn't be tough!  Here's what I've got:

 

public class ProjectBOMPrintoutExtension { public DriveCamProject__c project {get; set;} //This extension does a very simple thing. From a starting DriveCamProject__c, it polls the DB //for any associated project BOM line items that have quantity. These are the line items that //users are interested in when creating a site SO. There's a VF page that uses this list to //build a BOM printout. public List<Project_Product__c> siteBOM { get{ siteBOM = [Select Unit_Price__c, Site_Qty__c, Site_Extended_Amount__c, Part__c, Description__c From Project_Product__c where Project_Name__c=: apexpages.currentPage().getParameters().get('id') and Site_Qty__c > 0 Order by Part__c desc]; return siteBOM; } set;//not sure if we need a setter, but putting it in for now } public ProjectBOMPrintoutExtension (ApexPages.StandardController stdController){ this.project = (DriveCamProject__c)stdController.getRecord(); } //Test Method public static testMethod void testSiteBOMController() { // Create new Project and BOM line item Account TestAccount = [select id from Account limit 1]; String TestAccountId = TestAccount.Id; RecordType TestRecordType = [select id from RecordType where SobjectType='DriveCamProject__c' limit 1]; String TestRecordTypeId = TestRecordType.id; DriveCamProject__c p = new DriveCamProject__c(Name='Test Project',Account__c= TestAccountId, Status__c='Account Notification', RecordTypeId=TestRecordTypeId); insert p; Project_Product__c pp = new Project_Product__c(Name='Test PP', Project_Name__c = p.id); insert pp; // Get a page reference to our newly created project PageReference pg1 = new PageReference('/apex/ProjectBOMprintout?id='+p.Id); System.test.setCurrentpage(pg1); // TODO: Instantiate the controller (call it "controller") //ApexPages.standardController controller = new ApexPages.standardController(new DriveCamProject__c()); ApexPages.standardController controller = new ApexPages.standardController(p); // TODO: Instantiate the extension (call it "extension") ProjectBOMPrintoutExtension extension = new ProjectBOMPrintoutExtension(controller); // TODO: Instantiate the project from the extension DriveCamProject__c project = extension.project; //p = extension.project; ///!!!!!!!!!!Here's where it goes bad. I just need to call the controller method, but

////!!!!!!!!!I get errors about the method not existing or incorrect sig. // Execute the controller method List<Project_Product__c> BOMList = project.siteBOM(); // Check list isn't null System.assert(BOMList!=null); // Check list is expected size System.assertEquals(1, BOMList.size()); // Check contents of list are as expected System.assertEquals(BOMList[0].id, pp.id);

} }

 

 As I said, I'm sure this is easy stuff.   It's almost embarrassing posting something so simple, but I'm stuck.

 

I am diving into my first Apex trigger creation, and I'm hoping someone out there has some sample code that I can drop in.  We rely heavily on account hierarchies, and I'm writing some triggers to automatically update a few fields across the entire hierarchy when a user changes a value on one account in a family.  The starting point of this trigger is therefore being able to traverse the entire account family, and get a Set of IDs to update that represent all the accounts in that account family.  Our hierarchies can be fairly deep -- sometimes as many as 3 or 4 levels, and I'd like the code to be able to work from anywhere in the hierarchy and update ALL related accounts.

Does anyone have a sample that would take a single account ID as its input and return a set of IDs for all accounts in the family?  It would be a huge time saver.

I'll be sure to post my finished trigger for all to use when it's done!

Thanks in advance.
I have some issues with my organizations historic data .

There are lot of customizations happening and
1> I want to prevent people from creating reports without taking away their permissions . Ideally i would like one S control type of alert popping up every time a user creates a new report. How is it possible?

2> I want to mass Delete 2400 reports from the system and also the underlying Dashboards
  • October 22, 2008
  • Like
  • 0