• fullvalue
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 25
    Replies
Hi I'm wondering if someone can help me.  I just started using Visualforce.  Here is the situation.

I am trying to display opportunity line items with a job number associated to them.  The association is through opportunity.

Opportunity parent of Opportunity Line Items
Opportunity parent of Project

I need to display opportunity line items with a field on the Project.  I have created a map with the data but don't know how to display it in a visualforce page. 

Here is the code to produce the map. 

Code:
private set<ID> opptIds = new set<ID>();
private List<OpportunityLineItem> products = new List<OpportunityLineItem>();
private Map<ID,Project__c> opptproj = new Map<ID,Project__c>();
private Map<String,OpportunityLineItem> jnoli = new Map<String,OpportunityLineItem>();

for (SFDC_Project__c p : [SELECT Opportunity__c from Project__c where Branch__c = :branch]) {
       opptproj.put(p.Opportunity__c,p);
       opptIds.add(p.Opportunity__c);
     }

products = [select Quantity, PricebookEntry.Product2.ProductCode,OpportunityId from OpportunityLineItem where OpportunityId in :opptIds];
 for (Integer i = 0; i <products.size(); i++) {
     jnoli.put(opptproj.get(products[i].OpportunityId).Job_Number__c,products[i]);
 }

Here is the visualforce page.  I got this to work with products but I need to display Job Number so therefore need to do something with the map.

Code:
<apex:repeat value="{!products}" var="product">
{!product.PricebookEntry.Product2.ProductCode}
{!product.Quantity}
<br/>
<br/>
</apex:repeat>

 Maybe there is a better way of doing this.

Any help would be great.  Thanks!

 

Anyone seen this error before?  I am trying to run a flex app on a web server.


(com.salesforce.events::ApexFaultEvent)#0

  bubbles = false

  cancelable = true

  context = (null)

  currentTarget = (null)

  eventPhase = 2

  fault = (mx.rpc::Fault)#1

    errorID = 0

    faultCode = "Server.Error.Request"

    faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0"

    faultString = "HTTP request error"

    message = "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0'"

    name = "Error"

    rootCause = (flash.events::IOErrorEvent)#2

      bubbles = false

      cancelable = false

      currentTarget = (flash.net::URLLoader)#3

        bytesLoaded = 0

        bytesTotal = 0

        data = (null)

        dataFormat = "text"

      eventPhase = 2

      target = (flash.net::URLLoader)#3

      text = "Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"

      type = "ioError"

  message = (mx.messaging.messages::ErrorMessage)#4

    body = (Object)#5

    clientId = "DirectHTTPChannel0"

    correlationId = "026E48D3-1BFD-8AA6-A5D6-CDE8A1C8B7D8"

    destination = ""

    extendedData = (null)

    faultCode = "Server.Error.Request"

    faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0"

    faultString = "HTTP request error"

    headers = (Object)#6

    messageId = "154CD995-435D-2011-47FB-CDE8A2A25895"

    rootCause = (flash.events::IOErrorEvent)#2

    timestamp = 0

    timeToLive = 0

  messageId = "154CD995-435D-2011-47FB-CDE8A2A25895"

  target = (null)

  token = (mx.rpc::AsyncToken)#7

    message = (mx.messaging.messages::HTTPRequestMessage)#8

      body = "<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner.soap.sforce.com"/><se:Body><login xmlns="urn:partner.soap.sforce.com" xmlns:ns1="sobject.partner.soap.sforce.com"><username>xxxxxxxx@xxxxxx.com</username><password>xxxxxxxxxxxxx9KYz1Hmt965XXXXQcNVpjaq61</password></login></se:Body></se:Envelope>"

      clientId = (null)

      contentType = "text/xml; charset=UTF-8"

      destination = "DefaultHTTP"

      headers = (Object)#9

        DSEndpoint = "direct_http_channel"

      httpHeaders = (Object)#10

        Accept = "text/xml"

        SOAPAction = """"

        X-Salesforce-No-500-SC = "true"

      messageId = "026E48D3-1BFD-8AA6-A5D6-CDE8A1C8B7D8"

      method = "POST"

      recordHeaders = false

      timestamp = 0

      timeToLive = 0

      url = "http://www.salesforce.com/services/Soap/u/11.0"

    responders = (Array)#11

      [0] (::SalesForceResponder)#12

    result = (null)

  type = "fault"

Hello,
I am trying to create a custom link that executes javascript.  I am getting an  "unterminated string literal" error.  The following is the only thing I have in the custom link. 

var SPSTREET = "{!Account.ShippingStreet}";

I figured out that the error occurs when the shipping street address has more than one line entered. I am using inline editing.

Any Ideas?
Hi All,
    I have a flex app in a scontrol using the flex toolkit.  I get the error message below from IE.  It is not consinstant but only seems to happen in IE.  Also, it only seems to just started happening.  Help Please!

fault from operation: (mx.rpc::Fault)#0
  errorID = 0
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://na1.salesforce.com/services/Soap/u/10.0/111400D300000001JdX"
  faultString = "HTTP request error"
  message = "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://na1.salesforce.com/services/Soap/u/10.0/111400D300000001JdX'"
  name = "Error"
  rootCause = (flash.events::IOErrorEvent)#1
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#2
      bytesLoaded = 0
      bytesTotal = 0
      data = (null)
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#2
    text = "Error #2032"
    type = "ioError"
 

Because of this line

xmlns:mx="http://www.adobe.com/2006/mxml"

in my Flex application IE gets an error about displaying both secure and nonsecure items.  Is there a way to prevent this from happening other than changing IE settings. 

Thanks for any help!
So in the Ajax toolkit I can do as follows:

Code:
     var project = new sforce.SObject("Project");
     project.set("Id", id);
     project.set(field, newval);
var callback = {onSuccess : success, onFailure : log}
var result = sforce.connection.update([project],callback);

 The .set allowed me to use a variable as the field name.  How can I do this in the Flex toolkit? 


Thanks

Message Edited by fullvalue on 09-19-2007 06:00 PM

 Does anyone have a good suggestion for setting the default value of the combo box?  I query a record and want to set the value of the combo box.  I believe it needs to be set by seletedIndex.


Thanks for the help! 
Can anyone offer some advice for speeding up my Dojo app?

I am already using parseWidgets: false.


Anything else? 
Let me explain.  I am building a new page via s-control that is ajax and dojo.  I have a need to add a owner to the record on this page.  I would like to use the popup window that Salesforce uses when assigning a user to a record.  How can I do this?  Or should I just create my own? 


Thanks!
Has anyone used Dojo ComboBox with picklist values from Salesforce?  I have the code to get the picklist values but can't seem to figure out how to have it populate the ComboBox. 
Hi I'm wondering if someone can help me.  I just started using Visualforce.  Here is the situation.

I am trying to display opportunity line items with a job number associated to them.  The association is through opportunity.

Opportunity parent of Opportunity Line Items
Opportunity parent of Project

I need to display opportunity line items with a field on the Project.  I have created a map with the data but don't know how to display it in a visualforce page. 

Here is the code to produce the map. 

Code:
private set<ID> opptIds = new set<ID>();
private List<OpportunityLineItem> products = new List<OpportunityLineItem>();
private Map<ID,Project__c> opptproj = new Map<ID,Project__c>();
private Map<String,OpportunityLineItem> jnoli = new Map<String,OpportunityLineItem>();

for (SFDC_Project__c p : [SELECT Opportunity__c from Project__c where Branch__c = :branch]) {
       opptproj.put(p.Opportunity__c,p);
       opptIds.add(p.Opportunity__c);
     }

products = [select Quantity, PricebookEntry.Product2.ProductCode,OpportunityId from OpportunityLineItem where OpportunityId in :opptIds];
 for (Integer i = 0; i <products.size(); i++) {
     jnoli.put(opptproj.get(products[i].OpportunityId).Job_Number__c,products[i]);
 }

Here is the visualforce page.  I got this to work with products but I need to display Job Number so therefore need to do something with the map.

Code:
<apex:repeat value="{!products}" var="product">
{!product.PricebookEntry.Product2.ProductCode}
{!product.Quantity}
<br/>
<br/>
</apex:repeat>

 Maybe there is a better way of doing this.

Any help would be great.  Thanks!

 

Anyone seen this error before?  I am trying to run a flex app on a web server.


(com.salesforce.events::ApexFaultEvent)#0

  bubbles = false

  cancelable = true

  context = (null)

  currentTarget = (null)

  eventPhase = 2

  fault = (mx.rpc::Fault)#1

    errorID = 0

    faultCode = "Server.Error.Request"

    faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0"

    faultString = "HTTP request error"

    message = "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0'"

    name = "Error"

    rootCause = (flash.events::IOErrorEvent)#2

      bubbles = false

      cancelable = false

      currentTarget = (flash.net::URLLoader)#3

        bytesLoaded = 0

        bytesTotal = 0

        data = (null)

        dataFormat = "text"

      eventPhase = 2

      target = (flash.net::URLLoader)#3

      text = "Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"

      type = "ioError"

  message = (mx.messaging.messages::ErrorMessage)#4

    body = (Object)#5

    clientId = "DirectHTTPChannel0"

    correlationId = "026E48D3-1BFD-8AA6-A5D6-CDE8A1C8B7D8"

    destination = ""

    extendedData = (null)

    faultCode = "Server.Error.Request"

    faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.salesforce.com/services/Soap/u/11.0"]. URL: http://www.salesforce.com/services/Soap/u/11.0"

    faultString = "HTTP request error"

    headers = (Object)#6

    messageId = "154CD995-435D-2011-47FB-CDE8A2A25895"

    rootCause = (flash.events::IOErrorEvent)#2

    timestamp = 0

    timeToLive = 0

  messageId = "154CD995-435D-2011-47FB-CDE8A2A25895"

  target = (null)

  token = (mx.rpc::AsyncToken)#7

    message = (mx.messaging.messages::HTTPRequestMessage)#8

      body = "<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner.soap.sforce.com"/><se:Body><login xmlns="urn:partner.soap.sforce.com" xmlns:ns1="sobject.partner.soap.sforce.com"><username>xxxxxxxx@xxxxxx.com</username><password>xxxxxxxxxxxxx9KYz1Hmt965XXXXQcNVpjaq61</password></login></se:Body></se:Envelope>"

      clientId = (null)

      contentType = "text/xml; charset=UTF-8"

      destination = "DefaultHTTP"

      headers = (Object)#9

        DSEndpoint = "direct_http_channel"

      httpHeaders = (Object)#10

        Accept = "text/xml"

        SOAPAction = """"

        X-Salesforce-No-500-SC = "true"

      messageId = "026E48D3-1BFD-8AA6-A5D6-CDE8A1C8B7D8"

      method = "POST"

      recordHeaders = false

      timestamp = 0

      timeToLive = 0

      url = "http://www.salesforce.com/services/Soap/u/11.0"

    responders = (Array)#11

      [0] (::SalesForceResponder)#12

    result = (null)

  type = "fault"

Hi All,
    I have a flex app in a scontrol using the flex toolkit.  I get the error message below from IE.  It is not consinstant but only seems to happen in IE.  Also, it only seems to just started happening.  Help Please!

fault from operation: (mx.rpc::Fault)#0
  errorID = 0
  faultCode = "Server.Error.Request"
  faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://na1.salesforce.com/services/Soap/u/10.0/111400D300000001JdX"
  faultString = "HTTP request error"
  message = "faultCode:Server.Error.Request faultString:'HTTP request error' faultDetail:'Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]. URL: https://na1.salesforce.com/services/Soap/u/10.0/111400D300000001JdX'"
  name = "Error"
  rootCause = (flash.events::IOErrorEvent)#1
    bubbles = false
    cancelable = false
    currentTarget = (flash.net::URLLoader)#2
      bytesLoaded = 0
      bytesTotal = 0
      data = (null)
      dataFormat = "text"
    eventPhase = 2
    target = (flash.net::URLLoader)#2
    text = "Error #2032"
    type = "ioError"
 

Because of this line

xmlns:mx="http://www.adobe.com/2006/mxml"

in my Flex application IE gets an error about displaying both secure and nonsecure items.  Is there a way to prevent this from happening other than changing IE settings. 

Thanks for any help!
So in the Ajax toolkit I can do as follows:

Code:
     var project = new sforce.SObject("Project");
     project.set("Id", id);
     project.set(field, newval);
var callback = {onSuccess : success, onFailure : log}
var result = sforce.connection.update([project],callback);

 The .set allowed me to use a variable as the field name.  How can I do this in the Flex toolkit? 


Thanks

Message Edited by fullvalue on 09-19-2007 06:00 PM

 Does anyone have a good suggestion for setting the default value of the combo box?  I query a record and want to set the value of the combo box.  I believe it needs to be set by seletedIndex.


Thanks for the help! 
Hi,
 
I'm trying to use the flex toolkit.  I can run the salesforce.mxml app with no problems locally, but receive security sandbox errors when running from a server.  I can see the apex login call is finding a cross-domain.xml file, but i still receive the violation.
 
The domain the toolkit requests data from is: .../services/Soap/u/9.0
 
but the file is at  .../services/Soap/u/cross-domain.xml.
 
Does anyone know if it's location is an issue, or is there something else I'm doing wrong?
 
Thanks.  It sure seems like a great tool if I can deploy it.
 
Jay