• Shalini
  • NEWBIE
  • 60 Points
  • Member since 2007

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 5
    Replies

Hi,

I am using a visualforce page and would like to add some error messages into it for example if some field is empty etc...... I do not want to set a validation rule, but would like to work on the save function in the controller to display the error message. Would be of great help if someone could point me out the direction to do that.

I have one more question relating to displaying an output in visualforce. I have a lookup field, it has quantity field too, i would like to populate the quantity from the master object, if i change the lookup the value for quantity should also change respectively, I tried formulas but they effect after save, I would like to have immediate change.

Thanks

KD 

  • June 08, 2009
  • Like
  • 1

I need to write a validation rule that if email or phone is blank give an error message. Meaning one or the other need's to be filled in. Can someone please help, thanks

Hi, 

 

Can anyone suggest a solution to overcome the error of "Too many script statements: 200001" in apex class.

 

I wanted to display the sum of resource amount in opportunity products for an Opportunity sorted by Account wise.

 

below is the sample code:

 

query resource amount from opportunity products sort by account name

 

put the opportunity inside SET to avoid duplicates (uniqoppid)

 

put the account id inside SET to avoid duplicates ( uniqaccid)

 

for(each unique account)

{

for(each unique opportunity)

{

for( sum resource amount from all opportunity products)

{

if(uniqoppid == opportunity in opportunity products && uniqaccid == opportunity product->opportunity->account id)

{

//code to display the resource amount

}

}

}

}

 

the above code in red line is the problem. It shows too many script statements: 200001

 

 

Message Edited by Shalini on 06-09-2009 06:03 AM
Hi to all,
Can anyone clear the doubt in Email Services. While creating an Email Service salesforce automatically generates an email id. All the mails sent to this mail id can be created as Contacts,Lead etc. Instead of salesforce genarated mail address can we use our own mail id. Can any give sample code for this..
 
Thanks in advance,
Shalini
Hi to all,
 
Can anyone clear the doubt in Email Services. While creating an Email Service salesforce automatically generates an email id. All the mails sent to this mail id can be created as Contacts,Lead etc. Instead of salesforce genarated mail address can we use our own mail id. Can any give sample code for this..
 
Thanks in advance,
Shalini
Hi everyone,
 
I need a help in renderAs PDF concept. I am generating a PDF in an onclick of a custom button.I want to give an alert message asking the user "Do you want to save this PDF". If yes it gets saved to the associated custom object's Notes and Attachments, Else it remains in the generated PDF page. This process should happen immediately,when the PDF gets open.
 
The problem is that javascript Alert is not working once the PDF is downloaded.
 
Any suggestions will be helpful..
 
 
 
Thanks
Shalini
Hi all,
 
I need some help in Visual Force datatable. Is it possible to define a datatable within another datatable. I have 4 custom objects. Projects,Propsals,Workorder and Tasks.
 
Project will have more than 1 proposal, Proposal will have more than 1 Workorder, Workorder will have more than 1 tasks.
 
I wanted to display all the above 4 details in the below format using PDF.
 
Project Name and details.
Proposal details associated to the project.
Workorder details associated to the Proposal.
Task details associated to the Workorder
 
Can anyone give some sample code of using datatable within another datatable.
 
Thanks in advance.
Hi,
 
I am new to Apex. Can anyone help me on this. I want to check whether a field is null or not using Apex classes.
 
For ex: There is a number field Ratio in custom object Program. Before doing calculations using ratio I just want to check whether ratio is empty.
 
Below is the code. It's not showing any error,but line numbers 4 and 7 are not covered.
 
1. Program__c[] pc = [SELECT id,Program_Net_to_Gross_Ratio__c,Labor_Multiplier__c,Labor_Rates__c from Program__c];
2. if(pc.size() > 0)
3. {
4. if(pc[0].Program_Net_to_Gross_Ratio__c != null)
5. pratio = pc[0].Program_Net_to_Gross_Ratio__c;
6. else
7. pratio = 0;
8. }
  • September 12, 2008
  • Like
  • 0
I've downloaded the Ajax tools 1.0.2 completely,but when i started creating new Apex template it says the error as "your org is not Apex enabled contact support"- what should i do now ???

Hi,

I am using a visualforce page and would like to add some error messages into it for example if some field is empty etc...... I do not want to set a validation rule, but would like to work on the save function in the controller to display the error message. Would be of great help if someone could point me out the direction to do that.

I have one more question relating to displaying an output in visualforce. I have a lookup field, it has quantity field too, i would like to populate the quantity from the master object, if i change the lookup the value for quantity should also change respectively, I tried formulas but they effect after save, I would like to have immediate change.

Thanks

KD 

  • June 08, 2009
  • Like
  • 1

Is there a way that the API access can be enabled for Group edition users?

 

 

Thanks

I need to write a validation rule that if email or phone is blank give an error message. Meaning one or the other need's to be filled in. Can someone please help, thanks

Hi all,
 
I need some help in Visual Force datatable. Is it possible to define a datatable within another datatable. I have 4 custom objects. Projects,Propsals,Workorder and Tasks.
 
Project will have more than 1 proposal, Proposal will have more than 1 Workorder, Workorder will have more than 1 tasks.
 
I wanted to display all the above 4 details in the below format using PDF.
 
Project Name and details.
Proposal details associated to the project.
Workorder details associated to the Proposal.
Task details associated to the Workorder
 
Can anyone give some sample code of using datatable within another datatable.
 
Thanks in advance.
Hi,
 
I am new to Apex. Can anyone help me on this. I want to check whether a field is null or not using Apex classes.
 
For ex: There is a number field Ratio in custom object Program. Before doing calculations using ratio I just want to check whether ratio is empty.
 
Below is the code. It's not showing any error,but line numbers 4 and 7 are not covered.
 
1. Program__c[] pc = [SELECT id,Program_Net_to_Gross_Ratio__c,Labor_Multiplier__c,Labor_Rates__c from Program__c];
2. if(pc.size() > 0)
3. {
4. if(pc[0].Program_Net_to_Gross_Ratio__c != null)
5. pratio = pc[0].Program_Net_to_Gross_Ratio__c;
6. else
7. pratio = 0;
8. }
  • September 12, 2008
  • Like
  • 0