• opiedog
  • NEWBIE
  • 50 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 15
    Replies

I changed my dev password and then chose to reset my security token. The email with the new token was never received in my email account (yes I checked the junk mail folder).

 

I tried this again and still no token.

 

Is there something known to be an issue with security tokens?

 

For what it's worth, I've never had trouble with this in the past.

I've lost hours trying to work around what must be bugs with the force IDE and how it calculates test coverage. Before I keep trying to hack around what seems like a very fragile system, I thought I'd get a reality check.

 

I have examples where test code in a function results in coverage % X, but if the code is moved from the function directly into the test method, the coverage changes to Y%. And there are other cases where switching calls A() and B() to B() then A() changes the test coverage values (in these cases, A() and B() simply exercise properties of separate classes).

 

I read on other posts that the web-based test-coverage tools are more helpful that the IDE. The example in the post I just read was that the web-based tool will show code hit in the test path with blue and code not hit in red. What follows is one weird example:

WebService static Integer Save( String accountName, String address1, String city, String state, String zip, String
emailAddr, String bizPhone, String cellPhone, String sfAccountId, Boolean setToFalseForTesting ) {

gdirectws.gDirectWebServiceSoap gs = new gdirectws.gDirectWebServiceSoap(); 

if( setToFalseForTesting == true ) {

acctId = gs.Save( accountName, address1, city, state, zip, emailAddr, bizPhone, cellPhone, sfAccountId );

}

return acctId;

}

 

In the code above, the whole method shows as blue (i.e. covered in the test) EXCEPT for the return. I assumed that could only be the case if there was an exception in the gs.Save call, but no exceptions are reported during the test.

 

Is the test coverage calculator unusually buggy? Is this whack-a-mole nonsense just something that salesforce development entails? Or is it really just me?

  • September 21, 2011
  • Like
  • 0

I'm new to Apex development and ran into the following issue I can't decipher when making a simple web service call from the Force IDE.

 

I generated the Apex class from the WSDL for my client's service and used that to make the web service call. The call succeeds in getting a response from the web service; I can see the expected data in the Execute Anonymous results window. But it eventually throws the following exception:

 

09:06:22.193|FATAL_ERROR|System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element http://www.w3.org/2001/XMLSchema=schema

 

Any help would be greatly appreciated.

I have an implementation for a client that works most of the time.

 

When it doesn't work, I'm receiving a WebException.Status of ProtocolError with an HttpWebResponse.StatusCode of InternalServerError.

 

Could you provide some guidance about what might cause this? I log the SOQL query strings and they can be run successfully so I assume it's in the way I'm constructing the HTTP headers.

 

Thanks!

Hi - I'm new to force.com and I've run into what I'm sure is a bonehead config mistake on my part.

 

I'm able to query date in my account - such as contacts.

 

But I haven't figured out how to successfully update a contact. Here's what I'm doing:

* Query for contact A

* Confirm the returned data is as expected

* Change the Name of contact A

* Update contact A

 

This fails with this error:

Code:INVALID_FIELD_FOR_INSERT_UPDATE - Message:Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile.

 

I then tried to not change any fields, and I get the same error.

 

I checked my account in my profile by logging into my account on salesforce.com, then choosing Setup : My Personal Information to confirm I'm an administrator - then I went to App Setup : Contacts : Fields and the Name field shows that it's both required and all the "field-level security for profile" checkboxes are checked (but note that I cannot modify the checkboxes for the Name, FirstName, LastName fields).

 

What am I doing wrong? What do you recommend checking to make sure my account is configured properly?

 

Also, I am able to successfully update an Account object.

 

The problem is only when I try to update Contact objects.

Hi - I'm new to force.com and I've run into what I'm sure is a bonehead config mistake on my part.

 

I'm able to query date in my account - such as contacts.

 

But I haven't figured out how to successfully update a contact. Here's what I'm doing:

* Query for contact A

* Confirm the returned data is as expected

* Change the Name of contact A

* Update contact A

 

This fails with this error:

Code:INVALID_FIELD_FOR_INSERT_UPDATE - Message:Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile.

 

I then tried to not change any fields, and I get the same error.

 

I checked my account in my profile by logging into my account on salesforce.com, then choosing Setup : My Personal Information to confirm I'm an administrator - then I went to App Setup : Contacts : Fields and the Name field shows that it's both required and all the "field-level security for profile" checkboxes are checked (but note that I cannot modify the checkboxes for the Name, FirstName, LastName fields).

 

What am I doing wrong? What do you recommend checking to make sure my account is configured properly?

 

Thanks,

 

John

I've lost hours trying to work around what must be bugs with the force IDE and how it calculates test coverage. Before I keep trying to hack around what seems like a very fragile system, I thought I'd get a reality check.

 

I have examples where test code in a function results in coverage % X, but if the code is moved from the function directly into the test method, the coverage changes to Y%. And there are other cases where switching calls A() and B() to B() then A() changes the test coverage values (in these cases, A() and B() simply exercise properties of separate classes).

 

I read on other posts that the web-based test-coverage tools are more helpful that the IDE. The example in the post I just read was that the web-based tool will show code hit in the test path with blue and code not hit in red. What follows is one weird example:

WebService static Integer Save( String accountName, String address1, String city, String state, String zip, String
emailAddr, String bizPhone, String cellPhone, String sfAccountId, Boolean setToFalseForTesting ) {

gdirectws.gDirectWebServiceSoap gs = new gdirectws.gDirectWebServiceSoap(); 

if( setToFalseForTesting == true ) {

acctId = gs.Save( accountName, address1, city, state, zip, emailAddr, bizPhone, cellPhone, sfAccountId );

}

return acctId;

}

 

In the code above, the whole method shows as blue (i.e. covered in the test) EXCEPT for the return. I assumed that could only be the case if there was an exception in the gs.Save call, but no exceptions are reported during the test.

 

Is the test coverage calculator unusually buggy? Is this whack-a-mole nonsense just something that salesforce development entails? Or is it really just me?

  • September 21, 2011
  • Like
  • 0

Can someone please help me understand how code coverage is calculated? This is what I currently have. As you can see, individually all my classes and triggers are at 100%, but somehow my overall coverage is only 79%. This doesn't make sense to me. It's not a big deal except that I don't want to get into a situation where it won't let me deploy because it calculates my coverage as being below 75%.

 

Coverage : 79%

Classes: 100%

Triggers: 100%

  • August 12, 2011
  • Like
  • 0

I'm new to Apex development and ran into the following issue I can't decipher when making a simple web service call from the Force IDE.

 

I generated the Apex class from the WSDL for my client's service and used that to make the web service call. The call succeeds in getting a response from the web service; I can see the expected data in the Execute Anonymous results window. But it eventually throws the following exception:

 

09:06:22.193|FATAL_ERROR|System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element http://www.w3.org/2001/XMLSchema=schema

 

Any help would be greatly appreciated.

I have an implementation for a client that works most of the time.

 

When it doesn't work, I'm receiving a WebException.Status of ProtocolError with an HttpWebResponse.StatusCode of InternalServerError.

 

Could you provide some guidance about what might cause this? I log the SOQL query strings and they can be run successfully so I assume it's in the way I'm constructing the HTTP headers.

 

Thanks!

Hi - I'm new to force.com and I've run into what I'm sure is a bonehead config mistake on my part.

 

I'm able to query date in my account - such as contacts.

 

But I haven't figured out how to successfully update a contact. Here's what I'm doing:

* Query for contact A

* Confirm the returned data is as expected

* Change the Name of contact A

* Update contact A

 

This fails with this error:

Code:INVALID_FIELD_FOR_INSERT_UPDATE - Message:Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile.

 

I then tried to not change any fields, and I get the same error.

 

I checked my account in my profile by logging into my account on salesforce.com, then choosing Setup : My Personal Information to confirm I'm an administrator - then I went to App Setup : Contacts : Fields and the Name field shows that it's both required and all the "field-level security for profile" checkboxes are checked (but note that I cannot modify the checkboxes for the Name, FirstName, LastName fields).

 

What am I doing wrong? What do you recommend checking to make sure my account is configured properly?

 

Also, I am able to successfully update an Account object.

 

The problem is only when I try to update Contact objects.

Hi - I'm new to force.com and I've run into what I'm sure is a bonehead config mistake on my part.

 

I'm able to query date in my account - such as contacts.

 

But I haven't figured out how to successfully update a contact. Here's what I'm doing:

* Query for contact A

* Confirm the returned data is as expected

* Change the Name of contact A

* Update contact A

 

This fails with this error:

Code:INVALID_FIELD_FOR_INSERT_UPDATE - Message:Unable to create/update fields: Name. Please check the security settings of this field and verify that it is read/write for your profile.

 

I then tried to not change any fields, and I get the same error.

 

I checked my account in my profile by logging into my account on salesforce.com, then choosing Setup : My Personal Information to confirm I'm an administrator - then I went to App Setup : Contacts : Fields and the Name field shows that it's both required and all the "field-level security for profile" checkboxes are checked (but note that I cannot modify the checkboxes for the Name, FirstName, LastName fields).

 

What am I doing wrong? What do you recommend checking to make sure my account is configured properly?

 

Thanks,

 

John