• hgolov
  • NEWBIE
  • 109 Points
  • Member since 2010

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 17
    Questions
  • 36
    Replies

Hi All,

I have inherited some php code that is among other things, trying to create some custom objects via the soap api using the create method.

The create is not successful (no new objects in the production environment) and the soap response is null.

 

 
$response = $mySforceConnection->create($this_batch, 'MY_CUSTOM_OBJECT__c');


echo 'the response from sf: ' . var_export($response, 1);

 This echos  'the response from sf: NULL'

 

I've dumped the $this_batch variable to be sure I was sending information ,and it Is.

 

Does anyone know why there would be no information in the response?

Hi All, and thanks for taking the time to look at my post.

 

I am trying to retrieve a list of contacts modified between two dates (LastModifiedDate >= Date1 AND LastModifiedDate <= Date2). When I query  I receive 0 rows. If I take out ONLY the second part (LastModifiedDate <= Date2) I receive many.

 

Here is my code and the debug log - first with the two dates:

 

DateTime myDate = DateTime.parse('10/05/2011 00:00 AM');
DateTime myLastDate = DateTime.valueOf('2012-02-7 05:04:25');
System.debug('the first date:' + String.valueOf(myDate) + ' and the last date: ' + String.valueOf(myLastDate));
List<Contact> cList = [select id, FirstName, LastName, LastModifiedDate  FROM Contact WHERE Email <> '' AND Email <> null AND LastModifiedDate >= :myDate and lastModifiedDate <= :myLastDate];
system.debug('num cons' + cList.size());

19:19:14.042 (42468000)|USER_DEBUG|[3]|DEBUG|the first date:2011-10-05 00:00:00 and the last date: 2012-02-07 05:04:25
19:19:14.042 (42478000)|SYSTEM_METHOD_EXIT|[3]|System.debug(ANY)
19:19:14.042 (42682000)|SOQL_EXECUTE_BEGIN|[4]|Aggregations:0|select id, FirstName, LastName, LastModifiedDate FROM Contact WHERE  Email <> '' AND Email <> null  AND LastModifiedDate >= :myDate and lastModifiedDate <= :myLastDate
19:19:18.055 (4055043000)|SOQL_EXECUTE_END|[4]|Rows:0

 and now with one date

DateTime myDate = DateTime.parse('10/05/2011 00:00 AM');
DateTime myLastDate = DateTime.valueOf('2012-02-7 05:04:25');
System.debug('the first date:' + String.valueOf(myDate) + ' and the last date: ' + String.valueOf(myLastDate));
List<Contact> cList = [select id, FirstName, LastName, LastModifiedDate  FROM Contact WHERE  Email <> '' AND Email <> null  AND LastModifiedDate >= :myDate ];
system.debug('num cons' + cList.size());
19:20:55.039 (39038000)|USER_DEBUG|[3]|DEBUG|the first date:2011-10-05 00:00:00 and the last date: 2012-02-07 05:04:25
19:20:55.039 (39045000)|SYSTEM_METHOD_EXIT|[3]|System.debug(ANY)
19:20:55.039 (39249000)|SOQL_EXECUTE_BEGIN|[4]|Aggregations:0|select id, FirstName, LastName, LastModifiedDate FROM Contact WHERE  Email <> '' AND Email <> null  AND LastModifiedDate >= :myDate
19:21:06.555 (11555339000)|SOQL_EXECUTE_END|[4]|Rows:21784

 Any suggestions are welcome.

  • February 07, 2012
  • Like
  • 0

Hi All,

Thank you for taking the time to look at my post.

I know that there are already quite a few posts with this title, but none of them seem to solve my problem.

I am running a php script using the sdk.

In trying to call a method from a webservice that I  created in apex I get the following error: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. I haven't had this issue before - I have quite a few scripts calling other webservices on the same server. I tested this method throughly in the sandbox and also didn't get this error. If it is a server issue that would make sense.

I don't have Lock sessions to the IP address from which they originated set,and  I am using the namespace for the soapheader.

Can anyone give me any pointers?

Thanks!

  • November 22, 2011
  • Like
  • 0
Hi All, and thank you for taking the time to look at my post. We added a contact lookup field to opportunity. Usually, when merging contacts, the opportunities are updated appropriately (meaning the opportunity gets the new contact id). However, sometimes they are not, and that makes for a lot of trouble. Can anyone give me an idea where to start looking for the issue? Thanks
  • November 15, 2011
  • Like
  • 0

Hi All, and thanks for taking the time to look at my question.

I recently ran into an error when trying to deploy - not enough coverage across the org. So I've been going through my classes one by one and increasing code coverage. However, I have a problem. Often the coverage that displays in my org's control panel doesn't reflect the values I see when testing in the sandbox.

I found this question:

http://boards.developerforce.com/t5/Apex-Code-Development/Different-code-coverage-in-Sandbox-and-Production/td-p/71962

and decided to run the tests on the prod org in the eclipse ide. I got the same values as in the sandbox, but my org still shows less!

Does anyone have any ideas?

  • September 07, 2011
  • Like
  • 0

Hi All and thanks for taking the time to look at my post.

 

I created a webservice for a client that inserted leads and campaign members. We tested it and it worked perfectly. The client sent a mass email and we got about 10,000 leads in one day. The system is set up so that the leads are always automatically converted. BUT about 20% of the leads weren't converted.

Does anyone have any ideas as to why this would happen or what I could do to prevent it happening in the future?

 

Thanks

  • August 23, 2011
  • Like
  • 0

Hi All,

 

First of all, thank you for taking the time to read my post.

I wrote an apex class and tried to deploy it via the eclipse ide. However, I got the following error :

 

 Average test coverage across all Apex Classes and Triggers is 74%, at least 75% test coverage is required.

 

I then wrote a test class to test many classes and triggers that weren't properly covered, but I can not get that to deploy either. I tried going into the production project in Eclipse, but it doesn't save to server and gives the same error on deployment. I also tried deleting some unused classes via Eclipse, but that isn't reflected in the production environment.

 

Does anyone have any idea how I can solve this?

 

Thanks again

  • August 15, 2011
  • Like
  • 0

Hi All,

Firstly, thanks for taking the time to read my post.

I have a vg page that has an actionFunction that calls an apex method from my custom controller. After running, there are a few components that are supposed to reload. However, what's happening is as follows:

1. The page starts to reload.

2. The apex method is called.

3. The components are NOT rerendered.

Does anyone have any ideas as to why that would happen?

Here is the relevant code:

1. ActionFunction tag:

  <apex:actionFunction name="undoEdit" action="{!undoEdit}" rerender="taskInfoDisplay, descInfo,fundraisingInfo, sysInfo,editButtons">
  <apex:param name="fieldToRollBack" value="{!fieldToRollBack}"/>
  </apex:actionFunction>

 

 

2. VF code that calls it:

 

<apex:commandButton image="xxx" onclick="undoEdit('Priority')" rendered="{!editState['Priority']}"/>

 

 

3. Apex Method:

 

public void undoEdit(){
		fieldToRollBack = ApexPages.currentPage().getParameters().get('fieldToRollBack');
		System.debug('the field is:' +  fieldToRollBack );
		//first check if this was edited
		if(editState.get(fieldToRollBack)){
			System.debug('the field was changed');
			if(origTaskVals.containsKey(fieldToRollBack)){
				System.debug('this is a task field, rolling back. The current val: ' + myTask.get(fieldToRollBack) + '. The orig val: ' + origTaskVals.get(fieldToRollBack));
				myTask.put(fieldToRollBack,origTaskVals.get(fieldToRollBack));
				System.debug('after putting, the val is: ' + myTask.get(fieldToRollBack))	;
			}
			
			editState.put(fieldToRollBack, false);
			
		}
	
	}

 

Thanks in advance for your help!

 

  • March 28, 2011
  • Like
  • 0

Hi All,

Firstly, thanks for taking the time to look at my post.

I have  vf page that was working very nicely until recently (maybe until spring '11 was launched?). Now, when the user fires an event that calls an actionFunction, the apex method is not being called. I put an actionStatus component into the page to show the status, and it does show the start and stop text, but the debug log shows output appropriate for pageload, not for the method referenced in the actionFunction tag.

Action Function Tag:

 

<apex:actionFunction status="counterStatus" name="renderField" action="{!renderField}" immediate='true' rerender="taskInfoDisplay, descInfo,fundraisingInfo, sysInfo, editButtons">
  <apex:param name="fieldToShow" value=""/>
  </apex:actionFunction>

 

 

Apex Method:

 

public void renderField(){
		System.debug('in renderField');
		fieldToEdit = ApexPages.currentPage().getParameters().get('fieldToShow');
		isEdit = true;
		System.debug('the field to edit is: ' + fieldToEdit);
	}

 

 

Sample Calling Code:

 

<apex:outputLabel ondblclick="renderField('Priority')"  value="Priority"/>

 

 

Does anyone have any ideas as to why this would no longer work?

 

Thanks!

 

  • March 13, 2011
  • Like
  • 0

Hi, and thank you for taking the time to look at my question.

I have a standard set of js functions that I use for form validation. One of the features I added was to disable the submit button before submitting the form to prevent a multiple submission. This is especially useful when submitting financial transactions, but in general it comes in handy.

HOWEVER when I try to implement this in my vf page, it makes the page reload, instead of redirecting to the correct page.

Does anyone have any idea why?

Here is a code snippet that I tried in my onSubmit function:

 

 <!-- submit button
-->
<apex:commandButton id="submitArea" value="Sign Me Up!" action="{!save}"/>

<script type='text/javascript'>
document.getElementById('{!$Component.submitArea').disabled = true;
myApp = navigator.appVersion
if(myApp.indexOf('America Online Browser') == -1){
if(checkForm())
return true;
document.getElementById('!$Component.submitArea').disabled = false;
return false;
}
return true;
</script>

 

 


 

 

  • March 01, 2011
  • Like
  • 0
Hi all and thanks for taking the time to look at my post. I have a vf page that is restricted to logged in users, but for some reason the first time I navigate to it it always makes me login, even when I am already logged in to salesforce. Does anyone have any idea why? Thanks!
  • February 28, 2011
  • Like
  • 0

Hi All,

Thank you for taking the time to read my question.

 

I have a salesprocess for my opportunity stage values. I have the businessprocess id, and can query it via the api. However, I can not find a way to filter the picklist values for return to a visualforce page to return only those that are part of the business process.

I have seen lots of questions on the forums related to this, but NOT ONE has a satisfactory answer. The businessprocess object DOES NOT return picklist values, nor does it look like it should. There was one post about the metadata, but that seems to be a different api that I can't access via my custom controller.

 

Can anyone help?

Thank you!

  • February 04, 2011
  • Like
  • 0

Hi,

First of all, thank you for taking the time to try and help.

I have written a vf page with a custom controller. The purpose of this page is to allow users to create/edit/delete new/existing tasks. It's a long story - but this is what the client wants. The first thing I got working was to edit or view an existing task record, with inline editing in view mode. Then I started working on create. It took a very long time, but finally that too was working. Now just before showing my client the finished job, I double checked that view/edit existing task works, and when I load the page I get an internal server error!

The error number is: 1165965152-7090 (393970645).

When I comment out the form the page loads (but is almost blank), but as soon as I put it back in, even with nothing in between the open and close form tags I get the error again. The debug log does not show any errors, and shows that the code is doing everything necessary to set up the page.

Does anyone have any idea what I can do here?

Thanks

  • December 19, 2010
  • Like
  • 0

Hi All,

First of all, thanks for taking the time to look at my question.

I have the following issue. I am writing a detail page in vf, and the client wants inline editing.

I am trying to implement as follows:

 

  <apex:outputField value="{!myTask.Owner.Name}" id="ownerDisplay" /><apex:commandLink id="editOwnerLink"  action="{!renderField}" reRender="ownerEdit, fieldToEditDisplay" >Edit<apex:param name="fieldToShow" value="Owner"/> </apex:commandLink>
         
           <apex:inputField value="{!myTask.OwnerId}" id="ownerEdit" rendered="{!IF(FieldToEdit == 'Owner','true','false')}"/>
          <apex:outputText value='{!FieldToEdit}' id='fieldToEditDisplay'></apex:outputText>

 

The controller code:

public String getFieldToEdit(){
		return fieldToEdit;
	}
	
	public void renderField(){
		fieldToEdit = ApexPages.currentPage().getParameters().get('fieldToShow');
	}
	

 

 

I have tried to do the render formula in different ways: plain {!FieldToEdit == 'Owner'}, {!FieldToEdit.equals('Owner')},{!IF(FieldToEdit == 'Owner', true, false}.

I've also tried with = and not ==. NOTHING SEEMS TO WORK.

I know that the fieldToEdit does get set to owner because I output with the <apex:outputText> just below.

Does anyone have any idea why this wouldn't work???

 

Any suggestions are welcome!

Thanks..

  • October 24, 2010
  • Like
  • 0

hi,

When a user views a detail page and rolls over a field value, they get a little pencil icon on the right and can then click and edit the value. How can I do this on a visualforce page?

Thanks for you help!!

  • October 14, 2010
  • Like
  • 0

Hi,

I am having a really weird error, and any help would be appreciated. I worte a visualforce page with a custom controller that inserts a lead and a campaign member record. This works perfectly when I navigate directly to the page. However, when I embed it as an iframe in my external site, I get a INVALID_CROSS_REFERENCE_KEY error on processing.

Does anyone have any idea why this would happen?

Hi,

I've created a vf page with a lead form that correctly inserts a lead using a custom controller. However, when I send the link to someone (or open in a different browser where I'm not logged in) the page requires login to access. The user type associated with the site is Guest User. I've set all the permissions that I think the page needs. How can I allow access to this page without login? Even a guest user still needs a login! Please help!!!

Hi All, and thanks for taking the time to look at my post.

 

I am trying to retrieve a list of contacts modified between two dates (LastModifiedDate >= Date1 AND LastModifiedDate <= Date2). When I query  I receive 0 rows. If I take out ONLY the second part (LastModifiedDate <= Date2) I receive many.

 

Here is my code and the debug log - first with the two dates:

 

DateTime myDate = DateTime.parse('10/05/2011 00:00 AM');
DateTime myLastDate = DateTime.valueOf('2012-02-7 05:04:25');
System.debug('the first date:' + String.valueOf(myDate) + ' and the last date: ' + String.valueOf(myLastDate));
List<Contact> cList = [select id, FirstName, LastName, LastModifiedDate  FROM Contact WHERE Email <> '' AND Email <> null AND LastModifiedDate >= :myDate and lastModifiedDate <= :myLastDate];
system.debug('num cons' + cList.size());

19:19:14.042 (42468000)|USER_DEBUG|[3]|DEBUG|the first date:2011-10-05 00:00:00 and the last date: 2012-02-07 05:04:25
19:19:14.042 (42478000)|SYSTEM_METHOD_EXIT|[3]|System.debug(ANY)
19:19:14.042 (42682000)|SOQL_EXECUTE_BEGIN|[4]|Aggregations:0|select id, FirstName, LastName, LastModifiedDate FROM Contact WHERE  Email <> '' AND Email <> null  AND LastModifiedDate >= :myDate and lastModifiedDate <= :myLastDate
19:19:18.055 (4055043000)|SOQL_EXECUTE_END|[4]|Rows:0

 and now with one date

DateTime myDate = DateTime.parse('10/05/2011 00:00 AM');
DateTime myLastDate = DateTime.valueOf('2012-02-7 05:04:25');
System.debug('the first date:' + String.valueOf(myDate) + ' and the last date: ' + String.valueOf(myLastDate));
List<Contact> cList = [select id, FirstName, LastName, LastModifiedDate  FROM Contact WHERE  Email <> '' AND Email <> null  AND LastModifiedDate >= :myDate ];
system.debug('num cons' + cList.size());
19:20:55.039 (39038000)|USER_DEBUG|[3]|DEBUG|the first date:2011-10-05 00:00:00 and the last date: 2012-02-07 05:04:25
19:20:55.039 (39045000)|SYSTEM_METHOD_EXIT|[3]|System.debug(ANY)
19:20:55.039 (39249000)|SOQL_EXECUTE_BEGIN|[4]|Aggregations:0|select id, FirstName, LastName, LastModifiedDate FROM Contact WHERE  Email <> '' AND Email <> null  AND LastModifiedDate >= :myDate
19:21:06.555 (11555339000)|SOQL_EXECUTE_END|[4]|Rows:21784

 Any suggestions are welcome.

  • February 07, 2012
  • Like
  • 0

Hi All,

 

First of all, thank you for taking the time to read my post.

I wrote an apex class and tried to deploy it via the eclipse ide. However, I got the following error :

 

 Average test coverage across all Apex Classes and Triggers is 74%, at least 75% test coverage is required.

 

I then wrote a test class to test many classes and triggers that weren't properly covered, but I can not get that to deploy either. I tried going into the production project in Eclipse, but it doesn't save to server and gives the same error on deployment. I also tried deleting some unused classes via Eclipse, but that isn't reflected in the production environment.

 

Does anyone have any idea how I can solve this?

 

Thanks again

  • August 15, 2011
  • Like
  • 0

Hi All,

Firstly, thanks for taking the time to read my post.

I have a vg page that has an actionFunction that calls an apex method from my custom controller. After running, there are a few components that are supposed to reload. However, what's happening is as follows:

1. The page starts to reload.

2. The apex method is called.

3. The components are NOT rerendered.

Does anyone have any ideas as to why that would happen?

Here is the relevant code:

1. ActionFunction tag:

  <apex:actionFunction name="undoEdit" action="{!undoEdit}" rerender="taskInfoDisplay, descInfo,fundraisingInfo, sysInfo,editButtons">
  <apex:param name="fieldToRollBack" value="{!fieldToRollBack}"/>
  </apex:actionFunction>

 

 

2. VF code that calls it:

 

<apex:commandButton image="xxx" onclick="undoEdit('Priority')" rendered="{!editState['Priority']}"/>

 

 

3. Apex Method:

 

public void undoEdit(){
		fieldToRollBack = ApexPages.currentPage().getParameters().get('fieldToRollBack');
		System.debug('the field is:' +  fieldToRollBack );
		//first check if this was edited
		if(editState.get(fieldToRollBack)){
			System.debug('the field was changed');
			if(origTaskVals.containsKey(fieldToRollBack)){
				System.debug('this is a task field, rolling back. The current val: ' + myTask.get(fieldToRollBack) + '. The orig val: ' + origTaskVals.get(fieldToRollBack));
				myTask.put(fieldToRollBack,origTaskVals.get(fieldToRollBack));
				System.debug('after putting, the val is: ' + myTask.get(fieldToRollBack))	;
			}
			
			editState.put(fieldToRollBack, false);
			
		}
	
	}

 

Thanks in advance for your help!

 

  • March 28, 2011
  • Like
  • 0

Hi All,

Firstly, thanks for taking the time to look at my post.

I have  vf page that was working very nicely until recently (maybe until spring '11 was launched?). Now, when the user fires an event that calls an actionFunction, the apex method is not being called. I put an actionStatus component into the page to show the status, and it does show the start and stop text, but the debug log shows output appropriate for pageload, not for the method referenced in the actionFunction tag.

Action Function Tag:

 

<apex:actionFunction status="counterStatus" name="renderField" action="{!renderField}" immediate='true' rerender="taskInfoDisplay, descInfo,fundraisingInfo, sysInfo, editButtons">
  <apex:param name="fieldToShow" value=""/>
  </apex:actionFunction>

 

 

Apex Method:

 

public void renderField(){
		System.debug('in renderField');
		fieldToEdit = ApexPages.currentPage().getParameters().get('fieldToShow');
		isEdit = true;
		System.debug('the field to edit is: ' + fieldToEdit);
	}

 

 

Sample Calling Code:

 

<apex:outputLabel ondblclick="renderField('Priority')"  value="Priority"/>

 

 

Does anyone have any ideas as to why this would no longer work?

 

Thanks!

 

  • March 13, 2011
  • Like
  • 0