• Dave Medlicott
  • NEWBIE
  • 15 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 10
    Replies
Hello all,
I am buil\ding a custom chatter profile page per this article: http://help.salesforce.com/help/pdfs/en/salesforce_profile_tabs_cheatsheet.pdf and it works beautifully for the most part. However, if the following is my visualforce page:

<apex:page showHeader="false" standardcontroller="user"  docType="html-5.0">
   <apex:outputlink value="https://cs16.salesforce.com/_ui/core/userprofile/UserProfilePage?u=00530000001t1ufAAA&tab=Test" style="font-size:18px;font-weight:bold;color:blue;">Dave</apex:outputLink>
</apex:page>

When I click on the link, it will give a brief flash of the header before showing the page without a header. Of course,  '00530000001t1ufAAA' is a specific user profile in my instance. What I am trying to do is put up some user specific data including a link to the profile page of another user. It works great except for that littlle header flash.

Any ideas?

Thanks, Dave
I have a custom object that has a field that is a lookup to a User. When I put that on a VF page, I get a picklist for the UserRole (Public, Partner User) and the lookup for the name. I'd like to force it to always be for the User and not the partner user. I've tried various things that have no effect. Here's the page:

<apex:page Controller="testController" sidebar="false">
<apex:form >
            <apex:inputField value="{!userName.User__c}" />
</apex:form>
</apex:page>

And the controller:
 
public class testController {

    public test__c userName{get;set;
    public testController() {
        userName=new test__c();
    }
}

If anyone knows how to limit this so onlty the User role is searched and the Role picklist is not displayed, I'd appreciate it.

Thanks, Dave

I must be doing something wrong, but I can't figure it out. Here's my code:

 

...

	List<List<String>> name1 = new List<List<String>>();
        List<String> name2 = new List<String>();
        name2.add('Fred');
        name2.add('Joe');
        System.debug(name2); //<--- Outputs DEBUG|(Fred, Joe)
        
	name1.add(name2);
        System.debug(name1); //<--- Outputs DEBUG|((Fred, Joe))
        
	name2.clear();
        name2.add('Mary');
        name2.add('Jane');
        System.debug(name2); //<--- Outputs DEBUG|(Mary, Jane)
        
	name1.add(name2);
        System.debug(name1); //<--- DEBUG|((Mary, Jane), (already output))

 


I would have expected that last one to output ((Fred, Joe), (Mary, Jane))
Any idea of what's going on?

 

Thanks, Dave

I'm sure I'm missing something here, so hopefully someone can help. I have a custom object that is used as a questionnaire and I'm developing a VF page because the length of each question is too long for a standard object label. Here's the VF page:

<apex:page standardController="Question__c" >
<apex:form id="theForm"> 
	<apex:outputPanel style="font-weight:bold;font-size:18pt;align:center;background-color:#CCFFCC;width=70%;">
					Opportunity Questionnaire:
	</apex:outputPanel>
	<apex:pageBlock >
		<apex:pageBlockButtons > 
			<apex:commandButton value="Save" action="{!save}"/>        
			<apex:commandButton value="Cancel" action="{!cancel}" immediate="true"/>
		</apex:pageBlockButtons>
		<apex:outputPanel style="font-size:12pt;align:center;background-color:#99FF99;"><span style="font-size:16pt">
						METRICS
		</apex:outputPanel> 	
		<apex:pageBlock >
			<apex:outputPanel style="font-size:12pt;align:center;background-color:#99FF99;;">
						1. WHAT METRICS/SUCCESS STORIES DO WE HAVE TO SUPPORT THIS SALES CAMPAIGN? 
			</apex:outputPanel>
			<apex:pageBlockSection columns="1">
				<apex:pageBlockSectionItem >
					<apex:inputField value="{!Question__c.Q1__c}" style="width:70%;"/>   
				</apex:pageBlockSectionItem>                                    
			<apex:pageBlockSection>              
		</apex:pageBlock>
	</apex:pageBlock> 
</apex:form>
</apex:page>
                

 

The question object is on a related list of the opportunity and I embedded this page into the page layout for the Question object. When I create a new Question, it looks great. But when I save it, it still looks like it's in Edit mode. I assume this is because I only have "inputField" statements, but how can I set this up so that it has "inputField" statements during edit and "outputField" styatements during display?  Any clues on what I am doing wrong? 

I've written a trigger on opportunitylineitem and if I have added three line items, for example, and I want to display an error message on just one line, I can't seem to do that. For example,

 

    trigger triggerCheck on OpportunityLineItem (before insert, before update) {

        trigger.new[0]].addError('Error');

    }

 

Displays 'Error' on all three line items.

 

If I do this:

 

    trigger triggerCheck on OpportunityLineItem (before insert, before update) {
        for (integer index=0;index<trigger.new.size();index++){
            trigger.new[index].adderror('Index = ' + index);
        }
    }

 

It displays unique error message on each line, but if I modify it to add a break; (e.g.  trigger.new[index].adderror('Index = ' + index); break;), it displays 'Index = 0' on all three line items.

 

Is there a way to only display an error on, for example, just the 2nd line? Or just the 3rd line?

 

Thanks, Dave

 

Hello all,
I am buil\ding a custom chatter profile page per this article: http://help.salesforce.com/help/pdfs/en/salesforce_profile_tabs_cheatsheet.pdf and it works beautifully for the most part. However, if the following is my visualforce page:

<apex:page showHeader="false" standardcontroller="user"  docType="html-5.0">
   <apex:outputlink value="https://cs16.salesforce.com/_ui/core/userprofile/UserProfilePage?u=00530000001t1ufAAA&tab=Test" style="font-size:18px;font-weight:bold;color:blue;">Dave</apex:outputLink>
</apex:page>

When I click on the link, it will give a brief flash of the header before showing the page without a header. Of course,  '00530000001t1ufAAA' is a specific user profile in my instance. What I am trying to do is put up some user specific data including a link to the profile page of another user. It works great except for that littlle header flash.

Any ideas?

Thanks, Dave

I must be doing something wrong, but I can't figure it out. Here's my code:

 

...

	List<List<String>> name1 = new List<List<String>>();
        List<String> name2 = new List<String>();
        name2.add('Fred');
        name2.add('Joe');
        System.debug(name2); //<--- Outputs DEBUG|(Fred, Joe)
        
	name1.add(name2);
        System.debug(name1); //<--- Outputs DEBUG|((Fred, Joe))
        
	name2.clear();
        name2.add('Mary');
        name2.add('Jane');
        System.debug(name2); //<--- Outputs DEBUG|(Mary, Jane)
        
	name1.add(name2);
        System.debug(name1); //<--- DEBUG|((Mary, Jane), (already output))

 


I would have expected that last one to output ((Fred, Joe), (Mary, Jane))
Any idea of what's going on?

 

Thanks, Dave

I'm sure I'm missing something here, so hopefully someone can help. I have a custom object that is used as a questionnaire and I'm developing a VF page because the length of each question is too long for a standard object label. Here's the VF page:

<apex:page standardController="Question__c" >
<apex:form id="theForm"> 
	<apex:outputPanel style="font-weight:bold;font-size:18pt;align:center;background-color:#CCFFCC;width=70%;">
					Opportunity Questionnaire:
	</apex:outputPanel>
	<apex:pageBlock >
		<apex:pageBlockButtons > 
			<apex:commandButton value="Save" action="{!save}"/>        
			<apex:commandButton value="Cancel" action="{!cancel}" immediate="true"/>
		</apex:pageBlockButtons>
		<apex:outputPanel style="font-size:12pt;align:center;background-color:#99FF99;"><span style="font-size:16pt">
						METRICS
		</apex:outputPanel> 	
		<apex:pageBlock >
			<apex:outputPanel style="font-size:12pt;align:center;background-color:#99FF99;;">
						1. WHAT METRICS/SUCCESS STORIES DO WE HAVE TO SUPPORT THIS SALES CAMPAIGN? 
			</apex:outputPanel>
			<apex:pageBlockSection columns="1">
				<apex:pageBlockSectionItem >
					<apex:inputField value="{!Question__c.Q1__c}" style="width:70%;"/>   
				</apex:pageBlockSectionItem>                                    
			<apex:pageBlockSection>              
		</apex:pageBlock>
	</apex:pageBlock> 
</apex:form>
</apex:page>
                

 

The question object is on a related list of the opportunity and I embedded this page into the page layout for the Question object. When I create a new Question, it looks great. But when I save it, it still looks like it's in Edit mode. I assume this is because I only have "inputField" statements, but how can I set this up so that it has "inputField" statements during edit and "outputField" styatements during display?  Any clues on what I am doing wrong? 

I've written a trigger on opportunitylineitem and if I have added three line items, for example, and I want to display an error message on just one line, I can't seem to do that. For example,

 

    trigger triggerCheck on OpportunityLineItem (before insert, before update) {

        trigger.new[0]].addError('Error');

    }

 

Displays 'Error' on all three line items.

 

If I do this:

 

    trigger triggerCheck on OpportunityLineItem (before insert, before update) {
        for (integer index=0;index<trigger.new.size();index++){
            trigger.new[index].adderror('Index = ' + index);
        }
    }

 

It displays unique error message on each line, but if I modify it to add a break; (e.g.  trigger.new[index].adderror('Index = ' + index); break;), it displays 'Index = 0' on all three line items.

 

Is there a way to only display an error on, for example, just the 2nd line? Or just the 3rd line?

 

Thanks, Dave

 

Hi,

 

I am trying to find out if there is any way to remove an Email service, as I can see no obvious way to do so.

 

This has become an issue because I have created a package that contains an Apex class that handles email messages.

 

I install the package in a development environment and create an Email service that uses that Apex class.  Everything works ok until I want to uninstall the package.  I can't because the Apex class is being used by the Email service, but I can't delete the Email service.

 

Any ideas?

 

Carl

  • September 08, 2009
  • Like
  • 0