• Marc C.
  • NEWBIE
  • 110 Points
  • Member since 2012

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 42
    Replies

I have a VF page that was written by a former coworker.  It uses the URLFOR action for a "New" button.

 

<apex:pageBlock >
                <apex:pageBlockButtons >
                    <apex:commandButton value="New" action="{!URLFOR($Action.Case.NewCase)}" />
                </apex:pageBlockButtons>

This is to create a new case in our Partner Portal, but I'd like to default the Contact on the Case to be the Partner User creating the case (like standard behavior on the Customer Portal).  Is there a way to do that here?  I'm trying to get by since our developer left, so any assistance is appreciated.

LKS

I have a trigger that I just deployed a month ago which had 100% code coverage under Winter 12.  Our Sandbox switched to Spring 13 and now it is showing 0% coverage.  I have rerun the tests and it varies from telling me 2/4 failed to 4/4 failed but always due to the sections where it is a system assert.  Nothing in the code changed except editing a little bit of the adderror line for the text it shows to the user.  Other classes/triggers seem to be having the same issues.  Is anyone else encountering this with Spring 13?

 

Thanks,

Amanda

It looks like the Code Coverage pages for my apex code now includes blank lines and commented out rows as "Un-covered" and highlights them in red.

 

Is anybody else noticing this? Is it a bug?

 

With thanks,

Andy

I have a visualforcepage which is included in a layoutpage.

Viewlayout of this object has an override with another visual force page.

 

When I  call a pagereference methode from "inline" visualforcepage an try to leave the Iframe and load current objectpage again, salesforce creates a new URL with parameter inline=1.

By this parameter, Header and Sidebar is invisible. 

 

Code:

<apex:commandlink styleClass="btn newButton" style="text-decoration: none; margin: 2px !important;" value="Click" action="{!executeAction}" target="_parent">
</apex:commandlink>
pageRef = Page.NAME;
pageRef.getParameters().put('id',OBJECT.Id);
//pageRef = new ApexPages.StandardController(OBJECT).view();

 

 Is there a possibility to avoid getting parameter inline=1?

 

I tried:

  • new parameter inline=0
  • URL as a string
  • new redirect visualforce page

 

without success...

 

Hello,

 

Hopefully easy question.

 

I'm trying to create PDF page and trying to format it nicely.

 

I have datatable with columns to list items I want to show.

Since I want to line up all lable and data field nicely, I've put 4 columns (label, data, label, data).

 

The question is how can I get the label of the field?

I've tyied <apex:outuputlabel value="{!Opportunity.Account.Name.label}"/>

also tried <apex:outuputtext value="{!Opportunity.Account.Name.label}"/>

 

 but didn't work.

 

    <apex:dataTable value="{!Opportunity}" var="o" columns="4" columnsWidth="150px, 220px, 150px,220px" >
    <apex:column >
    <apex:outputlabel value="{!o.Account.Name.label}" />
    </apex:column> 
    <apex:column >
    <apex:outputText value="{!o.Account.Name}" />
    </apex:column> 

 

 

Hi,

 

     I have a requirement where in the default values have to be set for the Standard Field of Opportunity i.e. Opportunity Name, could any one suggest a solution for this. 

 

 

Thanks & Regards

 

Arun

 

I have two lists in my class. One(list1) has names of the donors of last year.Another(List2) has the names of the donors of this year. I need to find the donors who donated last year but not this year. For this I need to subtract the names of list2 from list1.

 

how to do that? I searched in apex pdf doc but did not find any info. Please help me.

 

Thanks

i was hoping to use a hierarchical custom settings object to store user preferences for an app. This would require the user to create and edit their custom setting record.

 

From what i have read this would require every user to have the "Customize Application" permission to create and edit their own custom setting record. Obviously we cannot do that.

 

Is there some way to get around this with a vfpage & apex? So the user can goto a vfpage and create/edit the custom settings object record so they can manage their preferences?

I have installed an application called CaseHistory from appExchange and wanted to modify the relevant VisualForce page - CaseHistory.page.

 

I attempted to use the title attribute of the <apex:page> tag as follows:

<apex:page showHeader="false" controller="CaseHistoryController" title="Case: {!aCase.CaseNumber}">

 

However, I keep seeing the title as "Page Editor - /apex/CaseHistory". I changed my user setting to NOT be in Developer mode but I still don't see the page title changed to what I was trying to set in the code above (Case: caseNumber).

 

Any ideas on how to resolve this?

 

Thanks in advance,

Komal

When I try to install Chatter SmartFollow, I get the following test errors:

 

Problem:

 

1. Apex Classes(01pS000000011bd) chatterfollowbatchcaller.testchatterFollowBatchCaller()

System.Exception: Assertion Failed

Class.chatterFollowBatchCaller.testchatterFollowBatchCaller: line 174, column 3 External entry point

 

2. Apex Classes(01pS000000011bg) chatterfollowrules.testFollowEveryone()

System.Exception: Too many query rows: 501

Class.chatterFollowRules.testFollowEveryone: line 646, column 48 External entry point

 

Validation Errors While Saving Record(s)

 

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "00DS00000007M8X: APEX_TEST_FAILED [01pS000000011bd: chatterfollowbatchcaller.testchatterFollowBatchCaller(): System.Exception: Assertion Failed

Class.chatterFollowBatchCaller.testchatterFollowBatchCaller: line 174, column 3 External entry point, 01pS000000011bg: chatterfollowrules.testFollowEveryone(): System.Exception: Too many query rows: 501

Class.chatterFollowRules.testFollowEveryone: line 646, column 48 External entry point]".

 

Is anyone else running into this issue?

After editing my apex class from within the Force.com IDE, i clicked "Save" button. Got an error "File saved locally, not to server". How can i get past this errror? Thanks!

I've created a vf page, created a home page custom link, and overridden my tab w/ the vf splash page, but my buttons do nothing.

 

How do you create a method for "continue" and "Do not show this message again"? 

  

<apex:page title="About Lead Scoring"> <apex:sectionHeader /> Hi - I'm an about page <apex:form id="theForm" title="form"> <apex:pageBlock > <apex:pageBlockButtons > <apex:commandButton value="Continue" action="{!continue}"/>&nbsp;&nbsp;&nbsp; <apex:commandButton value="Don't Show Me This Again" action="{!????}"/>&nbsp;&nbsp;&nbsp; </apex:pageBlockButtons> </apex:pageBlock> </apex:form></apex:page>

 

 

The help isn't very helpful.   I might just give up on the tab so PE users can still use the app despite the tab limits.

Hi Experts,

can i call standard controller's save action in my extension controller...

 

 

<apex:page standardcontroller="opportunity" extension="oppoExtesion"> <apex:form> <apex:pageblock> <apex:pageblockbutton> <apex:commandbutton value="Save" action="{!mysave}"/> </apex:pageblockbutton> <apex:inputfield value="{!opportunity.name}"/> <apex:inputfield value="{!opportunity.amount}"/> <apex:inputfield value="{!opportunity.closedate}"/> </apex:pageblock> </apex:form> </apex:page> ********Extension************* public class oppoextension { public pagereference mysave() { my validation check...... //Here i wnat to call standard controller's Save Action to perform the save operation as standard way... save(); } }

 

i want to experience standard salesforce validation check , field level security , profile base permission 

as well as my custom validation through apex code

 

so how can i standard controller's Save from my extension's save method...


 

Hi,

I have created a custom list button and want to add this to the list view as well as related lists. I was able to add this custom button to the related list, but not to the standard list page. I am going to the object settings and am adding it to the list view layout, but the button is not showing. How do I get this displayed in the List view?

Thanks

KD 

I'm trying to test an Apex method that calls an @future method.  I looks like my testing works up until the point where the @future test is called.  The test checks some results from the @future method and it looks like they haven't been executed yet.

 

Does @future execute asyncronously in test mode?

 

If so, how does one test @future methods?

 

 

Hello.  I want to create a simple custom list button that creates a new record of a specific record type and with some fields already populated with data.  However, I keep getting the record type screen when I click the button.

 

Here's the entire URL code for the button. I'm not even trying to populate the fields with data right now, just trying to get past the Record Type prompt screen.

 

 

{!URLFOR($Action.Investment_Task__c.New, null, [RecordType='012400000009bAQAAY'])}

 

 

 

Thanks

David

Hi All,
 
 
We are currently facing an issue regarding SMS integration. 
 
We need to send the SMS automatically when a case is saved/edited. For this we have an apex class which consists  of  HTTPS callouts to access the SMS gateway of Value first 
and a trigger which invokes this apex class when ever a case is saved/edited.
 
Now, when ever the trigger is fired i'm getting this exception     "System.CalloutException: Callout from triggers are currently not supported"
 
I think it can be possible by S-Control  but the process should automatic.  
 
And this is very urgent for our project 
 
Pls suggest any solution /workaround  for the same.
 

 
Any help is appreciable.
 
 
Thanks  
Jagan.
I want to have a read-only look-up field in my instance of Salesforce. However, whenever I build one, they either seem to be invisible to all, or editable.
 
I want a Read-Only Look-up field is so I can update it later using some behind-the-scenes APEX coding as part of the sales & contracting process. I just don't want people to be putting information in that field before they're supposed to.
 
Does anybody know if Salesforce doesn't allow for Read-Only Look-ups? I'd understand why.
 
Thanks for your help!
 
Andy
How do I get a custom link to open up in the same window it was launched from?  Normally when I click on a custom link, it opens up the code it calls in a completely new salesforce window that is identical to the source window except for the new context in the iframe...