• Hseth-fronde
  • NEWBIE
  • 50 Points
  • Member since 2013

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

Hi,

 

I have to write a scheduled job to find out the opportunity created past 7 days and assign it to another set of owners.

 

when i tried the below code, i am getting some issues with createddate on SOQL.

 

below is my code,

 

Set<Opportunity> setopp = new Set<Opportunity>();
Map<ID,ID> mapFinalOutputOpp = new Map<ID,ID>();
Map<Id,String[]> mapOppInputs = new Map<ID,String[]>();
String AgentIds = Label.Agent_name_for_rerouting;
List<String> StrAgentIDLst= AgentIds.split(',', 5);
system.debug('agent lst'+StrAgentIDLst);
List<String> AgentIDLst = new list<String>();
// getting the strings from the label
for(String s:StrAgentIDLst){
system.debug('individual agent lst'+s);
//String AgentID = Id.valueOf(s);
AgentIDLst.add(s);
}
//fetching the opportunity
date d = system.today().addDays(-7);
system.debug('system date - 7'+d);
date d2 = system.today().addDays(-8);
system.debug('system date - 7'+d2);
for (String Ids:AgentIDLst){
List<Opportunity> lstopp = [Select ID, Inquiry_School__c,LeadSource,CampaignId,Inquiry_Degree__c from Opportunity where Owner.name =:Ids and CreatedDate >: d2 and CreatedDate <: d and StageName = 'Lead'];
setopp.addAll(lstopp);
lstopp=null;
}
system.debug('setopp size'+setopp.size());
system.debug('lstopp'+setopp );

 

Please let me know.

 

 

Hi, 

 

I am generating bar codes on my visualforce page using jquery library. I am able to get the base 64 object of the image using canvas but now I am stuck on how to post it to controller so that I could attach it to the current record. The problem is I am not able to post blob data from visualforce to apex. 

 

I tried couple of thngs 

1. Assing the entire blob data to a hidden variable and then posting but it gives an error . 

2.  I also tried to use the apex:inputfile tab but its value attribute cannot be written using javascript hence even that is not helping as well. 

 

Can someone help me in finding a way on how can I post Base 64 data from visualforce to Apex controller. 

Hi,

 

I have to write a scheduled job to find out the opportunity created past 7 days and assign it to another set of owners.

 

when i tried the below code, i am getting some issues with createddate on SOQL.

 

below is my code,

 

Set<Opportunity> setopp = new Set<Opportunity>();
Map<ID,ID> mapFinalOutputOpp = new Map<ID,ID>();
Map<Id,String[]> mapOppInputs = new Map<ID,String[]>();
String AgentIds = Label.Agent_name_for_rerouting;
List<String> StrAgentIDLst= AgentIds.split(',', 5);
system.debug('agent lst'+StrAgentIDLst);
List<String> AgentIDLst = new list<String>();
// getting the strings from the label
for(String s:StrAgentIDLst){
system.debug('individual agent lst'+s);
//String AgentID = Id.valueOf(s);
AgentIDLst.add(s);
}
//fetching the opportunity
date d = system.today().addDays(-7);
system.debug('system date - 7'+d);
date d2 = system.today().addDays(-8);
system.debug('system date - 7'+d2);
for (String Ids:AgentIDLst){
List<Opportunity> lstopp = [Select ID, Inquiry_School__c,LeadSource,CampaignId,Inquiry_Degree__c from Opportunity where Owner.name =:Ids and CreatedDate >: d2 and CreatedDate <: d and StageName = 'Lead'];
setopp.addAll(lstopp);
lstopp=null;
}
system.debug('setopp size'+setopp.size());
system.debug('lstopp'+setopp );

 

Please let me know.

 

 

Hi, 

 

I am generating bar codes on my visualforce page using jquery library. I am able to get the base 64 object of the image using canvas but now I am stuck on how to post it to controller so that I could attach it to the current record. The problem is I am not able to post blob data from visualforce to apex. 

 

I tried couple of thngs 

1. Assing the entire blob data to a hidden variable and then posting but it gives an error . 

2.  I also tried to use the apex:inputfile tab but its value attribute cannot be written using javascript hence even that is not helping as well. 

 

Can someone help me in finding a way on how can I post Base 64 data from visualforce to Apex controller.