• arnaud_c
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi,

 

I am trying to create an apex trigger on Opportunity to update a checkbox when the Opportunity stage changes to a certain value. The reason why I need a trigger is because that trigger will allow another workflow to fire when the checkbox is updated.

 

I created the code but it seems to be looking at all opportunities and I do not know how to have the trigger look at this current opportunity only. Can anyone please tel me what is wrong with this code.

 

 

trigger OpptyFollowup on Opportunity (after insert, after update) {


Opportunity oppty = trigger.new[0];


if( 'Followup' .equals(oppty.StageName)){

for(Opportunity o:[Select Alarm__c from Opportunity]){

oppty = o;
oppty.Alarm__c = true;

update oppty;

}

}

}

Hi all,

 

I am trying to create a trigger on a related case that would update a field on the parent case when the new related (child) case is created against the parent. I am not an expert at apex triggers but have modified some code. I have copied it below.

 

Can anybody help me complete the code for this to work.

 

Thanks

 

 

 

trigger UpdateParentCase on Case (after insert, after update){
Case relcase = Trigger.new[0];
Case ca = new Case();
for(Case c:[Select Id,  Attempted_Call__c from Case where
Id = :relcase.Parent limit 1]){
ca = c;
ca.Attempted_Call__c = true;
update ca;
}
}

Hi,

 

I am trying to create an apex trigger on Opportunity to update a checkbox when the Opportunity stage changes to a certain value. The reason why I need a trigger is because that trigger will allow another workflow to fire when the checkbox is updated.

 

I created the code but it seems to be looking at all opportunities and I do not know how to have the trigger look at this current opportunity only. Can anyone please tel me what is wrong with this code.

 

 

trigger OpptyFollowup on Opportunity (after insert, after update) {


Opportunity oppty = trigger.new[0];


if( 'Followup' .equals(oppty.StageName)){

for(Opportunity o:[Select Alarm__c from Opportunity]){

oppty = o;
oppty.Alarm__c = true;

update oppty;

}

}

}

Hi all,

 

I am trying to create a trigger on a related case that would update a field on the parent case when the new related (child) case is created against the parent. I am not an expert at apex triggers but have modified some code. I have copied it below.

 

Can anybody help me complete the code for this to work.

 

Thanks

 

 

 

trigger UpdateParentCase on Case (after insert, after update){
Case relcase = Trigger.new[0];
Case ca = new Case();
for(Case c:[Select Id,  Attempted_Call__c from Case where
Id = :relcase.Parent limit 1]){
ca = c;
ca.Attempted_Call__c = true;
update ca;
}
}

Good day All, 

 

I have create input file component in the page. some questions here 

 

1. How can i change the text value of "browse" button, currently it show me 'Browse'  ?

2. How can 'Browse' text value get change based on different language ? we can't have label for 'Browse' text value right ?

 

Thank you ! 

 

VF page :

 

<apex:form id="theForm"> <apex:pageBlock > <apex:pageBlockSection > <apex:inputFile value="{!document.body}" filename="{!document.name}"/> <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form>

 

 

  • December 16, 2009
  • Like
  • 0