• mikebr59
  • NEWBIE
  • 0 Points
  • Member since 2010

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

I'm going to risk embarrassing myself here because I know this is something really basic. But I'm just not seeing it.

 

In the following code, when I click Save, I get a DML exception saying that I did not include required fields Account__c and Invoice_Date__c, even though I entered them on the form. I've even tried initializing them in the constructor. But when it gets to the Save method all the properties in the "inv" variable are null.

 

I've also tried this with the format shown in the VF reference guide: "private final Invoice__c inv", using invoice__c in the markup. I've also tried doing this with a public getter method that returns inv. Nothing works.

 

WHY?!

 

//*** Page Markup ***

<apex:page standardController="Invoice__c" extensions="brokenInvoiceController" >
  <apex:form >

    <apex:pageBlock >
      <apex:pageMessages />
      <apex:pageBlockButtons >
        <apex:commandButton action="{!save}" value="Save" immediate="true" />
        <apex:commandButton action="{!cancel}" value="Cancel"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection >
        <apex:inputField value="{!inv.Account__c}" label="Account"/>
        <apex:inputField value="{!inv.Invoice_Date__c}" label="Invoice Date"/>
        <apex:inputField value="{!inv.Memo__c}" label="Memo" />
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

 

//*** Controller Extension ***

public with sharing class brokenInvoiceController {

public Invoice__c inv {get;set;}

public brokenInvoiceController(ApexPages.StandardController controller) {
  inv = (Invoice__c)controller.getRecord();
}

 

public PageReference Save() {
  upsert inv;
  return null;
}

public PageReference Cancel() {
  return null;
}
}

I'm absolutely tearing my hair out on this one. I have an Apex class with several System.Debug statements, which work fine in the Sandbox (Summer '12). But in production (Spring '12) the System.Debug statements in just one method aren't being written to the log. System.Debug statements elsewhere in the class work fine.

 

What I am seeing in the production debug log but not in the sandbox is a boatload of CONSTRUCTOR_ENTRY and CONSTRUCTOR_EXIT entries, associated with creation of an object (using "new"), which is immediately adjacent to the System.Debug statements that aren't working. So I know that section of code is being executed. So why am I getting CONSTRUCTOR_ENTRY/EXIT messages in the prodution log but not in sandbox, but I get USER_DEBUG messages in sandbox but not in production?

 

Again... I'm getting some System.Debug messages in the log. Just not from the method that I'm trying to debug. WHAT AM I MISSING???

I've spent the past hour trying to figure out what's wrong with this WHERE clause and am totally stuck:

 

WHERE employee__c = :UserInfo.getUserId()
and activity_date__c >= :xlStartDate
and activity_date__c <= :xlEndDate
and (invoiced__c = false or :includeInvoiced = true)

 

includeInvoiced is a public Boolean variable, and invoiced__c is a checkbox field on the object being queried. I keep getting this error: "Compile Error: unexpected token: ':' at line 53 column 44 ".

 

The token in question is the colon before includeInvoiced. What's going on? If I remove "or :includeInvoiced = true" then it compiles. What am I doing wrong?!?!?

I just talked to a prospect who may be a good fit for Force.com One App. He says, "OK, $15/month, but we could have everybody share the same login, right?"

 

*sigh* This question doesn't shock me so much when we're talking about Enterprise, but $15/month? Seriously?



Anyway, my question is this: I know for a fact that 2 users can log into Enterprise with the same ID, because I've done this occasionally for support purposes. But in general, how does SF enforce per-user access? I'd like to be able to give people a specific answer about how they'll be shut down if they try to cheat, but I'm just not sure where SF draws the line.

 

Thanks for any words of wisdom.

http://blogs.wsj.com/digits/2011/03/31/intuit-salesforce-com-team-up-to-target-small-businesses/

 

As a QuickBooks and Salesforce developer I found this article very interesting. I can't wait to see the level of integration that will be offered. But I have to say, if Salesforce wants to target small businesses, it wouldn't hurt to open up the API and allow us to expose web services in the Professional Edition. Most companies that pay less than $200/user (one time) for their accounting software (or even $3000 for 5-user QB Enterprise) don't to want to pay an extra $3600/year for 5 Salesforce users just so they can use a custom application. Yet many of these companies do need custom work done in Salesforce and need that data to integrate with QB. Which leaves me with a good prospect that I can't win. Actually I have managed to get enough SF Enterprise clients to keep food on the table, but it breaks my heart to tell other prospects that what they want simply can't be done. 

 

Fortunately for these prospects, there are plenty of good CRM systems out there that do integrate with QB out of the box. But none of them has anywhere near all the programming features of SF.

 

Also, I have to wonder if Intuit and/or Salesforce are breaking their own rules with this joint venture. We will not be amused if SF opens up the API for this new bundled offering, and leaves the rest of us locked out. Similarly, Intuit has quite a few resrictions on connecting to QB data hosted on their servers.

 

There are a few other off-the-shelf products out there that integrate QB and SF, but I don't know if they're also limited to Enterprise and Unlimited, or have found a way around that. And as I've learned from experience (actually trying to push prospects into these solutions), they aren't for everybody, either due to subscription costs, implementation costs, or limitations on customization.

 

So, PLEASE Salesforce, consider opening up Professional Edition to Apex, or coming up with a fee structure that works better for small businesses!

I'm going to risk embarrassing myself here because I know this is something really basic. But I'm just not seeing it.

 

In the following code, when I click Save, I get a DML exception saying that I did not include required fields Account__c and Invoice_Date__c, even though I entered them on the form. I've even tried initializing them in the constructor. But when it gets to the Save method all the properties in the "inv" variable are null.

 

I've also tried this with the format shown in the VF reference guide: "private final Invoice__c inv", using invoice__c in the markup. I've also tried doing this with a public getter method that returns inv. Nothing works.

 

WHY?!

 

//*** Page Markup ***

<apex:page standardController="Invoice__c" extensions="brokenInvoiceController" >
  <apex:form >

    <apex:pageBlock >
      <apex:pageMessages />
      <apex:pageBlockButtons >
        <apex:commandButton action="{!save}" value="Save" immediate="true" />
        <apex:commandButton action="{!cancel}" value="Cancel"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection >
        <apex:inputField value="{!inv.Account__c}" label="Account"/>
        <apex:inputField value="{!inv.Invoice_Date__c}" label="Invoice Date"/>
        <apex:inputField value="{!inv.Memo__c}" label="Memo" />
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

 

//*** Controller Extension ***

public with sharing class brokenInvoiceController {

public Invoice__c inv {get;set;}

public brokenInvoiceController(ApexPages.StandardController controller) {
  inv = (Invoice__c)controller.getRecord();
}

 

public PageReference Save() {
  upsert inv;
  return null;
}

public PageReference Cancel() {
  return null;
}
}

I'm absolutely tearing my hair out on this one. I have an Apex class with several System.Debug statements, which work fine in the Sandbox (Summer '12). But in production (Spring '12) the System.Debug statements in just one method aren't being written to the log. System.Debug statements elsewhere in the class work fine.

 

What I am seeing in the production debug log but not in the sandbox is a boatload of CONSTRUCTOR_ENTRY and CONSTRUCTOR_EXIT entries, associated with creation of an object (using "new"), which is immediately adjacent to the System.Debug statements that aren't working. So I know that section of code is being executed. So why am I getting CONSTRUCTOR_ENTRY/EXIT messages in the prodution log but not in sandbox, but I get USER_DEBUG messages in sandbox but not in production?

 

Again... I'm getting some System.Debug messages in the log. Just not from the method that I'm trying to debug. WHAT AM I MISSING???

I've spent the past hour trying to figure out what's wrong with this WHERE clause and am totally stuck:

 

WHERE employee__c = :UserInfo.getUserId()
and activity_date__c >= :xlStartDate
and activity_date__c <= :xlEndDate
and (invoiced__c = false or :includeInvoiced = true)

 

includeInvoiced is a public Boolean variable, and invoiced__c is a checkbox field on the object being queried. I keep getting this error: "Compile Error: unexpected token: ':' at line 53 column 44 ".

 

The token in question is the colon before includeInvoiced. What's going on? If I remove "or :includeInvoiced = true" then it compiles. What am I doing wrong?!?!?