• Khemais Menzli
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 4
    Replies
Hi everyone,
Today I faced a problem using SQL queries in production environment to update
The query is the following :
PDATE Contact SET Converted_Month__c = date(year(CreatedDate),month(CreatedDate),1) WHERE ID = 'XYZ'
I tried to execute query above using the SQL panel in Develop tools. BUT I get this message : The query has to start with 'FIND' or 'SELECT'.
One more question, the statement Select * seems blocked by SFDC, is there any technical restriction behind it? if yes, is there a workaroud or a solution to select all fields in a given table?
Your helps is appreciate 
Hi everyone,
I created this new question, because I thought that the old title I have used in this Question : https://developer.salesforce.com/forums/ForumsMain?id=9060G000000I87OQAS, didn't match with my need (Since I can't update the title of my question)
have a requirement to update each opportunity with data coming from a contact, to do it I created an apex scheduler that runs over all OpportunityContactRole in my Database and for each row I get the Contact+Opportunity then I do some logic to update opportunity with data coming from the corresponding contact.
I choosed to use a scheduler instead of a trigger because event on object OpportunityContactRole are not fired!!

I scheduled my apex-class (the scheduler) to be launched each day at 3 A.M
But when I go to «Apex Jobs» page to monitor the status of My Apex job, I see that the Job is failed with this status
JobType : Batch Apex
Status : Completed
StatusDetail :
First error: Update failed. First exception on row 0 with id 0060j0000024tVGAAY; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, OpportunityTrackerTrigger: execution of AfterUpdate
caused by: System.AsyncException: Future method cannot be called fr...
Total Baches : 1
Baches proceeded : 1
Failures : 1

Thank's for help
Hi everyone,
Are there a starting samples to use Scheduler Job in SFDC, I need to plan a job to be started each day at 8:00AM, to copy data from Accounts to opportunities, what is the best practices to write a such Scheduler(should I use a BulkJob+a Scheduler?)
How to test my scheduler before uploading the whole stuff on production environment
I start working with SFDC's triggers since a little bit, what I noticed that triggers on object OpportunityContactRoles are not allowed, are there any way to use fire a trigger when an end-user add a contact to an opportunity.My requirement, is to catch the event when an end-user attach a contact to a given opportunity, thenbased on the data in the contact itself I'll update some properties in the opportunities.
Any help is appreciated  
Hello every one,

I started working with SF apex to add some business to my company.
I have a requirement to update each opportunity with data coming from a contact, to do it I created an apex scheduler that runs over all OpportunityContactRole in my Database and for each row I get the Contact+Opportunity then I do some logic to update opportunity with data coming from the corresponding contact.
I choosed to use a scheduler instead of a trigger because event on object OpportunityContactRole are not fired!!

I scheduled my apex-class (the scheduler) to be launched each day at 3 A.M
But when I go to «Apex Jobs» page to monitor the status of My Apex job, I see that the Job is failed with this status
JobType : Batch Apex
Status : Completed
StatusDetail :
First error: Update failed. First exception on row 0 with id 0060j0000024tVGAAY; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, OpportunityTrackerTrigger: execution of AfterUpdate
caused by: System.AsyncException: Future method cannot be called fr...
Total Baches : 1
Baches proceeded : 1
Failures : 1

Any help is appriciated, I'm open to all suggestions
Thank's
Hi everyone,
Today I faced a problem using SQL queries in production environment to update
The query is the following :
PDATE Contact SET Converted_Month__c = date(year(CreatedDate),month(CreatedDate),1) WHERE ID = 'XYZ'
I tried to execute query above using the SQL panel in Develop tools. BUT I get this message : The query has to start with 'FIND' or 'SELECT'.
One more question, the statement Select * seems blocked by SFDC, is there any technical restriction behind it? if yes, is there a workaroud or a solution to select all fields in a given table?
Your helps is appreciate 
Hello every one,

I started working with SF apex to add some business to my company.
I have a requirement to update each opportunity with data coming from a contact, to do it I created an apex scheduler that runs over all OpportunityContactRole in my Database and for each row I get the Contact+Opportunity then I do some logic to update opportunity with data coming from the corresponding contact.
I choosed to use a scheduler instead of a trigger because event on object OpportunityContactRole are not fired!!

I scheduled my apex-class (the scheduler) to be launched each day at 3 A.M
But when I go to «Apex Jobs» page to monitor the status of My Apex job, I see that the Job is failed with this status
JobType : Batch Apex
Status : Completed
StatusDetail :
First error: Update failed. First exception on row 0 with id 0060j0000024tVGAAY; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, OpportunityTrackerTrigger: execution of AfterUpdate
caused by: System.AsyncException: Future method cannot be called fr...
Total Baches : 1
Baches proceeded : 1
Failures : 1

Any help is appriciated, I'm open to all suggestions
Thank's