• Doh
  • NEWBIE
  • 110 Points
  • Member since 2010

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

Hi,

 

I try this code:

http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php

 

And when I execute, get a Salesforce.com Login, I put my login and when back to my computer (a localhost), get this error:

   https://login.salesforce.com/services/oauth2/token failed with status 0

 

Anyone can explain whats append?!!!

 

Best Regards,

LB

  • December 22, 2010
  • Like
  • 0

I'm trying to package an email template accessing a custom object generation an attachment. It work fine in a DEOrg but as soon as I try to package it in a separate DEOrg I get an error saving the VF Email template. Here the namespace prefix is XXX and the custom object is person with a field called first_name__c.

 

Error occurred trying to load the template for preview: Could not resolve field 'first_name__c' from <apex:outputField> value binding '{!relatedTo.first_name__c}' in page XXX:Test_Email_Template. Please try editing your markup to correct the problem.

 The VF code:

 

<messaging:emailTemplate subject="Test" recipientType="Contact" relatedToType="XXX__person__c">
<messaging:plainTextEmailBody >
Congratulations!
This is your new Visualforce Email Template.
</messaging:plainTextEmailBody>

<messaging:attachment renderAs="pdf" filename="{!relatedTo.name}">
        
        <apex:panelGrid columns="1" >
            <apex:outputField value="{!relatedTo.first_name__c}"/>
        </apex:panelGrid>
     

</messaging:attachment>
</messaging:emailTemplate>

 It the code is changed to <apex:outputText value="{!relatedTo.first_name__c}"/> it works ok so it binds to the custom object ok.

 

The only difference between the DE's  I can figure is that the namespace prefix is used in this code for packaging. Anyone got any ideas?

 

  • September 10, 2011
  • Like
  • 0

I'm working on a business flow that requires date manipulation and when I define a flow variable with a data type of date the default initializes itself to Dec 31 1969.

 

I need to set the default date to null for use in comparing empty date fields in a dated history. An allocator only offers the (Current Date) as an option under "Functions and internal value elements". If I try to make the variable initialization null or 0000-00-00 or 0 or 00-00-0000 none are acceptable.
(Tip: do not setup a variable as a numeric data type and after saving it change it to a date ... delete the variable and start again with the date data type defined from the start otherwise you get all sorts of strange stuff happening!).
Does anyone know of a way to initialize a variable date field in Flow Designer to be a null value initially?
I've reported the issue to Salesforce because it seems to be a bug.
The latest documentation is very introductory which is great when starting out but once you get into complex stuff there is no technical reference. For example the "Functions and internal value elements" is not mentioned so how are these defined? The only pre-defined function is current date.

 

  • April 07, 2011
  • Like
  • 0

I have a flow working but I now want to improve the interface experience for the end user. There is a HTML tab but when I make changes and embed some VF code there is no change in the interface.

 

Does anyone have experience with changing the flow interface look and feel or point me to some documentation? The Help text doesn't cover that apect and I have not found any links.

 

 

  • April 06, 2011
  • Like
  • 0

I've designed a simple update flow using Flow Manager 7.0.1 with a single form asking 3 questions. The 3 questions contain a text field, a choices field matching a SF picklist, and a date field with a default of the current date. When you run the flow it successfully adds a new row to the Custom Object . The Validate test of the Flow Designer gives a "The Flow appears to be built correctly" message.

 

When I try to upload the Flow I get an error message (I would cut and paste but I have to run this thing on a Windows machine ... ) with the following:

 

"We had trouble uploading the flow. Question "PosNewOpenDate" has a default value with an incorrect date format. Please change the date format to yyyy-MM-dd and re-upload."

 

OK seems like it objects to an initialization (it  defaults to current date). I change to the format specified and same error occurs.

  • February 23, 2011
  • Like
  • 0

I'm dipping my toes with the new Field Sets (FS) feature and I really like it. It will reduce administration coding tremendously if you are a heavy VF user.

 

My problem is that I want to display different field sets based on the rendered attribute. The idea is that you have a master FS and clone variations that allow for context treatment in a page. The help text for the <apex:repeat > component inidcates tha rendered is a supported attribute.

 

My tests suggest that it is not yet supported. I set up a test object to test the feature:

 

I setup 2 FS called FS1 and FS2 where FS2 is a clone of FS1 but with an extra field.

The first 2 page sections make sure both field sets display.

The next page sections (3) checks that they display if incuded in the same page section.

Page Section (4) is to base a rendered on a boolean

"Field Set FS2 only if Field 1 true"

The final Page Section is a straight forward test: 

rendered="false">  

 

<apex:page standardController="Test_Field_Sets__c">
<apex:form >
  <apex:pageBlock title="Test Field Sets">
  
   <apex:pageBlockSection title="Show All Values" columns="1">
   
   <apex:outputField value="{!Test_Field_Sets__c.name}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_1__c}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_2__c}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_3__c}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_4__c}"/>
   
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set FS1" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS1}" var="f">              
              <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
            </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set FS2" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="All Field Sets in one page section" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS1}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
     <apex:pageBlockSectionItem />
     ********************************
     <apex:pageBlockSectionItem />
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set FS2 only if Field 1 true" columns="1">
   
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS1}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
     
     <apex:pageBlockSectionItem />
     ********************************
     <apex:pageBlockSectionItem />
     
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f" rendered="{!Test_Field_Sets__c.Field_1__c}">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set rendered test" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f" rendered="false">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
  </apex:pageBlock>
</apex:form>    
</apex:page>

 In all cases the rendered attribute is ignored. Since it is a beta release I'm inclined to think it is a feature bug? Anyone else seen the same issue?

 

  • February 18, 2011
  • Like
  • 0

I'm trying to package an email template accessing a custom object generation an attachment. It work fine in a DEOrg but as soon as I try to package it in a separate DEOrg I get an error saving the VF Email template. Here the namespace prefix is XXX and the custom object is person with a field called first_name__c.

 

Error occurred trying to load the template for preview: Could not resolve field 'first_name__c' from <apex:outputField> value binding '{!relatedTo.first_name__c}' in page XXX:Test_Email_Template. Please try editing your markup to correct the problem.

 The VF code:

 

<messaging:emailTemplate subject="Test" recipientType="Contact" relatedToType="XXX__person__c">
<messaging:plainTextEmailBody >
Congratulations!
This is your new Visualforce Email Template.
</messaging:plainTextEmailBody>

<messaging:attachment renderAs="pdf" filename="{!relatedTo.name}">
        
        <apex:panelGrid columns="1" >
            <apex:outputField value="{!relatedTo.first_name__c}"/>
        </apex:panelGrid>
     

</messaging:attachment>
</messaging:emailTemplate>

 It the code is changed to <apex:outputText value="{!relatedTo.first_name__c}"/> it works ok so it binds to the custom object ok.

 

The only difference between the DE's  I can figure is that the namespace prefix is used in this code for packaging. Anyone got any ideas?

 

  • September 10, 2011
  • Like
  • 0

I'm sure this can't be right, but I can't find the installer for the Mac OSX version of the flow designer. In my developer organization all there is the Flow_Designer_v7.0.5.exe. I the Flow Designer really windows only?

 

Thanks for any help!!

Scott

  • September 07, 2011
  • Like
  • 0

I'm trying to create a VF email template. I need to use apex:outputField rather than apex:outputText because there is a problem with GMT daylight savings when I output a date that is on summer time. apex:outputField should help me do this 

 

My code reads like this:

 

 

<messaging:emailTemplate subject="Test" recipientType="Contact" relatedToType="Work__c" >
<messaging:htmlemailbody >

<apex:variable var="date" value="{!relatedTo.Start__c}"/>
            <apex:outputField value="{0, date, EEEE d, MMMM yyyy, hh:mm a}">
                                <apex:param value="{!date}" />
                            </apex:outputField>
                            

</messaging:htmlemailbody>
</messaging:emailTemplate>

 

but when I select my template  I'm getting the error:" value for outputField is not a dynamic binding!"

 

So I read up on dynamic binding in the VF guide but I'm none the wiser.

 

Can anybody help?

 

  • April 13, 2011
  • Like
  • 0

I'm working on a business flow that requires date manipulation and when I define a flow variable with a data type of date the default initializes itself to Dec 31 1969.

 

I need to set the default date to null for use in comparing empty date fields in a dated history. An allocator only offers the (Current Date) as an option under "Functions and internal value elements". If I try to make the variable initialization null or 0000-00-00 or 0 or 00-00-0000 none are acceptable.
(Tip: do not setup a variable as a numeric data type and after saving it change it to a date ... delete the variable and start again with the date data type defined from the start otherwise you get all sorts of strange stuff happening!).
Does anyone know of a way to initialize a variable date field in Flow Designer to be a null value initially?
I've reported the issue to Salesforce because it seems to be a bug.
The latest documentation is very introductory which is great when starting out but once you get into complex stuff there is no technical reference. For example the "Functions and internal value elements" is not mentioned so how are these defined? The only pre-defined function is current date.

 

  • April 07, 2011
  • Like
  • 0

 

using Force.com flow, i am unable to get Id of the inserting record when record inserted through Data Update Element of the Flow Designer.

 

 

There is option in Data Update "Assign Id" and assigned it to variable.

 

But when i am upload our Flow to Salesforce.... it doen't show Id of the reocord but shows in Desktop(when i run our flow on desktop using Flow Designer)

 

Please let me...

  • March 11, 2011
  • Like
  • 0

I've designed a simple update flow using Flow Manager 7.0.1 with a single form asking 3 questions. The 3 questions contain a text field, a choices field matching a SF picklist, and a date field with a default of the current date. When you run the flow it successfully adds a new row to the Custom Object . The Validate test of the Flow Designer gives a "The Flow appears to be built correctly" message.

 

When I try to upload the Flow I get an error message (I would cut and paste but I have to run this thing on a Windows machine ... ) with the following:

 

"We had trouble uploading the flow. Question "PosNewOpenDate" has a default value with an incorrect date format. Please change the date format to yyyy-MM-dd and re-upload."

 

OK seems like it objects to an initialization (it  defaults to current date). I change to the format specified and same error occurs.

  • February 23, 2011
  • Like
  • 0

I'm dipping my toes with the new Field Sets (FS) feature and I really like it. It will reduce administration coding tremendously if you are a heavy VF user.

 

My problem is that I want to display different field sets based on the rendered attribute. The idea is that you have a master FS and clone variations that allow for context treatment in a page. The help text for the <apex:repeat > component inidcates tha rendered is a supported attribute.

 

My tests suggest that it is not yet supported. I set up a test object to test the feature:

 

I setup 2 FS called FS1 and FS2 where FS2 is a clone of FS1 but with an extra field.

The first 2 page sections make sure both field sets display.

The next page sections (3) checks that they display if incuded in the same page section.

Page Section (4) is to base a rendered on a boolean

"Field Set FS2 only if Field 1 true"

The final Page Section is a straight forward test: 

rendered="false">  

 

<apex:page standardController="Test_Field_Sets__c">
<apex:form >
  <apex:pageBlock title="Test Field Sets">
  
   <apex:pageBlockSection title="Show All Values" columns="1">
   
   <apex:outputField value="{!Test_Field_Sets__c.name}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_1__c}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_2__c}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_3__c}"/>
   <apex:outputField value="{!Test_Field_Sets__c.Field_4__c}"/>
   
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set FS1" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS1}" var="f">              
              <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
            </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set FS2" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="All Field Sets in one page section" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS1}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
     <apex:pageBlockSectionItem />
     ********************************
     <apex:pageBlockSectionItem />
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set FS2 only if Field 1 true" columns="1">
   
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS1}" var="f">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
     
     <apex:pageBlockSectionItem />
     ********************************
     <apex:pageBlockSectionItem />
     
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f" rendered="{!Test_Field_Sets__c.Field_1__c}">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
   
   <apex:pageBlockSection title="Field Set rendered test" columns="1">
     <apex:repeat value="{!$ObjectType.Test_Field_Sets__c.FieldSets.FS2}" var="f" rendered="false">              
       <apex:outputField value="{!Test_Field_Sets__c[f]}"/>
     </apex:repeat>
   </apex:pageBlockSection>
  </apex:pageBlock>
</apex:form>    
</apex:page>

 In all cases the rendered attribute is ignored. Since it is a beta release I'm inclined to think it is a feature bug? Anyone else seen the same issue?

 

  • February 18, 2011
  • Like
  • 0

Hi,

 

I try this code:

http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php

 

And when I execute, get a Salesforce.com Login, I put my login and when back to my computer (a localhost), get this error:

   https://login.salesforce.com/services/oauth2/token failed with status 0

 

Anyone can explain whats append?!!!

 

Best Regards,

LB

  • December 22, 2010
  • Like
  • 0