• RCJesse
  • NEWBIE
  • 129 Points
  • Member since 2009

  • Chatter
    Feed
  • 5
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 40
    Replies
I am attempting to replace a standard page for a custom page when the New button is clicked for a custom object.

So far I have been able to create Visualforce custom page.

Next I go to Create > Objects and select my custom object.

In the Standard Buttons and Links block I click on Edit for New.

The override page is displayed however when I select Override With Visulaforce Page the dropdown only lists "-- None --"

When I click on Edit for the Tab, the override With Visualforce Page drop down lists my custom Visualforce page.

Is there a configuration/customization value I am missing?
 
Why is my custom page not listed in the dropdown when I attempt to override the New page?

As an example I am using the following article

http://wiki.developerforce.com/index.php/Visualforce_DynamicEditPage
  • March 03, 2010
  • Like
  • 0

Hi:

   I have an inputText Field in VF:

 

<td><apex:inputText value="{!teachername}"/></td>

 Then in my Apex Code I have:

 

if(teachername!=null){
qryString = qryString + 'where ' + teacher + '=' + '\''+ teachername+'\'';
}

 


 

 

Now the issue is if I do not place anything in that textbox and click on another filter and then click go button...

It gives me an error on my where statement bring up the teacher where statement...

 

It is null, I left it blan/empty/nothing in there...

 Should I place something else instead of a null???

Thanks

 

 

We are moving away from the Contract object. I would like to make copies of the notes whose ParentId's are Contracts into another custom object. I've tried using the data loader but I don't think it can perform the kind of query I need. Since Notes have a ParentId field, how can I traverse them knowing the parents are Contracts. I would like to get the AccountId from the Contract object.

 

So I would like to go Note->ParentId->AccountId Where i know ParentId is a Contract object which I know has an Id that starts with "800".

 

Any help would be really appreciated.Thanks. 

On our Opportunities we have a picklist field where a rep can select a reason why this opportunity was lost. We have a custom object to get details if the reason was because of a competitor. I would like to launch a new instance of that custom object when a opportunity is saved with that reason selected. I don't think i can do this via a trigger so i think i have to overwrite the save button or at least append some logic to it. Does anybody have an example of something like this? 

We are moving away from using the Contract object to a new custom object Implementations. Contracts up until this point have notes and events tied to them but I need to migrate them to be tied to the Implementations.

 

How can i write a query that can find all the notes tied to a Contract and the Implementation Id it should be tied to? The notes can be traced back via the Contract: Account->Contract->Notes and the Implementation is a direct lookup to the Account: Account->Implementation.

 

Thanks. 

My query writing isnt very strong. Is it possible to write a SOQL query that would find all Id's of Contracts whose Accounts had an Opportunity whose name was = 'test'?

 

 

If you delete the Opportunity and Contact object that are in an OpportunityContactRole what happens to that OCR? Does it persist just with blank Id's forever doomed sit there or is it deleted?

 

What if you just delete one of the objects referenced?

I am overwriting the lead coversion process with my own because we want to search for duplicates via fields other than company name. I have a controller that builds a List of Accounts found. How can I show that in a list view and allow the user to select one. I tried using a combination of selectCheckboxes and output link but it didn't work out right. Anybody know of any examples? I think i've seen one before but can't find it.

 

Thank.

I have an Visual Force page where there are 3 questions that use selectRadio buttons. My issue pertains to the scenario where not all 3 questions are answered. I want the radio buttons to retain any answer that is selected. For example if you just answer one of the 3 questions my submit button calls a controller function to check to make sure that all 3 questions are answered. If not a tag is set so that a line is rendered to ask that they fill all the questions. But then any buttons selected are cleared out. 

 

Any way to maintain those values? If in my submit function i do save the values entered into the Object and update it can I refresh the page then and have those buttons show as selected?  Doing that with selectLists or text fields seems to be easy/automatic but not radio buttons because i am just generating the options list from scratch for the questions. 

I have a VF page with matching controller to make some links for our reps. I want to append the value from the last name field from the running user's User object to my link. In my controller i have the main url hardcoded as a string and then i add parameters to that string depending on the field values. But when if i do something like

 

link = link + 'spid=' + User.LastName;

 

What I actually get is "spid=LastName"  

 

If i try to add the value as a apex:param to a link the code "%3f" shows up where it should have an "&". 

I know I can build a dashboard with my VF page and display the dashboard snapshot on the home tab but it is not scalable and my VF page is a list which grows.

 

So how can I display my VF page on the home tab as a component? Do I have to build an html component and use the iframe tag? I tried that just now and it basically worked but it shows a complete inline salesforce window. So its the Opportunities tab (the tabstyle of the VF page) within the home tab, both with all sets of tabs and links. How can i just display the page without the tabs and sidebar?

In the detail pages for Contacts Account and Opportunities there is a related list Activity History. It seems to only show the activities "assigned" to you. How can we make it show all activities for all users. The reasoning is that is it usefull for us to see if somebody else has an activity done or in progress for this account rather than stepping on their toes.

 

Thanks. 

I have two classes that I need to deploy to my production server but I can't because I don't have tests for them and am not sure how to test them.

 

The first, ConfirmSale, contains a WebService static method. How can I call that in a test class?

 

The second, ConvertLead, is a class I wrote to overwrite the lead convert button. My button calls a visualforce page which runs a method in the class. The issue here is that the method uses ApexPages.currentPage() to get parameters of the page that the user is looking at. So how do I replicate that for a test?

 

I need to deploy these by tomorrow so any help is appreciated. I have no problem posting the code if that helps.

  • September 14, 2009
  • Like
  • 0

I am getting a Apex Code Generation error when trying to import our WSDL: Error: Element not defined for part 'return'

 

I have no real familiarity with WSDL or XML coding and the error message isnt very specific considering there a multuple returns in the WSDL. Any thoughts or anybody seen this error before?

 

Thanks.

I'm going to try and write my order of actions and maybe then somebody can tell me that i'm missing something. What I am trying to accomplish is seperate web-to-lead's into 1 of three round robin assignment rules. The round robin rules function off of a custom object counter (1 for each rule)

 

-Form is filled out firing before insert trigger

-Trigger checks against a field entered from the form, logic is like this:

if x > 9, get the counter value for Large and save into custom lead field, set assignmentRuleID to rule1

 

if x > 3, get the counter value for Medium, save into custom lead field, set assignmentRuleID to rule2

else get the counter value for Small, save into custom lead field, set assignmentRuleID to rule3

 

Now the problem seems to be that the round robin assignment rules are based off of a formula field which is the MOD of the counter value stored in the lead. So if there are 5 people in my group and counter is 3 the mod value would be 2 meaning that the rule entry corresponding to that mod value would be called. But the leads are not being assigned at all. I'm thinking that since the rules are based off a formula value that maybe that value is not set because the lead has not really been saved yet. 

 

I know the trigger is being called and that it is going through my logic but the rules are not being applied at all.I can also see that the lead gets the correct counter value and that its mod value is calculated correctly and stored in the lead. 

 

Any help would be appreciated.

 

 

I'm sure companies value different fields of data differently but I'm just trying to get a feel for typical de-duplication methods. Do most people rely on email and name or company to determine duplicates? If a duplicate lead is found what is your general course of action? Do you look to merge fields or maybe just discard one of the leads? Do you also check for existing contact duplicates? Maybe we compare different lead sources and if they are different then combine the data since different sources for us mean different kinds information came with the lead. I'm just looking for some general examples so any input would be great.

 

Thanks.

So i have a small two person round robin test tule set as my active assignment rule. The rule works fine for webl-to-lead leads or if leads are manualy created. But importing leads through the lead import wizard or by my custom emailtolead apex class does not use the active assignment rule. So what gives? Any thoughts on why my round robin rul ewould not be called upon when importing or inserting anew data to the database?

 

Thanks,

Jesse

I have tried before insert and after insert triggers but i cannot seem to update the ownerId. During the trigger the ownerId gets set properly, as seen via the debug log, but when I look at the lead in SF it is still the default owner. Specificly these leads are being created via a web-to-lead form.

 

In either version (Before or After insert) I get the list of leads, find the proper ownerId and assign it to the lead. In my After Insert trigger i even printed to the log the owner Id before updating the leads and then again after updating the leads. The ownerId comes our correct in the log but still not in SF. Here is a stripped down version of my After Insert trigger

 

 

trigger Lead on Lead (after insert) { 
    ProtectionRules pr = new ProtectionRules();
    String prResult = 'not found';
 	
 	String countryCode;
 	
	Set<ID> ids = trigger.newmap.keyset();
	list<Lead> leads = [SELECT Id,Status,Downgrade_Date__c,Phone,indexedPhone__c,Email,indexedEmail__c,OwnerId,Owner_Manager_Email__c,Owner_Manager_Name__c,LeadSource,Lead_Score__c FROM Lead WHERE Id in :ids];
		 				
	for(Integer i=0; i<leads.size();i++){
		*Code to find OwnerId*
	    		
                leads[i].OwnerId = [SELECT id FROM User WHERE Team__c=:assignmentRule.TeamName__c AND Team_Member_Number__c=:teamMemberNumber].Id;
	    		

		system.debug('THIS IS LEAD.OWNERID AT THE END: ' + leads[i].OwnerId);
		
			
        }		
    

    system.debug('THIS IS THE LEAD OWNER BEFORE UPDATE: ' + [SELECT Id,OwnerId FROM Lead WHERE Id=:leads[0].Id].OwnerId);    	
	update leads;
	system.debug('THIS IS THE LEAD OWNER AFTER UPDATE: ' + [SELECT Id,OwnerId FROM Lead WHERE Id=:leads[0].Id].OwnerId);
}

 

 

 I realize those debug lines at the end will only show the first lead in the list. I am just testing one at a time.

 

What am I missing? I've been stuck on this for the last day or two and any help would be appreciated.

 

 

We are moving away from the Contract object. I would like to make copies of the notes whose ParentId's are Contracts into another custom object. I've tried using the data loader but I don't think it can perform the kind of query I need. Since Notes have a ParentId field, how can I traverse them knowing the parents are Contracts. I would like to get the AccountId from the Contract object.

 

So I would like to go Note->ParentId->AccountId Where i know ParentId is a Contract object which I know has an Id that starts with "800".

 

Any help would be really appreciated.Thanks. 

I am attempting to replace a standard page for a custom page when the New button is clicked for a custom object.

So far I have been able to create Visualforce custom page.

Next I go to Create > Objects and select my custom object.

In the Standard Buttons and Links block I click on Edit for New.

The override page is displayed however when I select Override With Visulaforce Page the dropdown only lists "-- None --"

When I click on Edit for the Tab, the override With Visualforce Page drop down lists my custom Visualforce page.

Is there a configuration/customization value I am missing?
 
Why is my custom page not listed in the dropdown when I attempt to override the New page?

As an example I am using the following article

http://wiki.developerforce.com/index.php/Visualforce_DynamicEditPage
  • March 03, 2010
  • Like
  • 0

Hi:

   I have an inputText Field in VF:

 

<td><apex:inputText value="{!teachername}"/></td>

 Then in my Apex Code I have:

 

if(teachername!=null){
qryString = qryString + 'where ' + teacher + '=' + '\''+ teachername+'\'';
}

 


 

 

Now the issue is if I do not place anything in that textbox and click on another filter and then click go button...

It gives me an error on my where statement bring up the teacher where statement...

 

It is null, I left it blan/empty/nothing in there...

 Should I place something else instead of a null???

Thanks

 

 

We could use some help debugging a problem we are having in our code.  It works perfectly in sandbox but fails in production.  We have checked data model and field level security and all is good.  Can someone help with the most common reasons it works in sandbox and not production.

 

Thanks in advance. 

I am overwriting the lead coversion process with my own because we want to search for duplicates via fields other than company name. I have a controller that builds a List of Accounts found. How can I show that in a list view and allow the user to select one. I tried using a combination of selectCheckboxes and output link but it didn't work out right. Anybody know of any examples? I think i've seen one before but can't find it.

 

Thank.

I have an Visual Force page where there are 3 questions that use selectRadio buttons. My issue pertains to the scenario where not all 3 questions are answered. I want the radio buttons to retain any answer that is selected. For example if you just answer one of the 3 questions my submit button calls a controller function to check to make sure that all 3 questions are answered. If not a tag is set so that a line is rendered to ask that they fill all the questions. But then any buttons selected are cleared out. 

 

Any way to maintain those values? If in my submit function i do save the values entered into the Object and update it can I refresh the page then and have those buttons show as selected?  Doing that with selectLists or text fields seems to be easy/automatic but not radio buttons because i am just generating the options list from scratch for the questions. 

I have a VF page with matching controller to make some links for our reps. I want to append the value from the last name field from the running user's User object to my link. In my controller i have the main url hardcoded as a string and then i add parameters to that string depending on the field values. But when if i do something like

 

link = link + 'spid=' + User.LastName;

 

What I actually get is "spid=LastName"  

 

If i try to add the value as a apex:param to a link the code "%3f" shows up where it should have an "&". 

I'm seeing this (all by itself) in a debug log. What does it mean? And why does it claim to take 9,136 ms? And why is there another debug log, immediately following, and resulting from the same (single) click, but with a start time only three seconds later?

Element thePage called method {!checkManageability} returned type PageReference: none

I know I can build a dashboard with my VF page and display the dashboard snapshot on the home tab but it is not scalable and my VF page is a list which grows.

 

So how can I display my VF page on the home tab as a component? Do I have to build an html component and use the iframe tag? I tried that just now and it basically worked but it shows a complete inline salesforce window. So its the Opportunities tab (the tabstyle of the VF page) within the home tab, both with all sets of tabs and links. How can i just display the page without the tabs and sidebar?

In the detail pages for Contacts Account and Opportunities there is a related list Activity History. It seems to only show the activities "assigned" to you. How can we make it show all activities for all users. The reasoning is that is it usefull for us to see if somebody else has an activity done or in progress for this account rather than stepping on their toes.

 

Thanks. 

hi all, this is my first post, made in desperation after searching to try and find this solution already discussed but no luck so far.

 

my problem is the restrictions on the behaviour of the inbuilt send email button in only lookingup contacts or person accounts. - I need to use the 'send email' functionality from my custom object (in order to merge the custom object field data into the email template) to send emails to leads as well as accounts, and I don't want to convert these leads at this stage just so that I can send them this email (I intend to automate this email being send to new leads on creation in the future).

 

I understand that I need to use a custom 'send email' button in replacement of the standard one, and the code for this button should facilitate contacts/person account and leads both being permitted in the recipient lookup.

 

has anyone built this already and can help me out?

 

thanks

Hi

 

I am fairly new to Force.com development and have hit an issue trying to build some relationships on a custom object.

 

I have an 'Assessment' custom object with a custom lookup field to a 'Claim' custom object.  I want to build a further custom lookup field on Assessment: 'Claim Contact' that looks up from another custom object, but this object is the detail in a master-detail relationship with the Claim object. 

 

I want to know how to constrain the 'Claim Contact' lookup so that it only shows values that are related to the Claim that has already been looked up on to the Assessment.

 

i.e. if the Assessment is linked to Claim A, which has child Contacts Jack and Jill, then these should be the only contacts I am able to pick using the 'Claim Contact' lookup on the Assessment.  If the assessment is not linked to any Claim then I need the lookup to return no results.

 

Is there a configuration solution to this or if not does anyone know what the best approach is to do this?

 

Many thanks in advance!

  • April 15, 2009
  • Like
  • 0
For some reason the standard field "Manager" (type hierarchy) on the User object seems to be limited to displaying on the User page only.  It is not visible via the API (using APEX Explorer) nor can it be selected in a standard SF report.  I see nothing in the API reference guide that suggests this particular User object field can not referenced or queried via the API. 
 
Am I missing something?  Is this not possible?  Any insight would be appreciated.  Thanks...