• R Tye
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 8
    Replies
Hello!  I'm trying to bulk trigger the following query:

for(Case TLnew : Trigger.new) {

High = TLnew.Value__c + 10;
Low = TLnew.Value__c -10 ;

Integer i = [SELECT count() FROM Case x WHERE x.Party1__c = :TLnew.Party1__c  AND x.Party2__c = :TLnew.Party2__c AND x.Value__c <= :High AND x.Value__c >= :Low AND ID != :TLnew.ID ];

TLnew.Similar__c = i;

}

Basically I want to return the number of cases that are similar to the triggering case and update that trigger's Similar__c with that number.  This includes cases with the same party values and within a +/- 10 range of a number.

The following works fine above, but obviously the SOQL is written into the loop.  I can't figure out how to bulk the trigger; I tried storing all the trigger objects in a map, but I can't determine how to iterate over it with the above query conditions.  I could store all the trigger variables in a set, but then I lose the 'AND' conditional link between objects.

Is there a solution to the above?
  • October 12, 2008
  • Like
  • 0
I've installed this on two other computers but I can't get the Force.com IDE remote site to recognize any updates.  I'm using Eclipse 3.3 java and the only thing I see that's different is that this box is running Vista 64 as opposed to 32 on the other two. 

I've validated that the name and url are correct.  My colleague is also having the same issue on Vista 32.

I get this popup error message: "No features found on the selected site(s).  Choose a different site or site category."

Any Suggestions? :smileysad:
  • May 07, 2008
  • Like
  • 0
Hello,
 
Is there some type of groupID associated with the Accountteammember object?  In the different share objects you can create a sharing rule by assigning a UserorGroupId to the share record. 
 
I am attempting to write a trigger to share a case with all the members in a single Account team.  Is there a single Accountteammember GroupId that I can create a case sharing record off of? Or do I have to create a new sharing rule for each individual member in the Account team? 
 
If this isn't possible, would a possible solution be to create a new Group (containing all the members from that account)?  This way I would have an group wrapper to represent all the userId's related to that account and could create a caseshare rule using that ID.
 
Thanks!


Message Edited by R Tye on 01-29-2008 02:08 PM
  • January 29, 2008
  • Like
  • 0
Hello!  I'm trying to bulk trigger the following query:

for(Case TLnew : Trigger.new) {

High = TLnew.Value__c + 10;
Low = TLnew.Value__c -10 ;

Integer i = [SELECT count() FROM Case x WHERE x.Party1__c = :TLnew.Party1__c  AND x.Party2__c = :TLnew.Party2__c AND x.Value__c <= :High AND x.Value__c >= :Low AND ID != :TLnew.ID ];

TLnew.Similar__c = i;

}

Basically I want to return the number of cases that are similar to the triggering case and update that trigger's Similar__c with that number.  This includes cases with the same party values and within a +/- 10 range of a number.

The following works fine above, but obviously the SOQL is written into the loop.  I can't figure out how to bulk the trigger; I tried storing all the trigger objects in a map, but I can't determine how to iterate over it with the above query conditions.  I could store all the trigger variables in a set, but then I lose the 'AND' conditional link between objects.

Is there a solution to the above?
  • October 12, 2008
  • Like
  • 0
I've installed this on two other computers but I can't get the Force.com IDE remote site to recognize any updates.  I'm using Eclipse 3.3 java and the only thing I see that's different is that this box is running Vista 64 as opposed to 32 on the other two. 

I've validated that the name and url are correct.  My colleague is also having the same issue on Vista 32.

I get this popup error message: "No features found on the selected site(s).  Choose a different site or site category."

Any Suggestions? :smileysad:
  • May 07, 2008
  • Like
  • 0
Hi all,
 
Is there any way to redirect the user to another URL once a record is updated?
 
I've created a new custom object, i've a "after update" trigger for this custom object and in this trigger i'm trying to redirect the user to another location if a certain condition that i defined is happening.
 
I would really appriciate any lead or idea for solving this as i really need a solution for this real quick.
 
Thanks alot
Eyal
With the code below how would I go about accessing the child values, in this example, the quantity. I think I'm just having trouble with the syntax.

Thanks.

Code:
PricebookEntry [] entries = [Select Product2.Name, Product2Id, (Select Quantity From OpportunityLineItems) From PricebookEntry where Id IN :pbeIds];
   
for(PricebookEntry pbe : entries){
 system.debug('Name' + pbe.product2.name);
 system.debug('Quantity' + pbe.OpportunityLineItem.quantity);  //this is where I need assitance
}

 


Message Edited by TehNrd on 01-31-2008 04:03 PM
  • January 31, 2008
  • Like
  • 0
Hello,
 
Is there some type of groupID associated with the Accountteammember object?  In the different share objects you can create a sharing rule by assigning a UserorGroupId to the share record. 
 
I am attempting to write a trigger to share a case with all the members in a single Account team.  Is there a single Accountteammember GroupId that I can create a case sharing record off of? Or do I have to create a new sharing rule for each individual member in the Account team? 
 
If this isn't possible, would a possible solution be to create a new Group (containing all the members from that account)?  This way I would have an group wrapper to represent all the userId's related to that account and could create a caseshare rule using that ID.
 
Thanks!


Message Edited by R Tye on 01-29-2008 02:08 PM
  • January 29, 2008
  • Like
  • 0
Hi All,

I would like to implement a paging sceam in datatable. from the VF developer guid I can see that we can only limit the number of records using the "ROW" attribute of the datatable but how can I display the next page or the previous page of data..

Thanks in anticipation of your humble response.

Thanks and regards
pallav
  • January 14, 2008
  • Like
  • 0