• sarac
  • NEWBIE
  • 25 Points
  • Member since 2008

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

This method always was working previously, and my VF page was fine. Now all of a sudden I get this error thrown when the page tries to load "Method does not exist or incorrect signature: Test.setCurrentPage(System.PageReference)".

 

Sure enough, I forced a recompile of the class and this methid no longer exists!!! What happened?!

 

Thanks,

Sara

  • March 30, 2009
  • Like
  • 0
Hello,

I amhaving trouble with the lead conversion call. The call to Database.ConvertLead does not seem to be working. It claims that the LeadStatus is not correct - but if you look in the Lead Processes, this status is in fact the converted status for that record type. AND you can also query the LeadStatus table:
Select l.MasterLabel, l.IsConverted, l.Id From LeadStatus l and see that 'Accepted' is in there with isConverted = true. I even did a select on that value as the MasterLabel to make sure that thre wasn't some odd whitespace issue.

System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Accepted

I have tried all 4 lead statuses which are conversion endpoints and none works.

Any ideas are much appreciated!
Thanks,
Sara


Message Edited by sarac on 12-01-2008 06:41 PM
  • December 01, 2008
  • Like
  • 0
I am receiving the following error when trying to push some APEX and standard objects (that have custom fields) to another sandbox. I did it successfully 2 weeks ago with no such error.

All standard objects return the following error in the test deployment:
"cannot create a new namespaced component"

Anyone encounter this? I have never seen this before the new IDE for winter 09.

While I'm at it, here is an error i've gotten repeatedly for a long time (prior to the new IDE) when trying to push page layouts, usually standard object layouts. Any ideas?
"duplicate value found: <unknown> duplicates value on record with id: <unknown>"
Very clear message!

Thanks,
Sara
  • November 25, 2008
  • Like
  • 0
Hello,

I have been trying to get a field on a Visualforce page (the Account ID - a custom field which is a standard lookup) to pre-populate from a query parameter in the url. It does *not* work.

The general use case is that we have a related list on the Account Page for a custom object called Checklist. When we use the standard New button to create a new record, the Account ID is pre-populated on the page since the ID and name are passed in as query parameters.

We had to create a small Visualforce page instead of using the standard page, and overrode the New button. Now when you select New, the page loads without the Account ID pre-populated even though the ID and name are still in the url as query parameters. I took some JavaScript code to pull out those values and have been trying for the past day to figure out how to pass them to the standard controller so it recognizes the Account. The point here is that the end user should not have to re-select the Account from a lookup field when they just came from the Account page.

Since you can't simply View Source on a Visualforce page to see what the field name "{!Checklist__c.Checklist_Template__c}" resolves to (it's just escaped yet not interpreted at that point) I was forced to use a program to view the post request. It would appear that the <apex:inputfield> tag when referring to a lookup actually generates 6 input fields for it.

So... I used those 6 fields, populated them exactly as the lookup field would populate them, and still no luck.
Here is the code:
Code:
<apex:page standardcontroller="Checklist__c" tabstyle="Checklist__c">

  <apex:sectionHeader title="Checklist" subtitle="Create Checklist"/>
  <apex:form id="form1">
    <apex:pageBlock >
  <apex:pageBlockButtons location="top" >
   <apex:commandButton action="{!save}" onclick=" gup();" value="Save" />
  </apex:pageBlockButtons>
  <apex:pageBlockSection >
   <apex:pageBlockSectionItem >
    <apex:outputLabel value="Checklist Template" />
    <apex:inputField value="{!Checklist__c.Checklist_Template__c}" required="true" /> 
   </apex:pageBlockSectionItem>
     </apex:pageBlockSection> 
    </apex:pageBlock>
  
<!-- Here are the 6 fields that are generated by the lookup field -->
  <input type="text" id="AccountID_lkid" name="j_id0:form1:j_id2:j_id5:j_id6:AccountID_lkid"  />
  <input type="text" id="AccountID_lkold" name="j_id0:form1:j_id2:j_id5:j_id6:AccountID_lkold"  />
  <input type="text"  name="j_id0:form1:j_id2:j_id5:j_id6:AccountID_lspf" value="0"  />
  <input type="text"  name="j_id0:form1:j_id2:j_id5:j_id6:AccountID_mod" value="0"  />
  <input type="text"  name="j_id0:form1:j_id2:j_id5:j_id6:AccountID_lktp" value="001"  />
  <input type="text" id="AccountID" name="j_id0:form1:j_id2:j_id5:j_id6:AccountID"  />
  
<!-- Here is the code to pull the Account ID and Name out of the url. This definitely works -->
<script type="text/javascript">

   var regexS = "[\\—&]CF00NS0000000M2Je_lkid=([^&#]*)";
   var regex = new RegExp( regexS );
   var results = regex.exec( window.location.href );
   document.getElementById('AccountID_lkid').value = results[1];
 
 var regexS2 = "[\\–&]CF00NS0000000M2Je=([^&#]*)";
   var regex2 = new RegExp( regexS2 );
   var results2 = regex2.exec( window.location.href );
   document.getElementById('AccountID').value = results2[1];
   document.getElementById('AccountID_lkold').value = results2[1];
  </script>
  </apex:form>
</apex:page>

 
Now I realize I can override the Standard controller and just grab the ID out of the request and it would work just fine, but I really want to understand why this does not work with just the standard controller. This is a pretty big loss of functionality when the page used to pre-populate with the Account ID and then when you write a Visualforce page it no longer does.

Thanks,
Sara
  • October 13, 2008
  • Like
  • 0
So I am trying to override the save function in my extension class to avoid some of the required field validation. These are not required fields in the custom object, they are required in the VisualForce page with the attribute required=true in the apex tag.
 
I currently have a method which is doing NO saving, yet save() in the standard controller is still obviously being called because i am getting errors about required fields. Literally, the method is all commented out and no save or anything else is explicitly being called.
 
Do I need to just name the method something else and not technically override it? Attach the new method to my VisualForce button?
 
Currently I am using public PageReference save() as my overriding function. Is there some sort of implicit super() being called? I thought you needed to explicitly call the stdcontroller.save() for that to happen.
 
Thanks!
Sara
  • September 12, 2008
  • Like
  • 0
Hello,
 
I just did a lot of changes to our data model based on client feedback of their visualforce pages. This was done in the sandbox to both custom objects and standard objects. This included removing 29 fields from one custom object, drastically altering picklist values (both removing values and altering the name of existing values) among other changes.
 
When I tried to deploy these changes to production via Eclipse, the deployment payload generator identified those objects, I selected them and it said Success! However, NONE of the changes were actually propagated into production. No fields deleted, no picklist values deleted, the altered picklist values were just *duplicated* alongside the old values. Each subsequent time I ran the deployment piece it identified EVERY object as still be different from production - even though no changes had been made since the last "successful" attempt at deployment.
 
So after trying that a few times to make sure I wasn't insane I decided to create a new Force.com project in Eclipse from production and alter the meta-data files directly. Well, you can alter the files, but when you save them, they are overwritten immediately with the production versions. Picklist fields magically have all of the old values written right back into the file you just altered and saved.
 
This is a huge problem as I am trying to deploy these changes for a client's launch in 3 days, and re-doing all changes in both the sandbox and production is going to be a complete nightmare.
 
Has anyone else has this issue?
Thanks,
Sara
  • August 11, 2008
  • Like
  • 0
Hello,

I have a number of custom "New" buttons which are located on a related list (of Opportunities) in the Contact record. The buttons are S-control buttons and are set to render in the same window with a side bar.

They work fine off of the related list - they just bring up a pre-populated opportunity record type. However, when you hover over the related list at the top of the Contact record and push one of the buttons, it renders the new page in the hover box!

Any help here?

Thanks!
Sara

Update: I have compared this custom button/s-control with another that comes with the non-profit template (both create membership opportunity records from a Contact and both are located on the opportunity related list in the contact record) and does NOT render in the hover when pressed, and they are *identical*. Same exact button attributes, and the S-control's Javascript is the same as well. This is a big problem for our client - I am thinking it must be a configuration issue. ?



Message Edited by sarac on 04-23-2008 12:09 AM
  • April 15, 2008
  • Like
  • 0
Hello,

I am trying to create an opportunity off of a custom object which has Contact as a lookup. The custom button uses as S-control to pre-populate the Opportunity fields such as name, stage, etc. i am unable to populate a ContactOpportunityRole object for the Opportunity by passing in values for the contact, role, and isPrimary.

Is there a way to do this or are we doomed to doing 2-step data entry for this Opportunity creation? I know that the Opportunity ID is required for OpportunityContactRole creation so it makes sense that the object can't be magically created just by passing the Contact Info into the "New" edit screen, especially since it is not visible on the edit screen and they are query parameters...

This is what I tried, the regular Opportunity fields are pre-populated correctly:
Code:
<script language="JavaScript">
function redirect() {
parent.frames.location.replace("/006/e—retURL=%2F{!Author__c.Id}&opp3={!Author__c.Name}&primary0=1&role0=Business User&contact0_lkid={!Author__c.ContactId__c}&contact0={!Author__c.Contact__c}")
}
redirect();
</script>

Thanks!
Sara

  • March 29, 2008
  • Like
  • 0
Hello,

I have been trying to get a custom button to work, but had to resort to creating an s-control and assigning that to the button. Not a big deal but wondering what the syntax is for URLFOR since the query parameters do not seem to be the same as the JS redirect function.

The code that works fine:
Code:
<script language="JavaScript">
function redirect() {
parent.frames.location.replace("/a01/e—retURL=%2F{!Author__c.Id}&00N70000001ytZ4=Your name")
}
redirect();
</script>

The OnClick JavaScript code which doesn't even compile - a syntax error is thrown specifically on the query parameter name "00N70000001ytZ4"
 
Code:
window.parent.location.href="{!URLFOR($Action.Publication__c.New, null,
[retURL=URLFOR($Action.Author__c.View, Author__c.Id),00N70000001ytZ4="Your name"], true)}";

Thanks!
Sara

  • March 18, 2008
  • Like
  • 0
Hello,

I amhaving trouble with the lead conversion call. The call to Database.ConvertLead does not seem to be working. It claims that the LeadStatus is not correct - but if you look in the Lead Processes, this status is in fact the converted status for that record type. AND you can also query the LeadStatus table:
Select l.MasterLabel, l.IsConverted, l.Id From LeadStatus l and see that 'Accepted' is in there with isConverted = true. I even did a select on that value as the MasterLabel to make sure that thre wasn't some odd whitespace issue.

System.DmlException: ConvertLead failed. First exception on row 0; first error: INVALID_STATUS, invalid convertedStatus: Accepted

I have tried all 4 lead statuses which are conversion endpoints and none works.

Any ideas are much appreciated!
Thanks,
Sara


Message Edited by sarac on 12-01-2008 06:41 PM
  • December 01, 2008
  • Like
  • 0
I am receiving the following error when trying to push some APEX and standard objects (that have custom fields) to another sandbox. I did it successfully 2 weeks ago with no such error.

All standard objects return the following error in the test deployment:
"cannot create a new namespaced component"

Anyone encounter this? I have never seen this before the new IDE for winter 09.

While I'm at it, here is an error i've gotten repeatedly for a long time (prior to the new IDE) when trying to push page layouts, usually standard object layouts. Any ideas?
"duplicate value found: <unknown> duplicates value on record with id: <unknown>"
Very clear message!

Thanks,
Sara
  • November 25, 2008
  • Like
  • 0
So I am trying to override the save function in my extension class to avoid some of the required field validation. These are not required fields in the custom object, they are required in the VisualForce page with the attribute required=true in the apex tag.
 
I currently have a method which is doing NO saving, yet save() in the standard controller is still obviously being called because i am getting errors about required fields. Literally, the method is all commented out and no save or anything else is explicitly being called.
 
Do I need to just name the method something else and not technically override it? Attach the new method to my VisualForce button?
 
Currently I am using public PageReference save() as my overriding function. Is there some sort of implicit super() being called? I thought you needed to explicitly call the stdcontroller.save() for that to happen.
 
Thanks!
Sara
  • September 12, 2008
  • Like
  • 0
Hello,

I have a number of custom "New" buttons which are located on a related list (of Opportunities) in the Contact record. The buttons are S-control buttons and are set to render in the same window with a side bar.

They work fine off of the related list - they just bring up a pre-populated opportunity record type. However, when you hover over the related list at the top of the Contact record and push one of the buttons, it renders the new page in the hover box!

Any help here?

Thanks!
Sara

Update: I have compared this custom button/s-control with another that comes with the non-profit template (both create membership opportunity records from a Contact and both are located on the opportunity related list in the contact record) and does NOT render in the hover when pressed, and they are *identical*. Same exact button attributes, and the S-control's Javascript is the same as well. This is a big problem for our client - I am thinking it must be a configuration issue. ?



Message Edited by sarac on 04-23-2008 12:09 AM
  • April 15, 2008
  • Like
  • 0
Hello,

I am trying to create an opportunity off of a custom object which has Contact as a lookup. The custom button uses as S-control to pre-populate the Opportunity fields such as name, stage, etc. i am unable to populate a ContactOpportunityRole object for the Opportunity by passing in values for the contact, role, and isPrimary.

Is there a way to do this or are we doomed to doing 2-step data entry for this Opportunity creation? I know that the Opportunity ID is required for OpportunityContactRole creation so it makes sense that the object can't be magically created just by passing the Contact Info into the "New" edit screen, especially since it is not visible on the edit screen and they are query parameters...

This is what I tried, the regular Opportunity fields are pre-populated correctly:
Code:
<script language="JavaScript">
function redirect() {
parent.frames.location.replace("/006/e—retURL=%2F{!Author__c.Id}&opp3={!Author__c.Name}&primary0=1&role0=Business User&contact0_lkid={!Author__c.ContactId__c}&contact0={!Author__c.Contact__c}")
}
redirect();
</script>

Thanks!
Sara

  • March 29, 2008
  • Like
  • 0