• james2000
  • NEWBIE
  • 60 Points
  • Member since 2007

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 22
    Questions
  • 21
    Replies

I have an application that use the chatter API to upload file attachments as described in the chatter REST API. I'm doing a multiform POST and I am able to upload the file without issue. However, I'm not getting a preview generated. I'm testing with simple image files (png, gif) and no previews are generated. If I create the exact same post with in the web interface, previews are generated. The file name has the file extension and I'm also setting the proper mime type on the binary multiform part.

 

So is preview generation supported when uploading through the API? If it is supported, are there any tricks or options to doing it? My request looks pretty much just like the example in chatter documentation.

 

Thanks

I'm trying to create a user status update and I'm not having any success. I've not been able to find any examples of a chatter POST with a JSON request body. Are there any such examples (preferably a curl example)?

 

Here's what I'm trying 

curl -X POST https://na7.salesforce.com/services/data/v23.0/chatter/feeds/news/me/feed-items -H 'Authorization: OAuth ...' -H 'X-PrettyPrint:1' -H 'Content-Type: application/json; charset=UTF-8' -d "{\"body\":[\"text\":\"hola\", \"type\":\"Text\"]}" -v

 But I get the error:

"Can not deserialize instance of core.chatter.connect.resources.input.MessageBodyInputRepresentation out of START_ARRAY token at [line:1, column:2]",  "errorCode" : "JSON_PARSER_ERROR"

I have an app that uses the REST API with OAuth 2.0 to query for and display Chatter data. The problem I'm having is that profile images don't appear unless the user is logged in to Salesforce. Since an OAuth 2.0 access token is only scoped for API use, is it possible to get profile images to display without having an active session?

The article Digging Deeper into OAuth 2.0 on Force.com describes being able to validate the ID field was not modified. I'm trying to understand better how to perform that validation and am wondering if there are any examples. I didn't see any in the getting started guide.

 

Thanks

Does the REST API support Client ID that would allow access to Group and Professional Edition? If so, how do I make calls with it? I didn't see it referenced in the REST API reference documentation.

 

Thanks

For ISV applications that need to use the API in conjunction with OAuth 2.0, do I need my remote access application in every Salesforce org that is accessed? What I'm trying to determine is whether a managed package containing my remote access application has to be installed in every Salesforce org if I'm only using the REST API.

 

Thanks

I'm developing an integration that needs to make use of the Force.com API. It's my understanding that to execute the API in professional edition, I need an API key. Is it possible to get an API key for just a public AppExchange listing that doesn't have a Salesforce managed package associated with it? If so, how?

 

Thanks

It looks like the Double.valueOf(String) and Decimal.valueOf(String) don't support using a non-decimal point separator. For many locales, the decimal separator character is the comma (,) instead of period (.). When I call Double.valueOf(String) in a locale that uses a comma, I expect it to parse correctly. Unfortunately, this isn't the case.

 

For example, the following code will throw a TypeException:

 

Double d = Double.valueOf('7,2');
System.debug('D=' + d.format());

 

Changing the "," to "." works though.

 

 

Is this expected behavior? I'm guessing the only thing I can do is replace "," with "." whenever parsing a string. :smileysad:

When I set a VF page to render as PDF (renderAs="pdf"), a redirect happens and I lose all controller state. This is preventing me generating a PDF as part of a wizard that collects data in a previous page.

 

If I remove the renderAs param from the page, the state is maintained and no redirect occurs. Even if I set the setRedirect attribute to false when forwarding to the PDF page, it redirects.

 

Is there a way to go to PDF VF page without the automatic redirect? The wizard is such that I can't just pass simple parameters from the previous page.

I have a managed package installed in a customer org. All debug from my Apex is being filtered out of the debug log. How can I enable debug output for my managed package? Thanks

From within a trigger, I have the need to update the same object. The update will occur asynchronously via a future method and the trigger will check the particular field that is being updated so it won't execute recursively.

 

In practice though, this doesn't appear to be allowed. When I try to execute my code, it doesn't even attempt to run my future method. I get this error:

 

SELF_REFERENCE_FROM_TRIGGER, Object (id = a0h80000001Y4Dd) is currently in trigger XYZ, therefore it cannot recursively update itself: []

 

Why is this prevented? Shouldn't a recursive error only be thrown when true recursion is detected?

 

Are there any workarounds? Thanks

 

I've run into a disconcerting issue while writing a test case: there seems to be at least one case of decimal division that doesn't produce an accurate result. Since we deal with a lot financial/currency calculations, this is a little scary to me. Has anyone seen anything like this before or can anyone tell me if I'm doing something wrong here:

 

 

Decimal num = 2.10;Decimal denom = 2.0;Decimal result = num / denom;System.debug('Result=' + result.setScale(2).toPlainString());if (result != 1.05) System.debug('Not equal!');

 

If I run this code in an anonymous block, it displays the following:


 

20090626192509.249:AnonymousBlock.appirio_sm1: line 4, column 1: Result=1.00

20090626192509.249:AnonymousBlock.appirio_sm1: line 6, column 2: Not equal!

 

Thoughts?

I'm getting a NullPointerException when trying to save a page that references a VF component from a managed package. This seems to have broken since the Summer 09 release. Has anyone else seen this? Does anyone have workarounds?

 

screen shot

Message Edited by james2000 on 06-11-2009 12:27 PM
Message Edited by james2000 on 06-11-2009 12:28 PM

I'm wanting to create a managed package that contains Apex classes and methods that can be called from the org that installs the managed package.

 

I assumed all I had to do was make my Apex classes and methods global using the global keyword. However, when I try to call a method from an org that has the package installed, I get the error "Method does not exist or incorrect signature".

 

I've tried calling the method with and without the namespace. Can someone please tell me if this is supported or if there is some trick to getting this to work?

 

Thanks 

I'm having problems trying to get content from an apex:define tag into my table (pageBlockTable or dataTable). Is this supported? I want to deliver template pages as part of a managed package that a customer can use and provide additional columns in a table.

When I view the page, it doesn't display the additional columns.

Template page:
Code:
<apex:page standardController="JCustom__c" title="JCustom {!JCustom__c.Name}" 
    extensions="jcustomcon">
  <apex:sectionHeader title="JCustom" subtitle="{!JCustom__c.Name}"/>
  <apex:form >
      <apex:pageBlock title="Custom" mode="edit">
          <apex:pageBlockButtons >
              <apex:commandButton action="{!save}" value="Save!"/>
          </apex:pageBlockButtons>
          <apex:pageBlockTable title="details" value="{!customs}" var="c">
              <apex:column headerValue="Field1">
                  <apex:inputField value="{!c.field1__c}"/>              
              </apex:column>
              <apex:insert name="customColumns"/>
          </apex:pageBlockTable>          
      </apex:pageBlock>
  </apex:form>
</apex:page>

Page using the template - note the tags between the composition and the define tags are needed for compilation:
Code:
<apex:page standardController="JCustom__c" title="JCustom {!JCustom__c.Name}" 
    extensions="jcustomcon">
  <apex:composition template="jc1">
  <apex:form>
  <apex:pageBlock>
  <apex:pageBlockTable value="{!customs}" var="c">
      <apex:define name="customColumns">
          <apex:column headerValue="Field2">
              <apex:inputField id="fld2" value="{!c.field2__c}"/>
          </apex:column>
          <apex:column headerValue="Field 3">
              <apex:inputField id="fld3" value="{!c.field3__c}"/>
          </apex:column>
      </apex:define>
  </apex:pageBlockTable>
  </apex:pageBlock>
  </apex:form>
  </apex:composition>
</apex:page>

 

 

The flex toolkit appears to be broken in flash player 10. I've got a control that works fine in Flash 9 but not Flash 10. Now that Flash 10 is publicly available, this is a big problem.

The log output when making a login call is the following - notice the error on the last line:
Code:
[DEBUG] com.salesforce.Connection App Domain = salesforce.com
[DEBUG] com.salesforce.Connection Api Server name = na3.salesforce.com
[DEBUG] com.salesforce.Connection _internalServerUrl = https://na3.salesforce.com/services/Soap/u/13.0/471700D500000006lQW
[DEBUG] com.salesforce.Connection loading the policy file: https://na3.salesforce.com/services/Soap/cross-domain.xml
[INFO] com.salesforce.Connection Your application must be running on a https server in order to use https to communicate with salesforce.com!
[DEBUG] com.salesforce.Connection invoke getUserInfo
[DEBUG] com.salesforce.Connection intServerUrl is null
[DEBUG] com.salesforce.Connection intServerUrl = https://na3.salesforce.com/services/Soap/u/13.0/471700D500000006lQW
[DEBUG] com.salesforce.Connection _invoke getUserInfo
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer set destination to 'DefaultHTTPS'.
[DEBUG] com.salesforce.Transport object format set
[DEBUG] com.salesforce.events.SendEvent Method name is: getUserInfo
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer sending message '4DA901AD-8C84-8587-37D7-2AC02C68D691'
[DEBUG] mx.messaging.Channel 'direct_http_channel' channel sending message:
(mx.messaging.messages::HTTPRequestMessage)#0
body = "<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner.soap.sforce.com"><sfns:SessionHeader><sessionId>471700D500000006lQW!AQYAQLSyqIEqp.DYDyQydZmx8C1y_CQ8_WgDZpb8S.Cv6zq0sIW5ny4C61NcVSfuIE8QjKgaXv1RpkC8S9m.tcLSv_rQ0ezf</sessionId></sfns:SessionHeader><sfns:CallOptions><client>Appirio/CloudStorage/</client></sfns:CallOptions></se:Header><se:Body><getUserInfo xmlns="urn:partner.soap.sforce.com" xmlns:ns1="sobject.partner.soap.sforce.com"/></se:Body></se:Envelope>"
clientId = (null)
contentType = "text/xml; charset=UTF-8"
destination = "DefaultHTTPS"
headers = (Object)#1
httpHeaders = (Object)#2
Accept = "text/xml"
SOAPAction = """"
X-Salesforce-No-500-SC = "true"
messageId = "4DA901AD-8C84-8587-37D7-2AC02C68D691"
method = "POST"
recordHeaders = false
timestamp = 0
timeToLive = 0
url = "https://na3.salesforce.com/services/Soap/u/13.0/471700D500000006lQW"
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer connected.
[DEBUG] com.salesforce.events.SendEvent Method name is: getUserInfo
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer acknowledge of '4DA901AD-8C84-8587-37D7-2AC02C68D691'.
[ERROR] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer fault for '4DA901AD-8C84-8587-37D7-2AC02C68D691'.

 Is there a plan to fix this or does anyone have any work around?

I'm trying to build an edit page that contains a save and cancel button. The page has a required field and also has a custom controller.

The problem is that when I press the cancel button to invoke my cancel action, the cancel action is not invoked and instead the page displays an error that I must enter a value for the required field if I have no text in the field.

Is there a way to have this logic bypassed for a cancel action?


Code:
<apex:page controller="NewCaseCommentController" tabStyle="Case">
  <apex:sectionHeader title="Comments" subtitle="Case {!parentCase.CaseNumber}" help="/help/doc/user_ed.jsp—loc=help&target=case_comments_edit.htm&section=Cases"/>
  <apex:form>
    <apex:pageBlock title="Case Comment Edit" mode="edit">
      <apex:pageBlockButtons>
        <apex:commandButton action="{!save}" value="Save"></apex:commandButton>
        <apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="Case Details" columns="1">
        <apex:outputField value="{!parentCase.Subject}"/>
        <apex:outputField value="{!parentCase.Description}"/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Case Comments" columns="1">
        <apex:pageBlockSectionItem>
          <apex:outputLabel value="Public" for="comment__ispublished" style="text-align:center;"/>
          <apex:inputCheckbox value="{!comment.IsPublished}" id="comment__ispublished"></apex:inputCheckbox>
        </apex:pageBlockSectionItem>
        <apex:pageBlockSectionItem>
          <apex:outputLabel value="Comment" for="comment__commentbody"/>
          <apex:inputField value="{!comment.CommentBody}" required="true" id="comment_commentbody" style="width:450px; height:135px"/>
        </apex:pageBlockSectionItem>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
  <!-- apex:relatedList does not work for CaseComments -->
  <apex:pageBlock title="Case Comments" helpUrl="/help/doc/user_ed.jsp–loc=help&target=case_comments.htm&section=Cases" helpTitle="Case Comments Help">
    <apex:pageBlockList value="{!existingComments}" var="ec">
      <apex:column headerValue="Public" headerStyle="text-align:middle;"><apex:outputField value="{!ec.IsPublished}"/></apex:column>
      <apex:column headerValue="Comment"><b>Created By: &nbsp;<apex:outputLink value="/{!ec.CreatedById}">{!ec.CreatedBy.Name}</apex:outputLink> (<apex:outputField value="{!ec.CreatedDate}"/>)</b><br /><apex:outputField value="{!ec.CommentBody}"/></apex:column>
    </apex:pageBlockList>
  </apex:pageBlock>

</apex:page>

 Thanks

I'm not able to get the required attribute on input controls to correctly display the red bar next to the control.

For example:
Code:
<apex:page standardController="Case">
  <apex:form>
    <apex:pageBlock title="Case Edit" mode="edit">
        <apex:pageBlockButtons>
          <apex:commandButton action="{!save}" value="Save"></apex:commandButton>
          <apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
        </apex:pageBlockButtons>
      <apex:pageBlockSection title="Case Comments" columns="1">
        <apex:pageBlockSectionItem>
          <apex:outputLabel value="Subject" for="case__subject"/>
          <apex:inputText required="true" value="{!case.Subject}"/>
        </apex:pageBlockSectionItem>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

 


If I change inputText to inputField, the control will display properly. From the documentation, it appears to me that this should work with inputText, inputTextarea, etc.


Message Edited by james2000 on 05-14-2008 04:37 PM
I'm having a problem displaying some related lists using the apex:relatedList tag.

For example, displaying the Activity History related list for a Case works fine:
Code:
<apex:page standardController="Case">
<apex:relatedList list="ActivityHistories" subject="{!case}"/>
</apex:page> 

 


But trying to display the related list for Case Comments does not - I get the error

'CaseComments' is not a valid child relationship name for entity Case

Code:
<apex:page standardController="Case">
<apex:relatedList list="CaseComments" subject="{!case}"/>
</apex:page>

 


This happens with other related lists for Case as well like Case History, Solutions, Case Contact Roles

Is this a bug or am I doing something wrong? I know I can build a section that emulates the related list but it doesn't have built-in support for paging AFAIK.


Message Edited by james2000 on 05-14-2008 04:38 PM
Is there any workaround for creating users in a test method? I can't even compile code with a user insert statement and I get the error "DML not allowed on User".

How am I supposed to get test coverage on an insert trigger on User if I can't create a user in a test method?

I'm sure I can create an insert/update trigger and have code that ignores updates but that is a nasty hack.

I have an application that use the chatter API to upload file attachments as described in the chatter REST API. I'm doing a multiform POST and I am able to upload the file without issue. However, I'm not getting a preview generated. I'm testing with simple image files (png, gif) and no previews are generated. If I create the exact same post with in the web interface, previews are generated. The file name has the file extension and I'm also setting the proper mime type on the binary multiform part.

 

So is preview generation supported when uploading through the API? If it is supported, are there any tricks or options to doing it? My request looks pretty much just like the example in chatter documentation.

 

Thanks

I'm trying to create a user status update and I'm not having any success. I've not been able to find any examples of a chatter POST with a JSON request body. Are there any such examples (preferably a curl example)?

 

Here's what I'm trying 

curl -X POST https://na7.salesforce.com/services/data/v23.0/chatter/feeds/news/me/feed-items -H 'Authorization: OAuth ...' -H 'X-PrettyPrint:1' -H 'Content-Type: application/json; charset=UTF-8' -d "{\"body\":[\"text\":\"hola\", \"type\":\"Text\"]}" -v

 But I get the error:

"Can not deserialize instance of core.chatter.connect.resources.input.MessageBodyInputRepresentation out of START_ARRAY token at [line:1, column:2]",  "errorCode" : "JSON_PARSER_ERROR"

I have an app that uses the REST API with OAuth 2.0 to query for and display Chatter data. The problem I'm having is that profile images don't appear unless the user is logged in to Salesforce. Since an OAuth 2.0 access token is only scoped for API use, is it possible to get profile images to display without having an active session?

I'm developing an integration that needs to make use of the Force.com API. It's my understanding that to execute the API in professional edition, I need an API key. Is it possible to get an API key for just a public AppExchange listing that doesn't have a Salesforce managed package associated with it? If so, how?

 

Thanks

Hi How do I get around this error message...

Collection size 1,609 exceeds maximum size of 1,000.

 

 

public String cname{get; set;} public List<SelectOption> getnames() { List<SelectOption> options = new List<SelectOption>(); List<Contact> namelist = new List<Contact>(); namelist = [Select Id, Name FROM Contact where Recordtype.name='Company' Order by LastName,FirstName]; options.add(new SelectOption('--None--','--None--')); for (Integer j=0;j<namelist.size();j++) { options.add(new SelectOption(namelist[j].Name,namelist[j].Name)); } return options; }

 

 

<td> <apex:outputlabel value="Company Names" for="cnamed" /> <apex:selectList value="{!cname}" size="1" id="cnamed"> <apex:actionSupport event="onchange" reRender="newvalue" /> <apex:selectOptions value="{!names}"/> </apex:selectList> </td>

 Thank you

 

 

I have a managed package installed in a customer org. All debug from my Apex is being filtered out of the debug log. How can I enable debug output for my managed package? Thanks

From within a trigger, I have the need to update the same object. The update will occur asynchronously via a future method and the trigger will check the particular field that is being updated so it won't execute recursively.

 

In practice though, this doesn't appear to be allowed. When I try to execute my code, it doesn't even attempt to run my future method. I get this error:

 

SELF_REFERENCE_FROM_TRIGGER, Object (id = a0h80000001Y4Dd) is currently in trigger XYZ, therefore it cannot recursively update itself: []

 

Why is this prevented? Shouldn't a recursive error only be thrown when true recursion is detected?

 

Are there any workarounds? Thanks

 

I've run into a disconcerting issue while writing a test case: there seems to be at least one case of decimal division that doesn't produce an accurate result. Since we deal with a lot financial/currency calculations, this is a little scary to me. Has anyone seen anything like this before or can anyone tell me if I'm doing something wrong here:

 

 

Decimal num = 2.10;Decimal denom = 2.0;Decimal result = num / denom;System.debug('Result=' + result.setScale(2).toPlainString());if (result != 1.05) System.debug('Not equal!');

 

If I run this code in an anonymous block, it displays the following:


 

20090626192509.249:AnonymousBlock.appirio_sm1: line 4, column 1: Result=1.00

20090626192509.249:AnonymousBlock.appirio_sm1: line 6, column 2: Not equal!

 

Thoughts?

I'm wanting to create a managed package that contains Apex classes and methods that can be called from the org that installs the managed package.

 

I assumed all I had to do was make my Apex classes and methods global using the global keyword. However, when I try to call a method from an org that has the package installed, I get the error "Method does not exist or incorrect signature".

 

I've tried calling the method with and without the namespace. Can someone please tell me if this is supported or if there is some trick to getting this to work?

 

Thanks 

The StandardSetController (or Database.QueryLocator) ignores the SOQL 'where' clause.

Because QueryLocator can only be used with StandardSetController or in managed sharing recalc, I can't test the it separately to see exactly where the bug lies.

This (simplified) example shows the bug in the StandardSetController context.

I have a custom visualforce page that lists users:

Code:
<apex:page controller="CtlBugPgr" title="Bug">
<apex:form>

<apex:pageBlock title="Users" id="UserList">

<apex:pageBlockTable value="{!data}" var="each">
  <apex:column headerValue="Active?">{!each.IsActive}</apex:column>
  <apex:column headerValue="User">{!each.Name}</apex:column>
  <apex:column headerValue="UserType">{!each.UserType}</apex:column>
</apex:pageBlockTable>

</apex:pageBlock>

</apex:form>
</apex:page>

 The controller for this page uses StandardSetController:

Code:
public class CtlBugPgr {

  //-------------------------------------------------------------------------------
  // User List
  //-------------------------------------------------------------------------------
  public User[] data { get { return (List<User>)pgr.getRecords(); } set; }

  public ApexPages.StandardSetController pgr {
    get {
      if (pgr == null) pgr = initPager();
      return pgr;
      }
    set;
    }
  
  //-------------------------------------------------------------------------------
  // privates
  //-------------------------------------------------------------------------------
  private ApexPages.StandardSetController initPager() {
    ApexPages.StandardSetController ret = new ApexPages.StandardSetController(Database.getQueryLocator(
[select Name, UserType, IsActive from User where IsActive = true and UserType = 'Standard']
));
ret.setPageSize(10); // UPDATED: necessary to reproduce bug!
return ret;
} }

 
Note the two conditions in the where clause of the SOQL.

If I run the query directly via "executeAnonymous" I get what I expect:

Code:
> System.debug([select Name, IsActive, UserType from User where IsActive = true and UserType = 'Standard']);

20081125225927.981:AnonymousBlock.i: line 1, column 1: ( User:{UserType=Standard, IsActive=true, Name=John Hart, Id=...})

 
However, in the visualforce page, all Users are returned:






Message Edited by jhart on 11-26-2008 03:25 PM
  • November 25, 2008
  • Like
  • 0
The flex toolkit appears to be broken in flash player 10. I've got a control that works fine in Flash 9 but not Flash 10. Now that Flash 10 is publicly available, this is a big problem.

The log output when making a login call is the following - notice the error on the last line:
Code:
[DEBUG] com.salesforce.Connection App Domain = salesforce.com
[DEBUG] com.salesforce.Connection Api Server name = na3.salesforce.com
[DEBUG] com.salesforce.Connection _internalServerUrl = https://na3.salesforce.com/services/Soap/u/13.0/471700D500000006lQW
[DEBUG] com.salesforce.Connection loading the policy file: https://na3.salesforce.com/services/Soap/cross-domain.xml
[INFO] com.salesforce.Connection Your application must be running on a https server in order to use https to communicate with salesforce.com!
[DEBUG] com.salesforce.Connection invoke getUserInfo
[DEBUG] com.salesforce.Connection intServerUrl is null
[DEBUG] com.salesforce.Connection intServerUrl = https://na3.salesforce.com/services/Soap/u/13.0/471700D500000006lQW
[DEBUG] com.salesforce.Connection _invoke getUserInfo
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer set destination to 'DefaultHTTPS'.
[DEBUG] com.salesforce.Transport object format set
[DEBUG] com.salesforce.events.SendEvent Method name is: getUserInfo
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer sending message '4DA901AD-8C84-8587-37D7-2AC02C68D691'
[DEBUG] mx.messaging.Channel 'direct_http_channel' channel sending message:
(mx.messaging.messages::HTTPRequestMessage)#0
body = "<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner.soap.sforce.com"><sfns:SessionHeader><sessionId>471700D500000006lQW!AQYAQLSyqIEqp.DYDyQydZmx8C1y_CQ8_WgDZpb8S.Cv6zq0sIW5ny4C61NcVSfuIE8QjKgaXv1RpkC8S9m.tcLSv_rQ0ezf</sessionId></sfns:SessionHeader><sfns:CallOptions><client>Appirio/CloudStorage/</client></sfns:CallOptions></se:Header><se:Body><getUserInfo xmlns="urn:partner.soap.sforce.com" xmlns:ns1="sobject.partner.soap.sforce.com"/></se:Body></se:Envelope>"
clientId = (null)
contentType = "text/xml; charset=UTF-8"
destination = "DefaultHTTPS"
headers = (Object)#1
httpHeaders = (Object)#2
Accept = "text/xml"
SOAPAction = """"
X-Salesforce-No-500-SC = "true"
messageId = "4DA901AD-8C84-8587-37D7-2AC02C68D691"
method = "POST"
recordHeaders = false
timestamp = 0
timeToLive = 0
url = "https://na3.salesforce.com/services/Soap/u/13.0/471700D500000006lQW"
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer connected.
[DEBUG] com.salesforce.events.SendEvent Method name is: getUserInfo
[INFO] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer acknowledge of '4DA901AD-8C84-8587-37D7-2AC02C68D691'.
[ERROR] mx.messaging.Producer '87CD1CD3-FFAD-680D-6681-2AC02C6366BD' producer fault for '4DA901AD-8C84-8587-37D7-2AC02C68D691'.

 Is there a plan to fix this or does anyone have any work around?

Hi,

    I want to change the double value to Integer Value.
    My field datatype is number(15,0) but it is returning a double value like 1234.0
    I want to show this value as 1234.
    Any help on this.

    Thanks in advance.
I'm trying to build an edit page that contains a save and cancel button. The page has a required field and also has a custom controller.

The problem is that when I press the cancel button to invoke my cancel action, the cancel action is not invoked and instead the page displays an error that I must enter a value for the required field if I have no text in the field.

Is there a way to have this logic bypassed for a cancel action?


Code:
<apex:page controller="NewCaseCommentController" tabStyle="Case">
  <apex:sectionHeader title="Comments" subtitle="Case {!parentCase.CaseNumber}" help="/help/doc/user_ed.jsp—loc=help&target=case_comments_edit.htm&section=Cases"/>
  <apex:form>
    <apex:pageBlock title="Case Comment Edit" mode="edit">
      <apex:pageBlockButtons>
        <apex:commandButton action="{!save}" value="Save"></apex:commandButton>
        <apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="Case Details" columns="1">
        <apex:outputField value="{!parentCase.Subject}"/>
        <apex:outputField value="{!parentCase.Description}"/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Case Comments" columns="1">
        <apex:pageBlockSectionItem>
          <apex:outputLabel value="Public" for="comment__ispublished" style="text-align:center;"/>
          <apex:inputCheckbox value="{!comment.IsPublished}" id="comment__ispublished"></apex:inputCheckbox>
        </apex:pageBlockSectionItem>
        <apex:pageBlockSectionItem>
          <apex:outputLabel value="Comment" for="comment__commentbody"/>
          <apex:inputField value="{!comment.CommentBody}" required="true" id="comment_commentbody" style="width:450px; height:135px"/>
        </apex:pageBlockSectionItem>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
  <!-- apex:relatedList does not work for CaseComments -->
  <apex:pageBlock title="Case Comments" helpUrl="/help/doc/user_ed.jsp–loc=help&target=case_comments.htm&section=Cases" helpTitle="Case Comments Help">
    <apex:pageBlockList value="{!existingComments}" var="ec">
      <apex:column headerValue="Public" headerStyle="text-align:middle;"><apex:outputField value="{!ec.IsPublished}"/></apex:column>
      <apex:column headerValue="Comment"><b>Created By: &nbsp;<apex:outputLink value="/{!ec.CreatedById}">{!ec.CreatedBy.Name}</apex:outputLink> (<apex:outputField value="{!ec.CreatedDate}"/>)</b><br /><apex:outputField value="{!ec.CommentBody}"/></apex:column>
    </apex:pageBlockList>
  </apex:pageBlock>

</apex:page>

 Thanks

I'm not able to get the required attribute on input controls to correctly display the red bar next to the control.

For example:
Code:
<apex:page standardController="Case">
  <apex:form>
    <apex:pageBlock title="Case Edit" mode="edit">
        <apex:pageBlockButtons>
          <apex:commandButton action="{!save}" value="Save"></apex:commandButton>
          <apex:commandButton action="{!cancel}" value="Cancel"></apex:commandButton>
        </apex:pageBlockButtons>
      <apex:pageBlockSection title="Case Comments" columns="1">
        <apex:pageBlockSectionItem>
          <apex:outputLabel value="Subject" for="case__subject"/>
          <apex:inputText required="true" value="{!case.Subject}"/>
        </apex:pageBlockSectionItem>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

 


If I change inputText to inputField, the control will display properly. From the documentation, it appears to me that this should work with inputText, inputTextarea, etc.


Message Edited by james2000 on 05-14-2008 04:37 PM
Hi
The flash player 124 seems to be restricting cross domain requests to salesforce. I see the request from cross domain swf's are getting
sandbox violation error.

Error: Request for resource at https://na5.salesforce.com/services/Soap/u/10.0/462300D70000000IjhM by requestor from <externaldomain/swf>  is denied due to lack of policy file permissions.
*** Security Sandbox Violation ***
Connection to https://na5.salesforce.com/services/Soap/u/10.0/462300D70000000IjhM halted - not permitted from <externaldomain/swf>

how to resolve this issue ? Anybody from salesforce shed more light on this ?

More about this issue,

http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security_04.html



Message Edited by xraydeltaone on 04-16-2008 12:46 PM