• nits
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 0
    Replies
I have a stream of opportunities coming into the system.
I have a trigger that fires on update event.
 
Now for that I have to pick values for every opportunity from other object and update.
 
trigger Update_AdEntId on Opportunity (before insert) {
opportunity[] opp=trigger.new;
list<opportunity> oppupdate=new list<opportunity>();
// for(user[] uu:[select email from user where id :=opp.ownerid])
for(opportunity oppcount:opp){
user u=[select email from user where id=:oppcount.ownerid];
oppcount.name=u.email;
oppupdate.add(oppcount);
}
update oppupdate;
}
 
 
I am still getting error for two many DML statements. If I am missing somethg. Plz correct the code
  • June 17, 2008
  • Like
  • 0
I have web service in SFDC which willbe accessed by UI in java by n number of users(concurrently)
 
global class Pipeline {

  WebService static opportunity[] Apptaker(string adid, string Ftype, date Frmdt, date todt, string stype, string sorder) {

opportunity[] opp;
SOQL1
 
return opp;
}
 
 
 
There is only one SOQL1 in the code which will be executed.
Now for concurrent callouts to the API do I need to incorporate for loops.
In case for loop is placed, shall I see the error of governor limits in number of SOQL queries per code.
  • June 06, 2008
  • Like
  • 0
I have a web service in SFDC. it is being called by external java app. inputs are sent into web service and output is returned as sobject.
Eg
global class Pipeline {

  WebService static opportunity[] Apptaker(string adid, string Ftype, date Frmdt, date todt, string stype, string sorder) {

opportunity[] opp;
...........
.........
 
return opp;
}
 
 
 
Now I have not handled exceptions. In case there is any exception from web service, how do I return error to the UI java app
  • June 06, 2008
  • Like
  • 0
opp=[select account.fax, apptaker__c, name, ownerid  from opportunity where apptaker__c=:adid and stagename='Prospecting'and closedate between(frmdt, todt) order by closedate asc];
 
 
I am trying to use this query. I am getting error at between. If apex doesnot support this, what is work around
 
 
Thank in advance.
  • June 05, 2008
  • Like
  • 0
1) var oc= '{!TestScreen__c.Occupancy__c}';
alert(oc);
2) var oc= {!TestScreen__c.Occupancy__c};
alert(oc);
 
Statement 2) gives error. I am not able to find the error.
  • May 31, 2008
  • Like
  • 0