• Crm98
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 7
    Replies
Hi Guys,
Hoping someone can help me with building a batch apex based on these requirements:

The batch need to check daily against a mailinglist__c object (Status = sending, mailingdatetime = today)--mailinglist object is reference to newsletter_issue__c object.

If the mailinglist object has status "sending" and Time is today, then initiate the batch and pull in region, newsletter, newsletter issue, type, mailingdatetime,

The batch will query all opportunities, where the opp.region = mailinglist.region, opp.newsletter = mailinglist.newletter, opp.type = mailinglist.type, Stage = "Active" and IncludeinMailing__c = Null.

Create a list of opportunity that match these requirements and then update all opportunity with the mailinglist newsletter issue (id).

Create a list of all opportunity updated with the mailinglist.newsletter issue and then create an asset for each of the opportunity.

Assets will contain reference to mailinglist detail and opportunity detail..that will be extract by SF.com reports.

The batch apex will use Database.Stateful to count the number of asset created and opportuntiy updated.

The batch finish method will create a task to provide a summary of the batch completed.
The batch finish method will update the mailinglist object status to ‘completed’ along with the endDatetime of batch completion.

My Code so far:

global class RunMailingAsset implements Database.Batchable<sObject>, Database.Stateful {

Public MailingList__c  RunMailing;
Public Newsletter__c  NewsletterIssue;
Date effectiveDate = today;
global Integer OppsUpdated = 0;
global Integer AssestCreated = 0;

global Database.QueryLocator start(Database.BatchableContext BC)
    {
String query = 'Select Id, Name, mailingDateTime__c, Newsletter__c, Manual_Run__c, Newsletter_Issue__c, Region__c, Run_type__c, Status__c, Type__c FROM MailingList__c Where Status__c = "sending" and mailingDateTime__c = :effectiveDate';
        return Database.getQueryLocator(query);
    }

global void execute(Database.BatchableContext BC, List<sobject> scope, Map<ID, Opportunity> newmap, Map<ID, Opportunity> oldmap)
    { 
List<opportunity> OppwmatchingCriteria = [Select ID, newsletter__c, region__c, type__c, Stage, Includeinmailing__c , accountId From Opportunity where newsletter__c = :Newsletter_Issue__c and region__c =  :region__c and type =:type and Stage = 'Active' and includeInMailing__c='null'];
for (sobject runMailing : scope) {
  for (Opportunity Opportunity : runMailing. OppwmatchingCriteria){
      opportunity.newsletter__c = runMailing.newsletter_issue__c;
     OppwmatchingCriteria.add(opportunity);              
}
//Increment opportunity updated counter 
OppsUpdated = OppsUpdated +1;
}
If (OppwmatchingCriteria.size()==0)
return;
 
List<Asset> ass = [Select ID, Name, Newsletter__c, Opportunity__c FROM Asset where Opportunity__c in : OppwmatchingCriteria];
Set<ID> Assetfound = new Set<ID>();
For (Asset a: ass)
{if(a.Mailinglist__c= newmap.get(a.id).MailingList__c)
Assetfound.add(a.Opportunity__c);
}
MAP<ID, Opportunity> OppsWithNoAssetforRS = new MAP<ID,Opportunity> ();
For (ID opid: OppwmatchingCriteria)
{
if(!Assetfound.contains(opid))
{
OppsWithNoAssetforRS.put(opid,newmap.get(opid));
}
If(OppsWithNoAssetforRS.size()>0)
{
List<Asset> newAssets = new List<Asset>();
For(opportunity opa: OppsWithNoAssetforRS.value())
{
newAssets.add (name = (mailinglist.name + Date.today()), opportunity__c= op.id, mailinglist__c = runmailing.id, Account__c=op.AccountId);
}
If (newAssets.size>0)
insert newAssets;
AssetCreated = AssetCreated +1;
}
 
global void finish(Database.BatchableContext BC)
    {  RunMailing.EndTime__c = DateTime.now();
RunMailing.Status__c=’Completed’;
Update RunMailing;
 
System.debug(OppsUpdated+ ' records updated.');
System.debug(AssestCreated+ ' records updated.!');
 
    }
 
  • May 17, 2017
  • Like
  • 0

Hi,

Can Apex code be used to create child opportunities from a defined parent opportunity record?

 

1) User create Parent Opportunity by have split status defined as "parent".

2) OnSave, if split status is "Parent" and Probability is 1 then clone parent with products/schedule for split partner assign on parent opps.  (Split 1 owner, split 2 owner)

3) Based on Split % in parent opportunity, update the clone child record for each split partner accordingly.  Update quantity per percentage split (50% ...quantity is 0.50 on each line item).

 

Looking for someone to generate the apex code for this...email me at dlam0718@gmail.com and I can provide the requirements...looking for an estimate on the apex code for this requirements.  

 

Regards,

Duc.

  • March 01, 2010
  • Like
  • 0

Hi,

Can Apex code be used to create child opportunities from a defined parent opportunity record?

 

1) User create Parent Opportunity by have split status defined as "parent".

2) OnSave, if split status is "Parent" and Probability is 1 then clone parent with products/schedule for split partner assign on parent opps.  (Split 1 owner, split 2 owner)

3) Based on Split % in parent opportunity, update the clone child record for each split partner accordingly.  Update quantity per percentage split (50% ...quantity is 0.50 on each line item).

 

Looking for someone to generate the apex code for this...email me at dlam0718@gmail.com and I can provide the requirements...looking for an estimate on the apex code for this requirements.  

 

Regards,

Duc.

  • March 01, 2010
  • Like
  • 0
-I have acted as the Product Lifecycle Responsible for Salesforce.com for hundreds of users.  This consists of Web Development, Project Management and Account Management.
-I have solely architected the system for a deployment of 2000 users for a Global deployment with multiple interfaces and customizations.
-I have created thousands of lines of Javascript and APEX for custom s-controls and Triggers to facilitate business needs.
-I have implemented system integrations using both Java and Cast Iron.  (SAP, SQL, SFDC<>SFDC, etc)
-I have utilized all features within Salesforce.com.  I am an expert with this system.
-I have a Bachelor's degree in Information Technology and a Master's degree in Management Information Systems.

I would like to perform ad-hoc Salesforce.com development work, consisting of configuration projects, code development, system administration.  I can work with you for up to 20 hours per week.  This will be in addition to my full time job as a Salesforce.com Project Manager / Web Developer.  My turnaround time is lightning fast.

Do you have any upcoming projects that would require a Salesforce expert?  Do you have any custom APEX / s-controls / formulas / workflows / etc that you need created?  What else can I help you with?  I am willing to take any size project.

Send me an email at tannershamrock@gmail.com to request for services or more information.

I have an open position for a Sales Technology Specialist.   This position is responsible for the day-to-day support of Sales Operations in using salesforce.com and other technology applications.  This position is responsible for supporting area SFDC systems administrators and internal associates, both onsite and remote, in a help desk role in using SFDC tools and processes.  This position will also perform systems administration duties for salesforce.com, under the guidance of the Manager, Sales Technology.

 

Key Responsibilities:

 

·        Perform user administration in salesforce.com (SFDC).

·        Perform mass account reassignments as needed in SFDC to support territory realignments and open territories.

·        Maintain and develop custom objects and tabs.

·        Develop and maintain custom reports and dashboards. 

·        Perform account validation and research using salesforce.com, D&B, OneSource and other vendors.

·        Serve in a help desk capacity to answer any questions regarding functional and technical usability of salesforce.com for area administrators and field users as tier 2 support for salesforce.com.  Troubleshoots application and software issues. 

·        Acts in liaison role with the corporate help desk to provide support to salesforce.com for users.      

·        Support a variety of other technology initiatives and applications used by the sales, as indicated by the Manager, Sales Technology.


 

Education and/or Experience:

 

Education and/or experience equivalent to a Bachelor’s Degree in business or a technology-related field of study.  3-5 years experience in data analysis, data reporting, systems administration, and help desk or other application support.  Knowledge of and experience in supporting sales organizations is beneficial.

Skill / Competency Requirements:

 

·        Technical – Fluent in use of Windows operating systems and web-based applications using Internet Explorer, including the use of search engines and company research sites such as Hoovers, OneSource and/or D&B.  Proficient in Microsoft Excel, including the ability to use pivot tables and vLookups.  Experience with salesforce.com, Siebel, GoldMine, ACT or other salesforce automation, customer relationship management, or contact management applications is preferred.  Experience with Microsoft Access, SQL, Oracle and/or other relational databases and data reporting tools a strong plus. 

·        Decision Making/Judgment – must be able to resolve inter-related computing application and environment issues to determine cause, relationship, resolution and escalation.  Must be able to work on several concurrent problems and assess relative priority.  Must be able to work independently to make problem determination from available information and act timely for resolution.

·        Specialized Skills – must possess excellent organizational and time management skills.  Requires excellent written and verbal communication skills.  Must be a self-starter with a strong desire to learn and grow in a dynamic sales technology environment.

We have rapidly configured salesforce.com primarily for marketing users in North America, China and Australia. We are possibly looking at rolling-out salesforce.com globally over the next 6 to 12 months.  At this stage we'd be interested in finding a contractor or consultant to assist/manage the database configuration and data migration of the various offices and provide ongoing support.
 
 
I wanted a custom field to be populated automatically based on the selection of values on another custom pick list field. Please help me, if some one has tried this before.
 
Thanks
  • April 07, 2006
  • Like
  • 1
We have an immediate opening for a full time SF.com Administrator.  There would be other duties, but SF.com would be your main responsibility.  Company is located in Itasca, IL.
 
Please post if you are interested in more details
 
05/08/2006 - JOB FILLED

Message Edited by RPCSupport on 05-08-2006 04:46 PM

Click here for the complete Job Posting

Job Description:
The primary responsibility of the Salesforce.com Administrator is the ongoing daily support CNET Channel's CRM system, Salesforce.com. This system is used by field sales, technical consultants, technical support, customer support, marketing and executive staff. It is currently integrated with Oracle Suite Financials, and it is our short-term goal to integrate it with some proprietary in-house production systems. New interfaces and functionality continue to be added to Salesforce.com and this role is responsible for that ongoing implementation. A keen sense of business process understanding and deep understanding of implementing change are highly desirable. The responsibilities of the role will extend from requirements gathering to implementation, training, maintenance and support of all 100+ internal users.

The Salesforce.com Administrator will report to the VP of Technology in New York, and will work closely with the following departments: North American, European and Asia Pacific Sales, Product Marketing, IT and Engineering, and Customer Service and Technical Support.

Message Edited by paulie on 03-28-200609:10 AM

  • March 22, 2006
  • Like
  • 0