• jbardet
  • NEWBIE
  • 10 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 49
    Replies

Essentially, I'm looking to pay for faster answers to questions I post on the developer boards (VF & Apex devleopment). Usually I just need help piecing together the final pieces of the code. If interested and if a good fit, I will have much larger projects for you on the horizon, but for now, just little things.

 

For example,

 

http://boards.developerforce.com/t5/Visualforce-Development/Custom-Button-on-oppty-standard-layout-works-but-not-in-VF-page/m-p/671226

 

I apologize ot the mods and this community if this sort of post goes against the spirit of the collaboration here on the message boards. I'm grateful for everyone's contributions and don't mean to harm the community by offering to pay.

 

Thanks,

 

Jeremy

 

I created a custom button for the standard Opportunity object and it works fine when I put it on a standard page layout on the opportunity, but it's not working when trying to use it in my VF page. (Action doesn't perform and I get sent to a "URL no longer exists" page).

 

Button action is essentially to check / uncheck a custom checkbox field, "RFQ_Receipt_Sent__c".

 

Any help is appreciated, hopefully just a small fix?

 

 

Custom Button (Yes_Send) Code:

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")} 
var v=new sforce.SObject("Opportunity");
v.RFQ_Receipt_Sent__c="{!Opportunity.RFQ_Receipt_Sent__c}";
v.id = "{!Opportunity.Id}";
v.RFQ_Receipt_Sent__c=="1"

if(v.RFQ_Receipt_Sent__c=="0")
{
v.RFQ_Receipt_Sent__c='1';
result=sforce.connection.update([v]);
alert("Success! The RFQ Receipt has been sent. Click OK to return to the opportunity");
}
else if(v.RFQ_Receipt_Sent__c=="1")
{

result=sforce.connection.update([v]);
alert("Oops! It looks like an RFQ Receipt has previously been sent, so we better not send another automatically. Click OK to return to the opportunity.");
}
window.location.reload();

 

 

 

Simple VF Page:

 

<apex:page standardcontroller="Opportunity" extensions="SendRFQReceiptControl" showHeader="true" sidebar="false">
 <apex:form >

    <apex:sectionHeader title="RFQ Receipt" subtitle="Would you like to send an RFQ Receipt to {!primcontact.Name}?"/>
     <apex:commandButton action="{!URLFOR($Action.Opportunity.Yes_Send)}" value="Yes Send Email Now"/>
      <apex:commandButton action="{!cancel}" value="No - Return to Opportunity"/>

 </apex:form>
</apex:page>

 

 

Controller (used to grab oppty's primary contact info)

 

public class SendRFQReceiptControl {
    public final Contact primContact {get; set;}
    public final Opportunity o {get; set;}
    public SendRFQReceiptControl(ApexPages.StandardController controller) {
        this.o=(Opportunity)controller.getrecord();
        try{
            ID primContactid = [select id,contactid from opportunitycontactrole where opportunityid=:o.id and isprimary=true LIMIT 1].contactid;
            primContact = [select id,name from contact where id=:primContactid limit 1];
        }catch(QueryException qe){
            system.debug('ERROR Querying contact:'+qe.getmessage());
        }
    }

}

 

I'm looking for a scalable solution where I can add a VF page to any object to render as PDF. I'm using apex:detail to list all fields on the VF page, but I'd like the option of excluding fields.

 

I'd like to know how to:

 

1) Exclude particular fields on the rendered PDF?

2) Exclude particular field labels? (ie on Activity, when creating a PDF for emails, i really don't need to see "Comments" label beside the email.

3) Change the location of field labels? Can they be moved to above and in line with the field data, rather than to the left margin and centered (vertically).

 

There will be several objects I'd like to do this for, so I was seeing if there was a way to start with all fields, then exclude ones i don't want, rather than having to add them all one by one.

 

I'd like to override the new button on Salesforce to pass in text to the standard Quote Name field. Right now we manually type in pretty Quote Names (text field), ie CustomerName-001, and this requires us to manually search our database for the next sequential number to use.

 

I found this blog post which is the basic principle of what I'm trying to do...

<!-- This example helps you out to pre-populate the account field in the new contact creation -->
<html>
<script type="text/javascript" src="/soap/ajax/15.0/connection.js" > </script> 
<script type="text/javascript" src="/js/functions.js"></script>
<script type="text/javascript">
function LoadingA()
{
try{
var returnURL = '{!$Request.retURL}';
var f= parent.document.createElement('form');
f.method='post';
f.target='_top';
var ch=parent.document.createElement('input');
ch.id='accid'; //This is the id of that component
ch.name='accid';
ch.value='0015000000Upz3h';//This is the real value which you would like to populate on the account lookup
f.appendChild(ch);
parent.document.body.appendChild(f);
f.submit();
}catch(error){
alert('error :'+error);
}
}
</script>
<html>
<body id="thisBody" onload=LoadingA();>
<body>
</html>
I'm interested in doing something like the above post, but instead auto populate the Quote Name, but obviously instead of hard coding it like the code above, we will pull info from the contact record as well as an auto-number field on the quote record. 
(and of course, we'll need the current standard functionality that brings over the opp's primary contact role as the Quote To contact.
So it would look like:  Contact_Field__c--Auto_Number =  ContactText--0237 
help would be very much appreciated!! thanks all, you guys rock.

It would be great if I could not only display the information, but allow users to edit some of the fields (Job #, Delivery Date, Reason for Change / Add'l Notes)

 

<apex:page standardController="Opportunity"  showHeader="false" sidebar="false"  >

<apex:outputText value="Opportunity Jobs" style="font-weight:bold" /> &nbsp; &nbsp;
<br /> 
<p />

<apex:form >
<apex:pageBlock >
<apex:pageblockTable value="{!Opportunity.OpportunityLineItems}" width="100%"  var="ml" border="1"   >
<apex:column >
<apex:facet name="header">Type</apex:facet>
<apex:outputField value="{!ml.Work_Type_NonSynced__c}" />
</apex:column>
<apex:column value="{!ml.Job__c}" />
<apex:column value="{!ml.Drawing__c}" />
<apex:column value="{!ml.Quantity}" />
<apex:column value="{!ml.Delivery_Date_Final__c}" />
<apex:column value="{!ml.Delivery_Change_Reason__c}" />
</apex:pageblockTable>

</apex:pageBlock>
</apex:form>
</apex:page>

 

 

Here's the list, it would be nice if they could edit on the fly! Trying to follow along with this, but thought I'd come here before getting further away from my goal..

 

 

see question below.

 

 

I need to set one filter for this list showing only line items where Sales Price is not = 0.  help??

.....

 

                 <apex:repeat var="line" value="{!relatedTo.OpportunityLineItems}">

                <tr>

 

                     <td>{!line.Product2}</td>

// It says Product2 is not an OpportunityLineItem field--because it's a lookup field on products. If I do figure out how to list Product2, I also need to strip out numerical values from Product2 below so a prodcut of ABC123 is listed as ABC. how do I do that?!  Note: Can't make the change on the SF customizations side b/c of triggers, custom managed code (quote sync tool) etc.

 

                    <td>{!line.Description}</td>

                       <td> <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">

                        <apex:param value="{!line.Delivery_Date_Final__c}" /> 

                        </apex:outputText></td>

                    <td>{!line.Delivery_Change_Reason__c}</td>

                </tr>

                </apex:repeat> 

            </table>

            

....

 

Hi everyone,

 

Dreamforce was amazing! Our company will be upgrading to Enterprise soon so I'm playing around with workflows now.

 

Opportunity Type: Repair

Stage: Estimating

Stage Duration 3 days

Workflow: Send email to estimator that an opportunity has been in Estimating for 3 days.

 

I have the e-mail template setup, just need help with the formula. Not sure what function to use to calculate stage duration?

 

Thanks everyone!

Hi all,

 

My goal is really simple. On the page after clicking "Edit All Products", I would like to have a button that says "Copy Text from Field B into Field A" for all line items. I don't want anything auto-saved or anything, just done so that the user doesn't have to copy and paste text from one field to another.

 

This requires, I believe, an override of the Edit All Products button so that it takes you to a VF page, one with this new custom button.

 

Field B = "Quoted Standard Price"

Field A = "Sales Price" (standard field)

 

So I've gotten that far so far.... !!!   help ? :/

  • September 17, 2010
  • Like
  • 0

Hi everyone,

 

In professional edition I have a JS alert pop up that says "remember to submit this opportunity for approval" that goes off if the quote estimate is > $50,000. We submit approvals by using tasks. "approval" (let's say) would be the title of the task.

 

I want the alert to not pop up if it finds "Approval" in a Task Name.

 

But I can't get it to recognize data in a related list. How do I do this? I think this is a simple issue but no idea.

 

original button code:

 

 <html> 
<head>

<script type="text/javascript" language="javascript" src="/js/functions.js"></script>
<script type="text/javascript" src="/soap/ajax/10.0/connection.js"></script>
<script type="text/javascript">

function throwalert()
{
// Begin by creating 3 variables for the criteria to be met.
var isstatus = "{!Opportunity.StageName}";
var quoteest = "{!Opportunity.Quote_Estimate__c}"
quoteest = quoteest.replace(/[^\d\.]/g, "" ); // strip out all non-numeric characters
quoteest = parseFloat( quoteest );

var msgg = "The Quote Estimate for this opportunity is {!Opportunity.Quote_Estimate__c}. Remember to submit this opportunity for approval.";

if ((quoteest >= 50000) && (isstatus == "Proposal/Price Quote"))
{
alert(msgg);
}
else
{
window.parent.location.replace = "{URLFOR($Action.Opportunity.View, Opportunity.Id,null,true)};"
}
}

</script>
</head>
<body onload="throwalert()";>
</body>
</html>

 

here is what i was thinking for the additional code but i am missing the part about making it recognize what is listed under tasks and/or activity history.

 

    var task = "{!Task.Subject}";
if ( (quoteest >= 50000)
&& (isstatus == "Proposal/Price Quote")
&& (task.toLowerCase().indexOf("approval") < 0 ) )
{
...

 

I have a "Send Quote By" date field that I want to set the default valueas 'Today() + 3' if the Opp Name contains "- RL" in it, otherwise default to Today() + 7  days.

 

formula =

 

IF(CONTAINS(Name__c , "- RL"),  TODAY()+3, TODAY() + 7)

 

But it says I cannot use the field "Name" in this type of formula?

 

I tried thinking about creating a formula field that's a date, but how would I go about making it only a DEFAULT value and not a locked formula field?! I am using this "Send Quote By" as a default but want the sales reps to be able to change it based on customers needs.

 

Please help! Thanks a ton.

-Jeremy

Disclaimer: Professional Edition User.

 

Under the opportunity, when clicking "Edit All Products" we have a bunch of fields and they all show up on one long horizontal line (with the save button awkwardly in the middle of the page).

 

Is it possible to edit the layout of this page so fields can show up vertically instead of horizontally?

 

Thanks for your help!

I have a custom "Send an Email" button at the top of my opp page which basically just fills in a cc: address.

 

It was working fine for a couple of weeks and then all of a sudden the following error alerts for some of our users, but it is working for me (system admin). I have tried this using IE and Firefox, on a system admin account and a user account. On my machine it works but other users are receiving the error???

 

"A problem with the online Javascript for this button or link was encountered.
Object doesn’t support this property or method."

 

 

The code for the button is:

 

location.replace('/email/author/emailauthor.jsp?retURL=/{!Opportunity.Id}&p3_lkid={!Opportunity.Id}&rtype=003&p2_lkid={!Account.Id}&p4=sales@pioneer1.com&template_id=00XA0000000ebqS&p5=');

 

Anyone know why the error all of a sudden pops up?

 

Thanks!

Hi all,

 

I'd like to add a javascript alert to an opportunity page. I've gotten it to be able to alert if criteria are met on Opportunity fields, but what about including Task information in this criteria?

 

i only want the alert to go off if there isn't a task on the opp page that has the word "approved" or "approval" in it. What can I add as the var task to do this?

 

Thanks so much for anyone who can steer me in the right direction. I'm pretty new to this, (clearly..)

 

 

function throwalert()
{
    // Begin by creating 3 variables for the criteria to be met.
    var oppname = "{!Opportunity.Name}";
    var isstatus = "{!Opportunity.StageName}";
    var quoteest = "{!Opportunity.Quote_Estimate__c}"
    quoteest = quoteest.replace(/[^\d\.]/g, "" ); // strip out all non-numeric characters
    quoteest = parseFloat( quoteest );

    var msgg = "The quote estimate for this opportunity is equal to or greater than $50,000. Remember to submit this opportunity for approval. ";

    var task = ??????????

   if ((quoteest >= 50000) && (isstatus == "Proposal/Price Quote"))
    {
        alert(msgg);
    }
    else
    {
        window.parent.location.replace = "{URLFOR($Action.Opportunity.View, Opportunity.Id,null,true)};"
    }
}

 

 

Using Professional Edition, I'd like to create an alert when the quote estimate field >= 50000 and is in the proposal/price quote stage. (And for testing purposes, I'm using an Opp named "Test".

 

Here's what I have so far. When I place it on the opp layout, it errors and shows upas a large blank space.

 

Any help appreciated! Thanks.

 

<html>
<head>

<script type="text/javascript" language="javascript" src="/js/functions.js"></script>
<script type="text/javascript" src="/soap/ajax/10.0/connection.js"></script>
<script type="text/javascript">

function throwalert()
{

// Begin by creating 3 variables for the criteria to be met.

var oppname = "{!Opportunity.Name}";

var isstatus = "{!Opportunity.StageName}";

var quoteest = "{!Opportunity.Quote_Estimate__c}"

// Now create a function which will decide if the criteria is met or not and throw alert message.

//var oppname= "Test"
//var quoteest >= "50000"
//var isstatus = "Proposal/Price Quote"

var msgg = "The quote estimate for this opportunity is equal to or greater than $50,000. Remember to submit this opportunity for approval. "

if ((oppname == "Test") && (quoteest >= 50000) && (isstatus == "Proposal/Price Quote"))
{
alert(msgg);
}
else
{
window.parent.location.replace = "{URLFOR($Action.Opportunity.View, Opportunity.Id,null,true)};"
}
}
</script>
</head>
<body onload="throwalert()";>
</body>
</html>

My Opportunity has a separate lookup called Advertiser which looks up to the Account object. If the Account is a specific record type, then I want the Advertiser to automatically fill in with the same look up name as the existing Account? Since a workflow can't update a lookup field, I've been told I need to create a trigger.

 

Help?

 

I created a custom button for the standard Opportunity object and it works fine when I put it on a standard page layout on the opportunity, but it's not working when trying to use it in my VF page. (Action doesn't perform and I get sent to a "URL no longer exists" page).

 

Button action is essentially to check / uncheck a custom checkbox field, "RFQ_Receipt_Sent__c".

 

Any help is appreciated, hopefully just a small fix?

 

 

Custom Button (Yes_Send) Code:

{!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")} 
var v=new sforce.SObject("Opportunity");
v.RFQ_Receipt_Sent__c="{!Opportunity.RFQ_Receipt_Sent__c}";
v.id = "{!Opportunity.Id}";
v.RFQ_Receipt_Sent__c=="1"

if(v.RFQ_Receipt_Sent__c=="0")
{
v.RFQ_Receipt_Sent__c='1';
result=sforce.connection.update([v]);
alert("Success! The RFQ Receipt has been sent. Click OK to return to the opportunity");
}
else if(v.RFQ_Receipt_Sent__c=="1")
{

result=sforce.connection.update([v]);
alert("Oops! It looks like an RFQ Receipt has previously been sent, so we better not send another automatically. Click OK to return to the opportunity.");
}
window.location.reload();

 

 

 

Simple VF Page:

 

<apex:page standardcontroller="Opportunity" extensions="SendRFQReceiptControl" showHeader="true" sidebar="false">
 <apex:form >

    <apex:sectionHeader title="RFQ Receipt" subtitle="Would you like to send an RFQ Receipt to {!primcontact.Name}?"/>
     <apex:commandButton action="{!URLFOR($Action.Opportunity.Yes_Send)}" value="Yes Send Email Now"/>
      <apex:commandButton action="{!cancel}" value="No - Return to Opportunity"/>

 </apex:form>
</apex:page>

 

 

Controller (used to grab oppty's primary contact info)

 

public class SendRFQReceiptControl {
    public final Contact primContact {get; set;}
    public final Opportunity o {get; set;}
    public SendRFQReceiptControl(ApexPages.StandardController controller) {
        this.o=(Opportunity)controller.getrecord();
        try{
            ID primContactid = [select id,contactid from opportunitycontactrole where opportunityid=:o.id and isprimary=true LIMIT 1].contactid;
            primContact = [select id,name from contact where id=:primContactid limit 1];
        }catch(QueryException qe){
            system.debug('ERROR Querying contact:'+qe.getmessage());
        }
    }

}

 

hi folks this is my first attempt at writing a trigger - not going well! here's what i'm trying to do....

 

i have a custom object called Booking__c that has a lookup field called Commission_Agent__c. 

 

Booking__c is related via lookup to another custom object called Property__c.

 

Property__c has a lookup to a Contact record called Contact_Commission_Agent__c.

 

When a new Booking is created (not every time it's edited, just on creation - or directly after it's created i'm assuming), i need the trigger to lookup the Property__c record via the lookup Field Property__c on Booking__c - then update the Commission_Agent__c field with the id of the Contact_Commission_Agent__c field on the property object. 

 

here's what i have so far. 

 

trigger AssignCommAgent on Booking__c (after insert, before update)
{
//instantiate set to hold unique deployment record ids
Set<Id> bookingIds = new Set<Id>();
for(Booking__c s : Trigger.new)
{
bookingIds.add(s.Property__c);
}

//instantiate map to hold deployment record ids to their corresponding ownerids
Map<Id, Property__c> propertyCommAgentMap = new Map<Id, Property__c>([SELECT Id, Contact_Commission_Agent__c FROM Property__c WHERE Id IN: bookingIds]);

for (Booking__c s : Trigger.new)
{
if (s.Commission_Agent__c == null && propertyCommAgentMap.containsKey(s.Property__c))
{
s.Commission_Agent__c = propertyCommAgentMap.get(s.Property__c).Contact_Commission_Agent__c;
}
}
}

 

here's my error. 

 

Error:Apex trigger AssignCommAgent caused an unexpected exception, contact your administrator: AssignCommAgent: execution of BeforeUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.AssignCommAgent: line 17, column 1

 

any insights are greatly appreciated!

I'm looking for a scalable solution where I can add a VF page to any object to render as PDF. I'm using apex:detail to list all fields on the VF page, but I'd like the option of excluding fields.

 

I'd like to know how to:

 

1) Exclude particular fields on the rendered PDF?

2) Exclude particular field labels? (ie on Activity, when creating a PDF for emails, i really don't need to see "Comments" label beside the email.

3) Change the location of field labels? Can they be moved to above and in line with the field data, rather than to the left margin and centered (vertically).

 

There will be several objects I'd like to do this for, so I was seeing if there was a way to start with all fields, then exclude ones i don't want, rather than having to add them all one by one.

 

Hi,

 

Could you please help me write a test class for my trigger? I managed to get 10% covered, but since I am not a programmer I am having a hard time understanding how to correct it to get more. Thank you in advance!

 

This is my Trigger:

trigger CreateAssetonClosedWon on Opportunity (after insert, after update) {
     for(Opportunity o: trigger.new){ 
      if(o.isWon == true && o.HasOpportunityLineItem == true && o.RecordTypeId == '012200000004fxZ'){
         String opptyId = o.Id;
         OpportunityLineItem[] OLI = [Select UnitPrice, Quantity, PricebookEntry.Product2Id, PricebookEntry.Product2.Name, Description, Converted_to_Asset__c  
                                      From OpportunityLineItem 
                                      where OpportunityId = :opptyId and Converted_to_Asset__c = false];
         Asset[] ast = new Asset[]{};
         Asset a = new Asset();
         for(OpportunityLineItem ol: OLI){
            a = new Asset();
        a.AccountId = o.AccountId;
            a.Product2Id = ol.PricebookEntry.Product2Id;
            a.Quantity = ol.Quantity;
            a.Price =  ol.UnitPrice;
            a.PurchaseDate = o.CloseDate;
            a.Status = 'Purchased';
            a.Description = ol.Description;
            a.Name = ol.PricebookEntry.Product2.Name;
            ast.add(a);
            ol.Converted_to_Asset__c = true;
       }
      update OLI; 
      insert ast;
     }
    }
}

 

I want a printable view of a detail page. The "printable view" standard option doesn't work because I want a logo and I don't want the top right links (close window, print this page, expand all, collapse all.

 

I am trying a quick and dirty renderAs pdf VF page, but the styling is all messed up - the documentation explicitly says  <apex:detail> is unsafe.

 

I don't want to list out each field of the object - since when you add new fields or modify the screen layout, one would have to modify this VF page as well. I tried a few <apex:page> options , such as standardStyleSheets = true, showHeader = false) etc, but none of it works.

 

Is there a trick someone knows which will improve the styling for the code below?

 

 

<apex:page standardController="CObject__c" renderAs="pdf">
<apex:detail relatedList="false"/>
</apex:page>

 

Anyone know what the field name is used to store the sort order for quote line items?

The equivalent for opp line items is called "SortOrder"

 

I want to query and order by this field....

 

thanks in advance,

dale

  • March 23, 2012
  • Like
  • 0

I'd like to override the new button on Salesforce to pass in text to the standard Quote Name field. Right now we manually type in pretty Quote Names (text field), ie CustomerName-001, and this requires us to manually search our database for the next sequential number to use.

 

I found this blog post which is the basic principle of what I'm trying to do...

<!-- This example helps you out to pre-populate the account field in the new contact creation -->
<html>
<script type="text/javascript" src="/soap/ajax/15.0/connection.js" > </script> 
<script type="text/javascript" src="/js/functions.js"></script>
<script type="text/javascript">
function LoadingA()
{
try{
var returnURL = '{!$Request.retURL}';
var f= parent.document.createElement('form');
f.method='post';
f.target='_top';
var ch=parent.document.createElement('input');
ch.id='accid'; //This is the id of that component
ch.name='accid';
ch.value='0015000000Upz3h';//This is the real value which you would like to populate on the account lookup
f.appendChild(ch);
parent.document.body.appendChild(f);
f.submit();
}catch(error){
alert('error :'+error);
}
}
</script>
<html>
<body id="thisBody" onload=LoadingA();>
<body>
</html>
I'm interested in doing something like the above post, but instead auto populate the Quote Name, but obviously instead of hard coding it like the code above, we will pull info from the contact record as well as an auto-number field on the quote record. 
(and of course, we'll need the current standard functionality that brings over the opp's primary contact role as the Quote To contact.
So it would look like:  Contact_Field__c--Auto_Number =  ContactText--0237 
help would be very much appreciated!! thanks all, you guys rock.

It would be great if I could not only display the information, but allow users to edit some of the fields (Job #, Delivery Date, Reason for Change / Add'l Notes)

 

<apex:page standardController="Opportunity"  showHeader="false" sidebar="false"  >

<apex:outputText value="Opportunity Jobs" style="font-weight:bold" /> &nbsp; &nbsp;
<br /> 
<p />

<apex:form >
<apex:pageBlock >
<apex:pageblockTable value="{!Opportunity.OpportunityLineItems}" width="100%"  var="ml" border="1"   >
<apex:column >
<apex:facet name="header">Type</apex:facet>
<apex:outputField value="{!ml.Work_Type_NonSynced__c}" />
</apex:column>
<apex:column value="{!ml.Job__c}" />
<apex:column value="{!ml.Drawing__c}" />
<apex:column value="{!ml.Quantity}" />
<apex:column value="{!ml.Delivery_Date_Final__c}" />
<apex:column value="{!ml.Delivery_Change_Reason__c}" />
</apex:pageblockTable>

</apex:pageBlock>
</apex:form>
</apex:page>

 

 

Here's the list, it would be nice if they could edit on the fly! Trying to follow along with this, but thought I'd come here before getting further away from my goal..

 

 

see question below.

 

 

I need to set one filter for this list showing only line items where Sales Price is not = 0.  help??

.....

 

                 <apex:repeat var="line" value="{!relatedTo.OpportunityLineItems}">

                <tr>

 

                     <td>{!line.Product2}</td>

// It says Product2 is not an OpportunityLineItem field--because it's a lookup field on products. If I do figure out how to list Product2, I also need to strip out numerical values from Product2 below so a prodcut of ABC123 is listed as ABC. how do I do that?!  Note: Can't make the change on the SF customizations side b/c of triggers, custom managed code (quote sync tool) etc.

 

                    <td>{!line.Description}</td>

                       <td> <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">

                        <apex:param value="{!line.Delivery_Date_Final__c}" /> 

                        </apex:outputText></td>

                    <td>{!line.Delivery_Change_Reason__c}</td>

                </tr>

                </apex:repeat> 

            </table>

            

....

 

Problem:  1) Cannot do cross-object workflow
                1a)  Cannot fire workflow off formula field.

So I need a trigger that will force an "edit/save" (that is, an update with no changes necessary) to opportunity products when a user populates a date field, SO_Opened__c,  on the opportunity.

Any help, be it code itself or links to get me further along would be great.

Thanks,

Jeremy

Hello,

 

I'm trying to set up a custom page so that I can add some references for the Opportunity List Item page.  Unfortunately, when I try to Save my edited values nothing changes in the records.  I would like to do this only using a standard controller.  Here's the code I'm using just for this test:

 

 

<apex:page standardController="Opportunity" tabstyle="opportunity">
 <apex:form >
   <apex:pageBlock >
    <apex:pageBlockTable value="{!Opportunity.opportunitylineitems}" var="a">
     <apex:column headerValue="Price">
      <apex:inputField value="{!a.quantity}"/>
     </apex:column>
    </apex:pageBlockTable>
    <apex:commandButton value="Save" action="{!quicksave}"/>
  </apex:pageBlock>
 </apex:form>
</apex:page>

 

Is there something I can do to set it up to properly be able to save the modified line item values?

 

Any help would be appreciated.


Thanks!

I have an IF statement that needs to read

 

"New monthly rate going forward is $1,000.00"

 

My formula is

 

IF(ISBLANK( Custom_Description__c ),
"" ,
"New monthly rate going forward is" &""& Opportunity__r.Current_Monthly_Revenue__c)

 

but the Opportunity__r field is a currency field and the formula Error says "Incorrect parameter for function &(). Expected Text, received Number

 

Thank you in advance

  • July 12, 2010
  • Like
  • 2

I know that I can create a custom link or button on accounts for example that will pass the account id to a report.

 

ex.  button link would be something like :  /00O80000003PXuG?pv0={!Account.Id}

 

I have a custom object with a lookup field to accounts.  Is there a way to build this same type of functionality to pass the account id chosen in the lookup field to the report?  I don't want to pass the custom object id, but the id of a lookup object.  Can that be done?

I have a custom button on one of my custom objects called with an API name of "DeleteX".  I want to include this button in the button bar of my visual force page right next to the edit button.  But when I say "action='{!DeleteX}'" in the commandButton component it doesn't work.  Is what I'm trying to do possible and if so what's the syntax?

 

Thanks in advance. Here's my page as it currently exists.

 

 

<apex:page standardController="Web_Integration__c" showHeader="true" tabStyle="opportunity" title="Web Integration: {!Web_Integration__c.Name}"> <apex:form > <apex:pageBlock title="Web Integration Detail"> <apex:pageBlockButtons > <apex:commandButton action="{!edit}" value="Edit"/> </apex:pageBlockButtons> </apex:pageBlock> </apex:form> </apex:page>

 

 - Hank

 

I have custom object called "Placement" which has a Master-Detail relationship with another Custom Object called "Flight". When I clone a Flight, I also want to clone the Placement(s) associated with it.

Any suggestions on how I could do this via APEX or some other mechanism?

Thanks
Chaitanya
Relating to the article titled The Quick Email Button in the Service & Support Blog of Successforce, I had the following query:

I'm trying to co-opt what Marco Casalaina did for a Case to create a link for an Opportunity.  I'm calling it "quick close email" which, as planned, will allow a rep to pull up our closing email template with one click from the Opportunity page. The syntax I am using follows:

Code:
location.replace('/email/author/emailauthor.jsp—retURL=/{!Opportunity.Id}&p3_lkid={!Opportunity.Id}&rtype=003&p2_lkid={!ContactId}&template_id=<your template here>');

Where "your template here" is the 15-character ID for the email template I would like to use.

Unfortunately, there's something wrong with the command -- it returns an "Unable to Access Page" message when launched from the opportunity. Doubly unfortunately, I know nothing about javascripts, so I can't troubleshoot this on my own. Any clues for me? Thx!
  • July 23, 2008
  • Like
  • 0