• Peter Kaye
  • NEWBIE
  • 70 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 17
    Replies
$query = "SELECT count() from Normal_Service__c ";

$response = $mySforceConnection->countQuery($query);

print_r ($response);

$mySforceConnection returns a value to show a connection to the database. 
Any ideas why this code fails to fill the variable $response with the number of records in the custom object Normal_Service__c ?   Thanks.
I have a php script that retrieves Salesforce data from a number of objects  without issue.  I have just added a new custom object which  currently only retrieves the id field from simple SQL like:
$query = "SELECT id, IsDeleted, Name from Normal_Service__c ";

Here is  result of printing out $result
 
QueryResult Object
(
    [queryLocator] => 
    [done] => 1
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [Id] => a0W58000005yWfMEAU
                )

            [1] => stdClass Object
                (
                    [Id] => a0W58000005zAwtEAE
                )

        )

I have re-built the Enterpise WSDL for the new object  Normal_Service__c:
 
<complexType name="Normal_Service__c">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="AttachedContentDocuments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="AttachedContentNotes" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Attachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Attendance__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="Children__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="CombinedAttachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Communicants__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="ContentDocumentLinks" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="CreatedBy" nillable="true" minOccurs="0" type="ens:User"/>
<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="DuplicateRecordItems" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Emails" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Envelopes__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="EventRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="FeedSubscriptionsForEntity" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="IsDeleted" nillable="true" minOccurs="0" type="xsd:boolean"/>
<element name="LastModifiedBy" nillable="true" minOccurs="0" type="ens:User"/>
<element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="LastReferencedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="LastViewedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Leader_Comments__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="LookedUpFromActivities" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Music_Person__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Music__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Notes" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="NotesAndAttachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Owner" nillable="true" minOccurs="0" type="ens:Name"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="Plate__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="ProcessInstances" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="ProcessSteps" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Readers__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="RecordAssociatedGroups" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Refreshments__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Sermon_Key_Points__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Sermon_Title__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Notices__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Readings__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Set_Up__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Taster__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service__c" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="Service__r" nillable="true" minOccurs="0" type="ens:Service3__c"/>
<element name="Sidespersons__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="TaskRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="TopicAssignments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="UserRecordAccess" nillable="true" minOccurs="0" type="ens:UserRecordAccess"/>
</sequence>
</extension>
</complexContent>
</complexType>

Any thoughts on what I might be doing wrong ?  Thanks.

 
I have a number of scripts that use the Developerforce php toolkit and connect to SF by a personal  security token for a user whose password never expires. Here is a code example:
 
define("USERNAME", "xxxxxx@yyyyy.it");
define("PASSWORD", "***********");

define("SECURITY_TOKEN", "abcdefghijklmnopqrs");

require_once ('soapclient/SforceEnterpriseClient.php');
$mySforceConnection = new SforceEnterpriseClient();
$mySforceConnection->createConnection("soapclient/enterprise.wsdl.xml");
$mySforceConnection->login(USERNAME, PASSWORD.SECURITY_TOKEN);
I don't believe that code such as above relates to any self-signed certication and therefore I do not need to take any action to renew the certificate or obtain a new security token.   But I would like confirmation on this as a number of important scripts will stop working at the the certicate expiry date if I am wrong !  I raised an SF case on this but received no definitive answer, they recommended a Forum post.   Thanks.
 
Why do some custom objects show deleted items in SOQL queries and others don't ?
I have two SOQL queries for different custom objects both with deleted items ( as seen in the Recycle bin ) and both including the IsDeleted field. Niether query has any WHERE statement.  For one object the query retrieves records where IsDeleted = 1 or blank.  But for the other object only IsDeleted = blank   records show..  Why is this ?  Is there some object setting that could explain this.  Thanks. 
I am trying to rehearse trigger deployment with a simple test example.  Here is the trigger and the test code.
 
trigger HelloWorldTrigger on Book__c(before insert) {

    Book__c[] books = Trigger.new;
    MyHelloWorld.applyDiscount(books);
}


@isTest
    private class HelloWorldTestClass {
        static testMethod void validateHelloWorld() {
           Book__c b = new Book__c(Name='Behind the Cloud', Price__c=100);
           System.debug('Price before inserting new book: ' + b.Price__c);
     
           // Insert book
           insert b;
         
           // Retrieve the new book
           b = [SELECT Price__c FROM Book__c WHERE Id =:b.Id];
           System.debug('Price after trigger fired: ' + b.Price__c);
     
           // Test that the trigger correctly updated the price
           System.assertEquals(90, b.Price__c);
        }
    }
I have successfully deployed the trigger but it it fails to function because of  insufficient code coverage.

This is the error message.

User-added image
This is the information from the developer console
User-added image
The trigger coverage is 100% which I thought was enough.

I am obviously missing something important so I'd apprecaite any help to:
  • Identify what code I need to add to the test class above to meet the coverage requirements.
  • Explain how I can tell from the developer console whether  tests for other triggers will pass coverage requirements.
Thanks.

 
I want to create a SOQL query which groups data based on collections of values for a field.   So  if I have a field Type with values A,B,C....K , I want to order the records by a GroupCode where  Group1 - A,D,F  Group2  B,C,K   Group 3   E,J.

I could solve this with a custom field and a workflow to calculate the GroupCode value on create or amend.  But it would be easier to do this in the SOQL statement if this were possible.

Any advice here much appreciated.  Thanks.

 
I am searching for some example SOQL that I can use in a php script that will retrieve all records for a specified object which have been deleted since a specified date and time.  Please can someone point me in the right direction on this.  Thanks.
php 7 gives the following deprecated method warning when used with the current ( Version 20 ? ) of the php developer toolkit:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SforceEnterpriseClient has a deprecated constructor in /home/sites/xxxx.xom/mmc4/soapclient/SforceEnterpriseClient.php on line 38

Is there any workaround for this ?  When is it likely a new release will be available  that works with 7.x without giving this warning ?  Thanks.
 
Is there any way I can achieve the functionality of MySQL LIMIT with SOQL ?  For example to replicate the current code:
 
    $rs = mysql_query("select count(*) from users");
	$row = mysql_fetch_row($rs);
	$result["total"] = $row[0];
	$rs = mysql_query("select * from users limit $offset,$rows");
	
	$items = array();
	while($row = mysql_fetch_object($rs)){
		array_push($items, $row);
	}
	$result["rows"] = $items;

	echo json_encode($result);
The bit I need help with is the SQL  "select * from users limit $offset,$rows"  .  $offset and $rows are parameters which represent a selection of the returned records - say your SOQL without the parameters returns 2K records you could then generate JSON for records  200 to 500 , 500 to 700 etc and pass these into a javascript data grid.

Any thoughts or advice on this very welcome !
 
I am struggling with SOQL code with the php toolkit to retrieve the total number of records in a custom object table.  I have copied the apporach which is working for an ordinary SELECT query which retrieves multiple records.

Here is is the code that fails to fill the variable  $numRecs
 
$query = "SELECT COUNT() FROM Service3__c";
$response = $mySforceConnection->query($query);

foreach ($response->records as $record) {
  $numRecs = $record->Count();
}

echo $numRecs;

What have I got wrong ?  Thanks.
I want to convert a date time like 2016-09-01 17:49:46 to 2016-09-01T17:49:46Z.

The best I can manage so far is:

$the_date = "2016-09-01 17:49:46"

date("Y-d-mTG:i:sz",$the_date)  which gives  2016-01-09UTC17:49:46244

What is the correct way to get the date time format that will work in a SOQL query ? Thanks.

 
The days when you got a full copy of the production database as a sandbox without paying seem to have gone.

I am using the Developer Pro Sandbox in an Enterprise Edition.  When created it seems to contain all the custom objects from production but without any data.  I can import a sub-set of data using Data Loader but some of the objects have look-ups to other objects.  Since you cannot import Id values how can I import data with related ID's without editing the import file - i.e replacing the old ID values with those which apply in the Sandbox ?

I hope I am missing something really obvious as editing data which is supposed to be represetnative of live data does not seem to me a good idea - quite apart from the time involved.  Thanks.
 
I have a php script that uses the php Developer toolkit and is correctly retrieving data into a table.  I added a new custom field and re-generated the WSDL  but no data is retrieved.  Firebug shows no errors. The problem looks as though it relates to the new field addition because if I replace the new field with an existing field everything works as it should.
 
$query = "SELECT Service_Date__c, Lectionarysv__c, LectionaryNew__c, Service_Time__c, CreatedDate, Notes__c, Leader__c, Location__c, Service_Type__c,  Lectionary6__r.Lectionary_Date__c,Lectionary6__r.Colour__c,Lectionary6__r.Period_Name__c, Lectionary6__r.Selected_Reading_Line__c from Service3__c WHERE Web_Publish__c = True ORDER BY Service3__c.Service_Date__c, Service3__c.Service_Time__c
";
The new field causing the problem is LectionaryNew__c .
..
echo "<td>".$record->Leader__c."</td>";
echo "<td>".$record->LectionaryNew__c."</td>";
The Leader__c field displays correctly but no data appears for LectionaryNew__c .

The entry in the WSDL is
Line 9013: <element name="LectionaryNew__c" nillable="true" minOccurs="0" type="xsd:string"/>
LectionaryNew__c is a text field  200 characters.  I have checked that there is data in the field in the database.


Where should I look to find out what is causing this problem ?   Thanks
..



 
I want to update a datetime field from a date field and a time pick list.  The SF system has users in a fixed time zone with a twice yearly daylight saving adjustment which I think means I cannot use a formula and therefore require an Apex Trigger on BeforeInsert and BeforeUpdate.  It's more than 12 months since I wrote any Apex so I hope someone can get me started on this !   Thanks.
Back in 2013 I used the code in the Excel Connector to get the SF objects needed for ODBC access to the SF database.  Recently I tried to re-run this code and it failed to connect to the current SF release  - 2015.  I now have another use for getting SF data into a VBA script.   All the downloadable code currently available is old -   2011 or earlier -  so it seems to me likely that the object library is now inconsistent with current SF.

Is anyone using the Excel Connector with Winter '16 ?

Thanks.
$query = "SELECT count() from Normal_Service__c ";

$response = $mySforceConnection->countQuery($query);

print_r ($response);

$mySforceConnection returns a value to show a connection to the database. 
Any ideas why this code fails to fill the variable $response with the number of records in the custom object Normal_Service__c ?   Thanks.
I have a php script that retrieves Salesforce data from a number of objects  without issue.  I have just added a new custom object which  currently only retrieves the id field from simple SQL like:
$query = "SELECT id, IsDeleted, Name from Normal_Service__c ";

Here is  result of printing out $result
 
QueryResult Object
(
    [queryLocator] => 
    [done] => 1
    [records] => Array
        (
            [0] => stdClass Object
                (
                    [Id] => a0W58000005yWfMEAU
                )

            [1] => stdClass Object
                (
                    [Id] => a0W58000005zAwtEAE
                )

        )

I have re-built the Enterpise WSDL for the new object  Normal_Service__c:
 
<complexType name="Normal_Service__c">
<complexContent>
<extension base="ens:sObject">
<sequence>
<element name="AttachedContentDocuments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="AttachedContentNotes" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Attachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Attendance__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="Children__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="CombinedAttachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Communicants__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="ContentDocumentLinks" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="CreatedBy" nillable="true" minOccurs="0" type="ens:User"/>
<element name="CreatedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="CreatedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="DuplicateRecordItems" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Emails" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Envelopes__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="EventRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="FeedSubscriptionsForEntity" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="IsDeleted" nillable="true" minOccurs="0" type="xsd:boolean"/>
<element name="LastModifiedBy" nillable="true" minOccurs="0" type="ens:User"/>
<element name="LastModifiedById" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="LastModifiedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="LastReferencedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="LastViewedDate" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="Leader_Comments__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="LookedUpFromActivities" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Music_Person__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Music__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Name" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Notes" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="NotesAndAttachments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Owner" nillable="true" minOccurs="0" type="ens:Name"/>
<element name="OwnerId" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="Plate__c" nillable="true" minOccurs="0" type="xsd:double"/>
<element name="ProcessInstances" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="ProcessSteps" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Readers__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="RecordAssociatedGroups" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="Refreshments__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Sermon_Key_Points__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Sermon_Title__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Notices__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Readings__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Set_Up__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service_Taster__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="Service__c" nillable="true" minOccurs="0" type="tns:ID"/>
<element name="Service__r" nillable="true" minOccurs="0" type="ens:Service3__c"/>
<element name="Sidespersons__c" nillable="true" minOccurs="0" type="xsd:string"/>
<element name="SystemModstamp" nillable="true" minOccurs="0" type="xsd:dateTime"/>
<element name="TaskRelations" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="TopicAssignments" nillable="true" minOccurs="0" type="tns:QueryResult"/>
<element name="UserRecordAccess" nillable="true" minOccurs="0" type="ens:UserRecordAccess"/>
</sequence>
</extension>
</complexContent>
</complexType>

Any thoughts on what I might be doing wrong ?  Thanks.

 
Why do some custom objects show deleted items in SOQL queries and others don't ?
I have two SOQL queries for different custom objects both with deleted items ( as seen in the Recycle bin ) and both including the IsDeleted field. Niether query has any WHERE statement.  For one object the query retrieves records where IsDeleted = 1 or blank.  But for the other object only IsDeleted = blank   records show..  Why is this ?  Is there some object setting that could explain this.  Thanks. 
I am trying to rehearse trigger deployment with a simple test example.  Here is the trigger and the test code.
 
trigger HelloWorldTrigger on Book__c(before insert) {

    Book__c[] books = Trigger.new;
    MyHelloWorld.applyDiscount(books);
}


@isTest
    private class HelloWorldTestClass {
        static testMethod void validateHelloWorld() {
           Book__c b = new Book__c(Name='Behind the Cloud', Price__c=100);
           System.debug('Price before inserting new book: ' + b.Price__c);
     
           // Insert book
           insert b;
         
           // Retrieve the new book
           b = [SELECT Price__c FROM Book__c WHERE Id =:b.Id];
           System.debug('Price after trigger fired: ' + b.Price__c);
     
           // Test that the trigger correctly updated the price
           System.assertEquals(90, b.Price__c);
        }
    }
I have successfully deployed the trigger but it it fails to function because of  insufficient code coverage.

This is the error message.

User-added image
This is the information from the developer console
User-added image
The trigger coverage is 100% which I thought was enough.

I am obviously missing something important so I'd apprecaite any help to:
  • Identify what code I need to add to the test class above to meet the coverage requirements.
  • Explain how I can tell from the developer console whether  tests for other triggers will pass coverage requirements.
Thanks.

 
I am searching for some example SOQL that I can use in a php script that will retrieve all records for a specified object which have been deleted since a specified date and time.  Please can someone point me in the right direction on this.  Thanks.
php 7 gives the following deprecated method warning when used with the current ( Version 20 ? ) of the php developer toolkit:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; SforceEnterpriseClient has a deprecated constructor in /home/sites/xxxx.xom/mmc4/soapclient/SforceEnterpriseClient.php on line 38

Is there any workaround for this ?  When is it likely a new release will be available  that works with 7.x without giving this warning ?  Thanks.
 
Is there any way I can achieve the functionality of MySQL LIMIT with SOQL ?  For example to replicate the current code:
 
    $rs = mysql_query("select count(*) from users");
	$row = mysql_fetch_row($rs);
	$result["total"] = $row[0];
	$rs = mysql_query("select * from users limit $offset,$rows");
	
	$items = array();
	while($row = mysql_fetch_object($rs)){
		array_push($items, $row);
	}
	$result["rows"] = $items;

	echo json_encode($result);
The bit I need help with is the SQL  "select * from users limit $offset,$rows"  .  $offset and $rows are parameters which represent a selection of the returned records - say your SOQL without the parameters returns 2K records you could then generate JSON for records  200 to 500 , 500 to 700 etc and pass these into a javascript data grid.

Any thoughts or advice on this very welcome !
 
I am struggling with SOQL code with the php toolkit to retrieve the total number of records in a custom object table.  I have copied the apporach which is working for an ordinary SELECT query which retrieves multiple records.

Here is is the code that fails to fill the variable  $numRecs
 
$query = "SELECT COUNT() FROM Service3__c";
$response = $mySforceConnection->query($query);

foreach ($response->records as $record) {
  $numRecs = $record->Count();
}

echo $numRecs;

What have I got wrong ?  Thanks.
I want to convert a date time like 2016-09-01 17:49:46 to 2016-09-01T17:49:46Z.

The best I can manage so far is:

$the_date = "2016-09-01 17:49:46"

date("Y-d-mTG:i:sz",$the_date)  which gives  2016-01-09UTC17:49:46244

What is the correct way to get the date time format that will work in a SOQL query ? Thanks.

 
The days when you got a full copy of the production database as a sandbox without paying seem to have gone.

I am using the Developer Pro Sandbox in an Enterprise Edition.  When created it seems to contain all the custom objects from production but without any data.  I can import a sub-set of data using Data Loader but some of the objects have look-ups to other objects.  Since you cannot import Id values how can I import data with related ID's without editing the import file - i.e replacing the old ID values with those which apply in the Sandbox ?

I hope I am missing something really obvious as editing data which is supposed to be represetnative of live data does not seem to me a good idea - quite apart from the time involved.  Thanks.
 
I have a php script that uses the php Developer toolkit and is correctly retrieving data into a table.  I added a new custom field and re-generated the WSDL  but no data is retrieved.  Firebug shows no errors. The problem looks as though it relates to the new field addition because if I replace the new field with an existing field everything works as it should.
 
$query = "SELECT Service_Date__c, Lectionarysv__c, LectionaryNew__c, Service_Time__c, CreatedDate, Notes__c, Leader__c, Location__c, Service_Type__c,  Lectionary6__r.Lectionary_Date__c,Lectionary6__r.Colour__c,Lectionary6__r.Period_Name__c, Lectionary6__r.Selected_Reading_Line__c from Service3__c WHERE Web_Publish__c = True ORDER BY Service3__c.Service_Date__c, Service3__c.Service_Time__c
";
The new field causing the problem is LectionaryNew__c .
..
echo "<td>".$record->Leader__c."</td>";
echo "<td>".$record->LectionaryNew__c."</td>";
The Leader__c field displays correctly but no data appears for LectionaryNew__c .

The entry in the WSDL is
Line 9013: <element name="LectionaryNew__c" nillable="true" minOccurs="0" type="xsd:string"/>
LectionaryNew__c is a text field  200 characters.  I have checked that there is data in the field in the database.


Where should I look to find out what is causing this problem ?   Thanks
..



 
I want to update a datetime field from a date field and a time pick list.  The SF system has users in a fixed time zone with a twice yearly daylight saving adjustment which I think means I cannot use a formula and therefore require an Apex Trigger on BeforeInsert and BeforeUpdate.  It's more than 12 months since I wrote any Apex so I hope someone can get me started on this !   Thanks.
Back in 2013 I used the code in the Excel Connector to get the SF objects needed for ODBC access to the SF database.  Recently I tried to re-run this code and it failed to connect to the current SF release  - 2015.  I now have another use for getting SF data into a VBA script.   All the downloadable code currently available is old -   2011 or earlier -  so it seems to me likely that the object library is now inconsistent with current SF.

Is anyone using the Excel Connector with Winter '16 ?

Thanks.