• vanessa
  • NEWBIE
  • 5 Points
  • Member since 2010

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

hi everyone.

 

i put a button(through "buttons &links") on a custom object. I want to when the user click on the button, through javascript clear a field on the custom object.

 

Anyone can help me?

 

my code

 

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")};
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")};

var partidafinanceira= new sforce.SObject("Partidas_Financeiras__c");
partidafinanceira.name = '{!Partidas_Financeiras__c.Name}';




    for (var i_tem = 0; i_tem <partidafinanceira.length; i_tem++){
 
        {!Partidas_Financeiras__c.Processo_de_Cobranca__c}.value="''};

hi people!

I have a doubt. i want to do a personalized mail to use to mass email but i must have apex code in order to select for which contact, the prices (custom object) of the produts that they order on the opportunities and then send theythe prices.

Can i do with component?can i do something like that

<apex:page StandardController="Contact" showHeader="false" renderas="pdf" standardStylesheets="false" extensions="MyComponent" >

 

or any ideia?

thanks

Hi.

To prevent the user of generate a visualforce page ( it's a customizing quote) without a number of quote what i have to do?

Im on the opportunity, and i click on a customize button and than create a quote .pdf. I dont want to create the .pdf if the field "numero_proposta" is not generate - cant be obligatory on the Opportunity.

 

Can u help me please?

hi.

 

I make a trigger to update a field on Opportunity already created when it was created a custom object "proposta__c" (related list on Opportunity)

but isnt obrigatory have one "proposta__c" associated to the opportunity.

 

When the trigger not find the "proposta__c" i want to skip. I tried with List<> but not works..

 

here's my code - with the list commented and the other.

 

Please help me

 

trigger preencherNumeroOportunidade on Opportunity (after insert, before update) {

for (Opportunity o : Trigger.new)
{

 Proposta__c p = [select Proposta_N__c, Validade_em_dias__c from Proposta__c
  where
   Oportunidade__c =:o.id AND
   Valida__c ='Sim' LIMIT 1
  
  ];
       //if(p.Proposta_N__c !=null ){
            o.N_proposta_background__c = p.Proposta_N__c; 
            o.validade_proposta_background__c = p.Validade_em_dias__c;          
       // }   
    

}}
/*trigger preencherNumeroOportunidade on Opportunity (after insert, before update, after update) {

 
 Opportunity o = new Opportunity ();
 List <Proposta__c> p = new List<Proposta__c>();
  p = [select Proposta_N__c, Validade_em_dias__c from Proposta__c
  where
   Oportunidade__c =:o.id LIMIT 1
  
  ];
  if(p.size()>0)
        {        
            o.N_proposta_background__c = p[0].Proposta_N__c; 
            
            o.validade_proposta_background__c = p[0].Validade_em_dias__c;   
             update o;       
        }    
   


}*/

Hy. I'm new on Triggers and apex.

I want to know if i can use system.out.println to do this (part of my code) or on trigger i can't make it out a different message that the system message

 

if(pr.preco__c != 0){
     o.UnitPrice = pr.preco__c;}
 else {
  System.out.println("O Produto não tem preço de referência carregado!:" + p.Description );

 }
}

 

Can help me please? thanks

hi everyone.

 

i put a button(through "buttons &links") on a custom object. I want to when the user click on the button, through javascript clear a field on the custom object.

 

Anyone can help me?

 

my code

 

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")};
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")};

var partidafinanceira= new sforce.SObject("Partidas_Financeiras__c");
partidafinanceira.name = '{!Partidas_Financeiras__c.Name}';




    for (var i_tem = 0; i_tem <partidafinanceira.length; i_tem++){
 
        {!Partidas_Financeiras__c.Processo_de_Cobranca__c}.value="''};

hi people!

I have a doubt. i want to do a personalized mail to use to mass email but i must have apex code in order to select for which contact, the prices (custom object) of the produts that they order on the opportunities and then send theythe prices.

Can i do with component?can i do something like that

<apex:page StandardController="Contact" showHeader="false" renderas="pdf" standardStylesheets="false" extensions="MyComponent" >

 

or any ideia?

thanks

Hi.

To prevent the user of generate a visualforce page ( it's a customizing quote) without a number of quote what i have to do?

Im on the opportunity, and i click on a customize button and than create a quote .pdf. I dont want to create the .pdf if the field "numero_proposta" is not generate - cant be obligatory on the Opportunity.

 

Can u help me please?

hi.

 

I make a trigger to update a field on Opportunity already created when it was created a custom object "proposta__c" (related list on Opportunity)

but isnt obrigatory have one "proposta__c" associated to the opportunity.

 

When the trigger not find the "proposta__c" i want to skip. I tried with List<> but not works..

 

here's my code - with the list commented and the other.

 

Please help me

 

trigger preencherNumeroOportunidade on Opportunity (after insert, before update) {

for (Opportunity o : Trigger.new)
{

 Proposta__c p = [select Proposta_N__c, Validade_em_dias__c from Proposta__c
  where
   Oportunidade__c =:o.id AND
   Valida__c ='Sim' LIMIT 1
  
  ];
       //if(p.Proposta_N__c !=null ){
            o.N_proposta_background__c = p.Proposta_N__c; 
            o.validade_proposta_background__c = p.Validade_em_dias__c;          
       // }   
    

}}
/*trigger preencherNumeroOportunidade on Opportunity (after insert, before update, after update) {

 
 Opportunity o = new Opportunity ();
 List <Proposta__c> p = new List<Proposta__c>();
  p = [select Proposta_N__c, Validade_em_dias__c from Proposta__c
  where
   Oportunidade__c =:o.id LIMIT 1
  
  ];
  if(p.size()>0)
        {        
            o.N_proposta_background__c = p[0].Proposta_N__c; 
            
            o.validade_proposta_background__c = p[0].Validade_em_dias__c;   
             update o;       
        }    
   


}*/

Hy. I'm new on Triggers and apex.

I want to know if i can use system.out.println to do this (part of my code) or on trigger i can't make it out a different message that the system message

 

if(pr.preco__c != 0){
     o.UnitPrice = pr.preco__c;}
 else {
  System.out.println("O Produto não tem preço de referência carregado!:" + p.Description );

 }
}

 

Can help me please? thanks