• ca_peterson_again
  • NEWBIE
  • 30 Points
  • Member since 2010

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

Dear Gurus,

 

I have an Apex class that makes a web service call out. I am using Ron Hess's XML DOM class to help parse the SOAP XML. I am runningn into an issue when obtaining strings from the serivce parameter and trying to assign it to a boolean value in Salesforce. I am looking for advise in what I need to do to allow the assignment of the return value.

 

The value in the Salesforce data base is a boolean value. The service returns a .NET boolean value. Currently I get the following error when saving my Apex class at compile time.

 

"Save error: Illegal assignment from String to Boolean." Error is happening for the follwoing line of code. The d parameter is the XMLDOM response.

 

ua.Open_Service_Orders__c = d.getElementsByTagName('OpenServiceOrders')[0].nodeValue;

 

Thanks in advance,

 

Dodi

 

 

 

 

  • January 26, 2011
  • Like
  • 0

Dear Gurus,

 

I have an Apex class that makes a web service call out. I am using Ron Hess's XML DOM class to help parse the SOAP XML. I am runningn into an issue when obtaining strings from the serivce parameter and trying to assign it to a boolean value in Salesforce. I am looking for advise in what I need to do to allow the assignment of the return value.

 

The value in the Salesforce data base is a boolean value. The service returns a .NET boolean value. Currently I get the following error when saving my Apex class at compile time.

 

"Save error: Illegal assignment from String to Boolean." Error is happening for the follwoing line of code. The d parameter is the XMLDOM response.

 

ua.Open_Service_Orders__c = d.getElementsByTagName('OpenServiceOrders')[0].nodeValue;

 

Thanks in advance,

 

Dodi

 

 

 

 

  • January 26, 2011
  • Like
  • 0

I've seen a recommended practice of creating a dynamic SObject by running a query that returns 0 objects like sObject[] objects = [SELECT Id FROM Contact WHERE ID=NULL];

 

Is there another method of creating a concrete sObject list so it can be used in DML that does not involve querying? 

For example the FeedPost object is no queriable so this method cannot be used. I cannot create individual object feed lists either since i will be creating many different objects posts (at least 5) and this will cause me to go over the governor limits

Do you need to go through a security review even if you don't want to publish your app on App Exchange.

 

 

 

  • October 05, 2010
  • Like
  • 0

When trying to utilize this on our Winter 11 sandbox - or in NA6 after update - 

Save error: Method does not exist or incorrect signature: System.isRunningTest()

 

Despite the API docs listing:

 

The following are the static methods for System.

isRunningTest BooleanReturns true if the currently executing code was called by code contained in a method defined as testMethod,false otherwise. Use this method if you need to run different code depending on whether it was being called from a test.

 

 

And the apex class metadata:

<?xml version="1.0" encoding="UTF-8"?>
    <apiVersion>20.0</apiVersion>
    <status>Active</status>
</ApexClass>

 

<?xml version="1.0" encoding="UTF-8"?><ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">

    <apiVersion>20.0</apiVersion>

    <status>Active</status>
</ApexClass>

  • October 04, 2010
  • Like
  • 0