• jcald
  • NEWBIE
  • 55 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 46
    Replies
Not sure if this can be done. I created a case2lead button in the case layout. I have auto-fill the lead pagelayout through url ex. lea8={! Contact.Phone }. I would like to reference the case number to the lead information. I would like to create a field "Case Related To" and making the case number a linkable link to the case.

Thanks for your help
  • March 11, 2015
  • Like
  • 0
Is it me or is the Case Ownership Change a little too cumbersome? is there an easier way to change case owner than having to go to a different page? like creating a drop-down field or an empty field lookup on the case detail page?

Thanks for sharing -J
  • October 24, 2014
  • Like
  • 0
This one seems to be getting the best of me. I'm trying to pass a value from Case to this Lead form. I've been trying two ways: URL and Controller Extension.

I created a button 'Create Lead' in the Case page layout. trying to pass value with Phone. What am I doing wrong here....

Button URL:
var myURL = 'https://cs18.salesforce.com/apex/Lead_Override_test?caseId=={!Case.Id}&{!Lead.Phone}={!Case.Phone}';
srcUp(myURL);


Lead_Override_test Page:
<apex:page standardController="Lead" extensions="caseToLeadExtension" action="{!setCaseInfo}" sidebar="false" showHeader="false">
    <apex:form >
        <apex:sectionHeader title="Lead Edit" subtitle="">
        </apex:sectionHeader>
        <apex:pageBlock mode="edit" id="lead" title="Lead Edit">      
            <apex:pageblockbuttons >
             <apex:commandbutton action="{!save}" value="Save"></apex:commandbutton>
             <apex:commandbutton action="{!cancel}" value="Cancel"></apex:commandbutton>
            </apex:pageblockbuttons>
                <apex:pageblocksection title="Lead Information">
                 <!-- Make Owner field editable -->
                 <apex:inputfield value="{!Lead.OwnerId}" id="ownerid"></apex:inputfield>
                 <!-- Start Default User -->
                <script type="text/javascript">
                    document.getElementById('{!$Component.ownerid}').value = '{!$User.FirstName} {!$User.LastName}';
                </script>
                <!-- END Default User -->
                 <apex:pageblocksectionitem >
                 <apex:outputlabel value="{!$ObjectType.Lead.Fields.FirstName.label}"></apex:outputlabel>
                 <apex:outputpanel >
                 <apex:inputfield value="{!Lead.Salutation}"></apex:inputfield>
                 <apex:inputfield value="{!Lead.FirstName}"></apex:inputfield>
                 </apex:outputpanel>
                 </apex:pageblocksectionitem>               
                 <apex:inputfield value="{!Lead.Phone}"></apex:inputfield>
                 <apex:inputfield value="{!Lead.LastName}"></apex:inputfield>
                 .......etc
        </apex:pageBlock>
    </apex:form>
</apex:page>


Please help, Thanks!
  • August 28, 2014
  • Like
  • 0

Can someone help me figure out how to reduce this formula with CASE? I just don't know how to finish the rest....


IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999 &&  AND (ISPICKVAL( Months__c, "24-Months")) , 0.04524,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999  &&  AND (ISPICKVAL( Months__c, "36-Months")) , 0.03135,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999  &&  AND (ISPICKVAL( Months__c, "48-Months")) , 0.02436,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999  &&  AND (ISPICKVAL( Months__c, "60-Months")) , 0.02014,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999 &&  AND (ISPICKVAL( Months__c, "24-Months")) , 0.04472,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&  AND (ISPICKVAL( Months__c, "36-Months")) , 0.03069,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&  AND (ISPICKVAL( Months__c, "48-Months")) , 0.02358,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&  AND (ISPICKVAL( Months__c, "60-Months")) , 0.01923, NULL))))))))


REDUCED FORMULA...(giving me a ....Error: Syntax error)

IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&(CASE(1,IF(ISPICKVAL(Months__c,"24-Months")),0.04524,​​
IF(ISPICKVAL(Months__c, "36-Months")),​​0.03135, NULL))
  • April 07, 2014
  • Like
  • 0
Can someone help. Im getting this error and know not how to resolve.


System.LimitException: DML currently not allowed
Class.WorksheetLender.getRateX: line 33, column 1


public Price_Range__c getRateX() {
Lender__c a = new Lender__c (Name = 'KEY');
insert a;
String Key ;
Decimal amount=[SELECT Finance_Amount__c FROM Worksheet__c LIMIT 1].Finance_Amount__c;
if(amount >150000 && amount <250000){
Key='a67K00000004Emt';
}
if(amount >99999 && amount <149999){
Key='a67K00000004Emy'; 
}
return [SELECT Range_Rate_Month24__c FROM Price_Range__c WHERE Id =: a.id  LIMIT 1];
}


I know that this isn't best practice to hardcode id but this is only practice knowledge. And then work my way up to bulk and simplify. Thanks for your help
  • March 28, 2014
  • Like
  • 0
Im kinda in a pickle of sorts....and I don't know how to go about this but here it goes....

I have an amount field, depending on the range amount (for ex. 3000-9999, 10000-14999, and 15000-20000). I would like to change the id in MyController

CONTROLLER:
public Price_Range__c getRate4() {
    return [SELECT Range_Rate_Month24__c FROM Price_Range__c WHERE Id =:  'a67K00000004Emt'  LIMIT 1];
    }

VF PAGE:
<td><apex:outputtext value="{0, number, $000.00}">
    <apex:param value="{!Worksheet__c.Points__c*Worksheet__c.Finance_Amount__c*Rate4.Range_Rate_Month24__c}"/>
    </apex:outputtext>
</td>


Would it better to create an IF statement on the Amount field (Formula/Number), or create a hidden field based on the range and do a call out like:

IF( Finance_Amount__c >149999, "WHERE Id =:'a67K00000004Emt'",
IF(Finance_Amount__c >99999, "WHERE Id =:'a67K00000004Emy'",NULL
))
 
This compiles but I don't know if this is the right way to do this. Can someone share their knowledge on how to go about this?

Thanks
  • March 19, 2014
  • Like
  • 0
Can someone tell me what I am doing wrong in this formula?

IF(Finance_Amount__c <3000, "Range$0-$3000",
  IF(Finance_Amount__c >3000, "Range$3000-$9000",
    IF(Finance_Amount__c >9000, "Range$9000-$12000",
      IF(Finance_Amount__c >12000, "Range$12000-$14000", NULL
)
)
)
)

Only the top two statements validates, when the amount is entered.

Thanks
  • March 11, 2014
  • Like
  • 0
Hi

I have created a custom object that contains vendors with one field (price). I would like to add the (price) field from these vendors in my visualforce page. How do I call out a vendor ID and its field in apex code? do I add to my existing standardcontroller?

Thanks
  • March 11, 2014
  • Like
  • 0
Anyone know how to remove the shadow from the apex:selectcheckboxes?

User-added image
  • March 07, 2014
  • Like
  • 0
Hi -

I created this VF page. There is an input field (amount__c), a commandbutton {!save}, and a Outputtext field "" with a formula {!amount__c*0.04521}. So when I click "save", the formula would calculate and input the sum into the output text field and stay on that vf page. That works but...

When I transfer all that to a new vf page in a custom object. When I click the save button to calculate, the page will go to the Home page of that custom object.

Can someone help me figure this out?

Thanks-J

  • March 05, 2014
  • Like
  • 0
Is there a way to retrieve a value from a specific custom field from a specific account?
  • February 21, 2014
  • Like
  • 0
How do I reference a custom field from an Account in Apex?
I am trying to reference a custom field (Account) from an apex code in a VF Opportunity page. I've tried using a lookup relationship both way (Account to Opportunity) (Opportunity to Account) and it is saying "Error: Incorrect pararmeter......Expected Number, recieved Text"

my apex code:

<Apex:outputtext value="{!1.04*Opportunity.Amount__c*Opportunity.Factor_Rate__c} " />

Opportunity.Factor_Rate__c is related to a custom field in Account. Please help . Thanks
  • February 19, 2014
  • Like
  • 0
Is there a way to call out a standard controller for ex. "Account" from an already existing custom controller? What is the best practice for using a custom controller and standard controller together from one apex class. or is my thinking is all wrong? Thanks
  • February 11, 2014
  • Like
  • 0
Is there a way to have a href link to an email attachment from an email alert template?

We have a voice mail that will email to our salesforce support queue with an attachement. I would like to be able to hear the recordered attachemtn from the email alert template that is sent me. As it takes three clicks inside the console in order to hear the message.

Appreciate any information - Thanks james
  • February 04, 2014
  • Like
  • 1
I have a custom button that I want to URL pass to pre-populate field. The field id is showing as "j_id0:j_id3:j_id4:j_id18:Subject" from inspect element. I am also using a VF page to create a new case. Can someone help?

I've tried using this and other combinations....

Execute javascript / URL

/apex/Create_A_New_Case?retURL=%2F500%2Fo&RecordType=012U000000016QN&ent=Case&save_new=1&sfdc.override=1&j_id0:j_id3:j_id4:j_id18:Subject=test1234
  • December 31, 2014
  • Like
  • 0

I've installed Salesforce for Social Media and when I create a case from one of the twitter post. The case defaults to my default record type. I'd like to be able to change to another record type. I've managed to create a custom buttom but dont understand javascript to well. Can someone help me?

 

 

 

Detailed Page button:

window.location = "/apex/sf4twitter__TwitterToCase?records={!sf4twitter__Twitter_Conversation__c.Id}&retURL=" + encodeURIComponent(window.location);

 

I was trying this, which didn't work:

 

window.location = "/apex/sf4twitter__TwitterToCase?records='012U000000016QN'&retURL=" + encodeURIComponent(window.location);

 

red = my recordtype ID

 

 

I found out there are two buttons.

 

List Button:

{!REQUIRESCRIPT("/soap/ajax/15.0/connection.js")}

var records = {!GETRECORDIDS( $ObjectType.sf4twitter__Twitter_Conversation__c)};
var loadedFromHoverMenu = false;
var url = null;

function dataNav(showDataBrowser) {
dataBrowser = '';
for(var i in navigator) {
dataBrowser += "navigator." + i + "\t\t=\t" + eval("navigator." + i)+ "\n";
}
return (showDataBrowser) ? dataBrowser : {'name' : navigator.appName, 'version' : navigator.appVersion, 'userAgent' : navigator.userAgent};

}

try{
if(document.getElementsByName('fcf')[0] == null){
elementName = 'is:islv:inlineSchedulerListView:enhancedList:fcf';
}else{
elementName ='fcf';
}
var listViewFilters = document.getElementsByName(elementName)[0];
var filterId = listViewFilters.options[listViewFilters.selectedIndex].value;
url = new String(window.location);

if (url.indexOf('emptyHtmlDoc.html') >= 0 ) {
url = parent.location;
loadedFromHoverMenu = true;
}

if (url.search(/fcf=[^&]+/) >= 0) {
url = url.replace(/fcf=[^&]+/, 'fcf=' + filterId);
} else {
if (url.indexOf('?') == -1) {
url += '?'
}
url += '&fcf=' + filterId;
}
}
catch(err) {
url = new String(window.location);
if (url.indexOf('emptyHtmlDoc.html') >= 0 ) {
url = parent.location;
loadedFromHoverMenu = true;
}
}

if(dataNav()['name'] == 'Microsoft Internet Explorer'){
if(records.length > 50){
alert('{!JSENCODE($Label.sf4twitter__BROWSER_NOT_SUPPORT_50)}');
}
else {
if (records[0] == null) {
alert("{!JSENCODE($Label.sf4twitter__PLEASE_SELECT_1)}") ;
}
else {
if (loadedFromHoverMenu) {
parent.location = "/apex/sf4twitter__TwitterContact?records=" + records + "&retURL=" + encodeURIComponent(url);
} else {
window.location = "/apex/sf4twitter__TwitterContact?records=" + records + "&retURL=" + encodeURIComponent(url);
}
}
}
}
else {
if (records[0] == null) {
alert("{!JSENCODE($Label.sf4twitter__PLEASE_SELECT_1)}") ;
}
else {
if (loadedFromHoverMenu) {
parent.location = "/apex/sf4twitter__TwitterContact?records=" + records + "&retURL=" + encodeURIComponent(url);
} else {
window.location = "/apex/sf4twitter__TwitterContact?records=" + records + "&retURL=" + encodeURIComponent(url);
}
}
}

  • December 06, 2013
  • Like
  • 0

I think I've already checked with most of the email template discussions but really haven't found if this can be done.

 

Scenario:

John is in Service Cloud and is answering a customer through case email. He fills out all the necessary field (From, To, Subject, and Body) and selects a custom HTML/CSS email template.

Now, instead of clicking the button "Send Email", i would create buttons that said "Preview in HTML or "Preview in Text"  so the John can preview all the fields that he filled out into my custom HTML/CSS email template. Preview window with the "Send Button"

 

Reasons:

Branded email templates throughout org

 

Before diving into trying to develop this, can anyone tell me if this can be done or not? My thinking is yes and sounds simple. But i think the part of the action triggerring of the new buttons and possibly calling out the new fields to transfer the info to the custom HTML/CSS email template can somewhat be difficult. And not knowing what other hang ups I will face.

 

I appreicate the feedbacks. Thanks

-J

 

  • November 07, 2013
  • Like
  • 1

I'm trying to create a different case page layout for different record types in the service console.

For example:

I have one record type that has multiple job types. I'd like to see a picklist for job types on the page layout but not for the other record types.

This doesn't work.

<apex:inputfield value="{!IF(Case.RecordType=='IT Services','Case.Job_Type__c','null')}"/>


Can anyone help? or let me know if this is possible?

  • September 18, 2013
  • Like
  • 0

How do I enter a default value with app_user in this code.

 

                <apex:inputField value="{!Case.Ownerid}"/>

 

Thanks

  • September 12, 2013
  • Like
  • 0

I'm trying to see if this can be done. Supposively, I need an apex trigger. My issue is that I need to change case ownership from my first intial response from the email to case. Meaning, if there is a new case in the queue and tech1 replies to the case. I want tech1 to be the owner of that case. Since he responded first to the case. Is this possible with an apex trigger?

 

I've taken Vinit apex trigger and tried to customize it but realized i didnt know what to do with or where to put it or what objects to create..etc.etc.I'im a newbie to apex world.

 

trigger ReplyEmailToCase on EmailMessage (after insert) {
List<String> frmadd = new List<String>();


List<Id> cseIds = new List<Id>();

User con = new User();

List<Case> cse = new List<Case>();


List<Case> updatedCseList = new List<Case>();

 



for(EmailMessage msg : Trigger.new){
frmadd.add(msg.FromAddress);

cseIds.add(msg.parentid);

}

 

con = [SELECT OwnerId FROM User WHERE Email in:frmadd limit 1];

cse = [SELECT ownerid,id, Description, caseNumber FROM Case WHERE Id in: cseIds];

 

for(Case cs:cse){


cs.ownerid = con.ownerid;

updatedCseList.add(cs);

}

 

update updatedCseList;

}

 

 

Can someone point to the right direction? Thanks!

 

  • August 09, 2013
  • Like
  • 0
Is there a way to have a href link to an email attachment from an email alert template?

We have a voice mail that will email to our salesforce support queue with an attachement. I would like to be able to hear the recordered attachemtn from the email alert template that is sent me. As it takes three clicks inside the console in order to hear the message.

Appreciate any information - Thanks james
  • February 04, 2014
  • Like
  • 1

I think I've already checked with most of the email template discussions but really haven't found if this can be done.

 

Scenario:

John is in Service Cloud and is answering a customer through case email. He fills out all the necessary field (From, To, Subject, and Body) and selects a custom HTML/CSS email template.

Now, instead of clicking the button "Send Email", i would create buttons that said "Preview in HTML or "Preview in Text"  so the John can preview all the fields that he filled out into my custom HTML/CSS email template. Preview window with the "Send Button"

 

Reasons:

Branded email templates throughout org

 

Before diving into trying to develop this, can anyone tell me if this can be done or not? My thinking is yes and sounds simple. But i think the part of the action triggerring of the new buttons and possibly calling out the new fields to transfer the info to the custom HTML/CSS email template can somewhat be difficult. And not knowing what other hang ups I will face.

 

I appreicate the feedbacks. Thanks

-J

 

  • November 07, 2013
  • Like
  • 1
Not sure if this can be done. I created a case2lead button in the case layout. I have auto-fill the lead pagelayout through url ex. lea8={! Contact.Phone }. I would like to reference the case number to the lead information. I would like to create a field "Case Related To" and making the case number a linkable link to the case.

Thanks for your help
  • March 11, 2015
  • Like
  • 0
This one seems to be getting the best of me. I'm trying to pass a value from Case to this Lead form. I've been trying two ways: URL and Controller Extension.

I created a button 'Create Lead' in the Case page layout. trying to pass value with Phone. What am I doing wrong here....

Button URL:
var myURL = 'https://cs18.salesforce.com/apex/Lead_Override_test?caseId=={!Case.Id}&{!Lead.Phone}={!Case.Phone}';
srcUp(myURL);


Lead_Override_test Page:
<apex:page standardController="Lead" extensions="caseToLeadExtension" action="{!setCaseInfo}" sidebar="false" showHeader="false">
    <apex:form >
        <apex:sectionHeader title="Lead Edit" subtitle="">
        </apex:sectionHeader>
        <apex:pageBlock mode="edit" id="lead" title="Lead Edit">      
            <apex:pageblockbuttons >
             <apex:commandbutton action="{!save}" value="Save"></apex:commandbutton>
             <apex:commandbutton action="{!cancel}" value="Cancel"></apex:commandbutton>
            </apex:pageblockbuttons>
                <apex:pageblocksection title="Lead Information">
                 <!-- Make Owner field editable -->
                 <apex:inputfield value="{!Lead.OwnerId}" id="ownerid"></apex:inputfield>
                 <!-- Start Default User -->
                <script type="text/javascript">
                    document.getElementById('{!$Component.ownerid}').value = '{!$User.FirstName} {!$User.LastName}';
                </script>
                <!-- END Default User -->
                 <apex:pageblocksectionitem >
                 <apex:outputlabel value="{!$ObjectType.Lead.Fields.FirstName.label}"></apex:outputlabel>
                 <apex:outputpanel >
                 <apex:inputfield value="{!Lead.Salutation}"></apex:inputfield>
                 <apex:inputfield value="{!Lead.FirstName}"></apex:inputfield>
                 </apex:outputpanel>
                 </apex:pageblocksectionitem>               
                 <apex:inputfield value="{!Lead.Phone}"></apex:inputfield>
                 <apex:inputfield value="{!Lead.LastName}"></apex:inputfield>
                 .......etc
        </apex:pageBlock>
    </apex:form>
</apex:page>


Please help, Thanks!
  • August 28, 2014
  • Like
  • 0

Can someone help me figure out how to reduce this formula with CASE? I just don't know how to finish the rest....


IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999 &&  AND (ISPICKVAL( Months__c, "24-Months")) , 0.04524,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999  &&  AND (ISPICKVAL( Months__c, "36-Months")) , 0.03135,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999  &&  AND (ISPICKVAL( Months__c, "48-Months")) , 0.02436,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 25000 && Total_Amount__c < 49999  &&  AND (ISPICKVAL( Months__c, "60-Months")) , 0.02014,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999 &&  AND (ISPICKVAL( Months__c, "24-Months")) , 0.04472,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&  AND (ISPICKVAL( Months__c, "36-Months")) , 0.03069,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&  AND (ISPICKVAL( Months__c, "48-Months")) , 0.02358,
IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&  AND (ISPICKVAL( Months__c, "60-Months")) , 0.01923, NULL))))))))


REDUCED FORMULA...(giving me a ....Error: Syntax error)

IF( Bank_Lender__r.Name  =  "Mytestlender" &&  Total_Amount__c > 50000 && Total_Amount__c < 99999  &&(CASE(1,IF(ISPICKVAL(Months__c,"24-Months")),0.04524,​​
IF(ISPICKVAL(Months__c, "36-Months")),​​0.03135, NULL))
  • April 07, 2014
  • Like
  • 0
Can someone help. Im getting this error and know not how to resolve.


System.LimitException: DML currently not allowed
Class.WorksheetLender.getRateX: line 33, column 1


public Price_Range__c getRateX() {
Lender__c a = new Lender__c (Name = 'KEY');
insert a;
String Key ;
Decimal amount=[SELECT Finance_Amount__c FROM Worksheet__c LIMIT 1].Finance_Amount__c;
if(amount >150000 && amount <250000){
Key='a67K00000004Emt';
}
if(amount >99999 && amount <149999){
Key='a67K00000004Emy'; 
}
return [SELECT Range_Rate_Month24__c FROM Price_Range__c WHERE Id =: a.id  LIMIT 1];
}


I know that this isn't best practice to hardcode id but this is only practice knowledge. And then work my way up to bulk and simplify. Thanks for your help
  • March 28, 2014
  • Like
  • 0
Im kinda in a pickle of sorts....and I don't know how to go about this but here it goes....

I have an amount field, depending on the range amount (for ex. 3000-9999, 10000-14999, and 15000-20000). I would like to change the id in MyController

CONTROLLER:
public Price_Range__c getRate4() {
    return [SELECT Range_Rate_Month24__c FROM Price_Range__c WHERE Id =:  'a67K00000004Emt'  LIMIT 1];
    }

VF PAGE:
<td><apex:outputtext value="{0, number, $000.00}">
    <apex:param value="{!Worksheet__c.Points__c*Worksheet__c.Finance_Amount__c*Rate4.Range_Rate_Month24__c}"/>
    </apex:outputtext>
</td>


Would it better to create an IF statement on the Amount field (Formula/Number), or create a hidden field based on the range and do a call out like:

IF( Finance_Amount__c >149999, "WHERE Id =:'a67K00000004Emt'",
IF(Finance_Amount__c >99999, "WHERE Id =:'a67K00000004Emy'",NULL
))
 
This compiles but I don't know if this is the right way to do this. Can someone share their knowledge on how to go about this?

Thanks
  • March 19, 2014
  • Like
  • 0
Can someone tell me what I am doing wrong in this formula?

IF(Finance_Amount__c <3000, "Range$0-$3000",
  IF(Finance_Amount__c >3000, "Range$3000-$9000",
    IF(Finance_Amount__c >9000, "Range$9000-$12000",
      IF(Finance_Amount__c >12000, "Range$12000-$14000", NULL
)
)
)
)

Only the top two statements validates, when the amount is entered.

Thanks
  • March 11, 2014
  • Like
  • 0
Hi

I have created a custom object that contains vendors with one field (price). I would like to add the (price) field from these vendors in my visualforce page. How do I call out a vendor ID and its field in apex code? do I add to my existing standardcontroller?

Thanks
  • March 11, 2014
  • Like
  • 0
Hi -

I created this VF page. There is an input field (amount__c), a commandbutton {!save}, and a Outputtext field "" with a formula {!amount__c*0.04521}. So when I click "save", the formula would calculate and input the sum into the output text field and stay on that vf page. That works but...

When I transfer all that to a new vf page in a custom object. When I click the save button to calculate, the page will go to the Home page of that custom object.

Can someone help me figure this out?

Thanks-J

  • March 05, 2014
  • Like
  • 0
Is there a way to retrieve a value from a specific custom field from a specific account?
  • February 21, 2014
  • Like
  • 0

Error: Compile Error: Return value must be of type: LIST<Account> at line 4 column 9 <-- this is the error i get when i try to run the following code:

 

public class MyController {
    public List<Account> getMyAccounts ()
    {
        return [select Id, Name, Accountnumber from Account
        Order by LastmodifiedDate DESC Limit 10];
    }
}

 

please let me know where i went wrong. Thank you.