• Thys Michels
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies

Just going through the sample describe in Force.com Streaming API developer guide.  I have created the Push Topic and sucessfully tested on Workbench.  Now want to see if I can have external java client to receive the same notification message.

 

So I get all the jar file and sample code into eclipse.  Changed the user and password.  But cannot seem to get it going.  Keep getting login fail.  What other step do i need to get this example running?

 

Running streaming client example....
Login Failed!
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sf="urn:fault.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultcode>UNKNOWN_EXCEPTION</faultcode><faultstring>UNKNOWN_EXCEPTION: Element type &quot;soapenv:Envelope&quot; must be followed by either attribute specifications, &quot;&gt;&quot; or &quot;/&gt;&quot;.</faultstring><detail><sf:UnexpectedErrorFault xsi:type="sf:UnexpectedErrorFault"><sf:exceptionCode>UNKNOWN_EXCEPTION</sf:exceptionCode><sf:exceptionMessage>Element type &quot;soapenv:Envelope&quot; must be followed by either attribute specifications, &quot;&gt;&quot; or &quot;/&gt;&quot;.</sf:exceptionMessage></sf:UnexpectedErrorFault></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>

  • April 28, 2012
  • Like
  • 0

Hi all,

 

I'm trying to build a dataList with data from a query with a sub-query. This is the VF markup:

 

<apex:page standardController="Application__c" extensions="getDataFinalReport" tabStyle="Application__c" >

  <apex:pageBlock title="Candidates">
  <apex:form id="theForm">
    <apex:pageBlockSection showHeader="true" title="List of Candidates" >
      <apex:dataList var="a" value="{!can}" type="1">
      <apex:outputText value="{!can.Candidate_Full_Name__c}"/>
      </apex:dataList>
    </apex:pageBlockSection>
    
  </apex:form> 
  </apex:pageBlock>

</apex:page>

 

And this is the controller extension:

 

public with sharing class getDataFinalReport {

    public getDataFinalReport(ApexPages.StandardController controller) {

    }
    
    string JobOrderId = ApexPages.currentPage().getParameters().get('id');
    
    public ApexPages.StandardSetController can {
        get {
            if(can == null) {
                can = new ApexPages.StandardSetController(Database.getQueryLocator(
                
                [SELECT 
                        (SELECT Candidate_Full_Name__c 
                         FROM Application__c)
                 FROM Job_Order t 
                 WHERE Id=:JobOrderId]));
            }
            return can;
        }
        set;
    }

    // Initialize can and return a list of records  
    
    public List<ts2__Application__c > getCandidateLines() {
         return (List<ts2__Application__c >) can.getRecords();
    }
        
    
}

 

The problem now is that, when I try to save the VF gives me the following error:

 

Error: Unknown property 'ApexPages.StandardSetController.Candidate_Full_Name__c'

 

I tried creating the get/set for Candidate_Full_Name__c but it doesn't work either , can anyone help me with this?

 

Many thanks,

 

MGA

Hi all,

 

I'm trying to start a Job via the Bulk API to query the AccountHistory table, but I get this error:

 

'Unknown exception in Async API. Please contact support with ID: ###'

 

Same goes for LeadHistory, etc.  Are the History tables not supported in the Bulk query API?

 

Thanks!

Chung

First, my apologize for all of you who feel like you've answered this question a 100 times.  I've read all your responses but am still not able to get my DatePicker to appear.

 

I have a custom controller and an InputText field id="cDate".  Here's what I've done:

 

  • I've downloaded the jQuery library and uploaded the zip file as a Static Recource called "jQueryUI"
  • I've added the following code to the top of my VF page:
<apex:page Controller="conAttendanceTaking">
<apex:form >
<head> 
    <apex:includeScript value="{!URLFOR($Resource.jQueryUI, '/js/jquery-1.4.2.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.jQueryUI, '/js/jquery-ui-1.8.10.custom.min.js')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.jQueryUI, 'css/ui-lightness/jquery-ui-1.8.10.custom.css')}"/>


    <script type="text/javascript">
        var j$ = jQuery.noConflict();
        j$(document).ready(function(){
        
            j$("#cDate").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true});
        });
     </script>
</head>
// VF code continues from here....
  •  Added my text field to the body of my VF page:
            <apex:outputLabel value="Class Date (yyyy-mm-dd)" for="ClassDate"/>
            <apex:inputText disabled="false" id="cDate" value="{!ClassDate}"/>

 

In my controller class is written and my page works fine with the exception of this date.  I'd like to have the datepicker appear when the inputText receives focus.  What am I doing wrong?

 

Thanks!

 

 

conAttendanceTaking

i have been trying to get datepicker to work with my visualforce page. I set it up but i can not get the calendar to pop up. 

Here is my code:

 

 

<apex:page controller="testController">
<link type="text/css" href="{!URLFOR($Resource.css)}" rel="stylesheet" />
<script type="text/javascript" src="{!URLFOR($Resource.Jquery)}"></script>
<script type="text/javascript" src="{!URLFOR($Resource.core)}"></script>
<script type="text/javascript" src="{!URLFOR($Resource.Datepicker)}"></script>
 
<input id="datepicker" type="textbox" />
<script type="text/javascript">
    $(function() {
        $(“#datepicker”).datepicker();
    });
    </script>
 
<apex:form >
 <apex:inputText value="{!inputValue}" id="datepicker"/><br/>
 <apex:commandButton action="{!testAction}" value="testButton"/>
 </apex:form>
</apex:page>

 

 

Thanks for any help you can give.

Is there any way to get the profile name of logged in user without querying the user object.

 

I know the following solution:

 

String usrProfileName = [select u.Profile.Name from User u where u.id = :Userinfo.getUserId()].Profile.Name;

 

Instead of this I want to save 1 query so if there is any method to get the profile name in apex without firing the query please let me know.

 

Thanks,

Hello All,

 

I'm receiving a compile error -

 

(Error: Compile Error: Initial term of field expression must be a concrete SObject: LIST:SOBJECT:Lead at line 21 column 29)

 

for the following trigger code which I found in the salesforce wiki.  I'm unsure what is wrong with the "Initial term", can anyone help with this?

 

 

 

/* * Simple round robbin lead assignment, * trigger assumes the following custom fields on the User object * User. * Receiving_Leads__c -- are they open for new leads at this time * Open_Leads_Owned__c -- how many leads do they have right now * * if no matching new owner is found the default for the org is the new owner */ trigger triggerLeadRoundRobin on Lead ( before insert , after insert, after update , after delete) { if (Trigger.isBefore && Trigger.isInsert) { // find the user who can accept leads and which has the fewest at the moment Double least = 99999; // start with large number, find which user has least for ( User u : [select id,lastname,Open_Leads_Owned__c from User where isActive = true and Receiving_Leads__c = true]) { if ( u.Open_Leads_Owned__c == null || u.Open_Leads_Owned__c < least) { Trigger.new.ownerid = u.id; // this user will own the new lead least = u.Open_Leads_Owned__c; // changes owner before record is inserted } } } /* remaining code will keep the (summary field) Open_Leads_Owned__c * uptodate on each user record adjusts the value on insert, delete and transfer */ if (Trigger.isAfter) { if (Trigger.isInsert) { System.assert(Trigger.old == null,' old data row cannot exist at insert?'); System.assert(Trigger.new != null,' expected new object row in isInsert'); leadOwnerRelation.updateOpenLeadCount( Trigger.new.ownerid ); // call to a package } else if (Trigger.isUpdate ) { // as in change owner // here we have to recalc both the old owner and new owner System.assert(Trigger.old != null,' old data row must exist at update'); System.assert(Trigger.new != null,' what, no new in Trigger data in update'); if (Trigger.old.ownerid != Trigger.new.ownerid ) { // update includes a transfer owner leadOwnerRelation.updateOpenLeadCount( Trigger.old.ownerid ); leadOwnerRelation.updateOpenLeadCount( Trigger.new.ownerid ); } } else if (Trigger.isDelete) { System.assert(Trigger.old != null,' old data row must exist at delete time'); System.assert(Trigger.new == null,' cant have new object in isDelete'); leadOwnerRelation.updateOpenLeadCount( Trigger.old.ownerid ); } } } // end of trigger