• snehil kumar
  • NEWBIE
  • 5 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 8
    Replies

Hi All, 

When an opportunity status is being changed to prospect, make sure there is a value in start date and (one of: field A, field B, field C, field D)

Please help me to write the validation rule of above condition.

Hi All,

When an Opportunity Status is being changed to prospect, make sure there is a value in the start date and end date.

Hi All,

Write a batch class:

update Total Revenue field to 5000 over account.

Total number of records to update is 20.

Batch size is 5.

So the number of times the class is executed is 4.

Track the Id fields for each execution as:

Batch Job 1 : Ids of success records

Batch job 2 : Ids of success records
Batch job 3: Ids of success records
Batch job 4: Ids of success records
Batch job 5:Ids of success records

 

Thanks in Advance

Hi All,

I have posted my requirements, please help me to write the trigger Thanks in Advance.

Create a field in Account => NumOfContact__c
This field should be a pick list. Values - 1,2,3,4,5

This field value should be same as the number of contacts in the related list.

HI All,
Help me out with this trigger,
Thanks in Advance
Job has a field called Active (checkbox), If job is active and Candidate for that Job is being hired, trigger should calculate total number of Candidates hired so far including the current one and check if it exceeds or equals to number of open position on the Job. If it exceeds or equals, the Job's Active fields should be set to false (unchecked) so the Job is taken out from Active Job lists hence Candidates can not apply for it anymore.
Job manager should be allowed to hire n number of Candidates. Where n= Number of Open Positions. Throw error when Job Manager Hire Candidates beyond Number of Open Positions limit stating "Sorry, No vacancies available for this Job"
Once Job is deactivated, new Candidates should not be allowed to apply for particular deactivated job. Provide error for such Candidates who are applying for Deactivated Job stating "Sorry, Job does not exist".
If more than one Candidate is being hired for the Job at a time, throw an error for such .
Candidates stating "At a time only one Candidate can be hired for a Job"

Hi all,
Please help me out.
I posted my trigger please it throws the exception 


Exception Details: Update failed. First exception on row 0 with id 0035000003IGI8AAAX; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, ContactTrainerCountTrigger: execution of AfterUpdate

caused by: System.QueryException: Record Currently Unavailable: The record you are attempting to edit, or one of its related records, is currently being modified by another user. Please try again.

My trigger named "ConactTrainerCountTrigger" and the trigger code is given below:
trigger ContactTrainerCountTrigger on Contact (After insert, After delete, After undelete, After Update) {
    Set<Id> parentIdsSet = new Set<Id>();
    List<Account> accountListToUpdate = new List<Account>();
    IF(Trigger.IsAfter){
        IF(Trigger.IsInsert || Trigger.IsUndelete){
            FOR(Contact c : Trigger.new){
                if(c.AccountId!=null){   
                    parentIdsSet.add(c.AccountId);
                    
                }
            }
            System.debug('parentIdsSet' + parentIdsSet);
        }
        IF(Trigger.IsUpdate){
            FOR(Contact c : Trigger.new){
                if(c.AccountId!=null){
                    if(Trigger.oldMap.get(c.Id).Type__c != c.Type__c || Trigger.oldMap.get(c.Id).AccountId != c.AccountId){
                        parentIdsSet.add(Trigger.oldMap.get(c.Id).AccountId);
                        parentIdsSet.add(c.AccountId);
                    }
                }
            }
        }
        IF(Trigger.IsDelete){
            FOR(Contact c : Trigger.Old){
                if(c.AccountId!=null){   
                    parentIdsSet.add(c.AccountId); 
                }
            }
        }
        
          
        List<Account> accountList = new List<Account>([Select id ,Name,Trainer_Count__c, (Select id, Name From Contacts where Type__c = 'Trainer') from Account Where id in:parentIdsSet for Update]);
        System.debug('accountList' + accountList);
        FOR(Account acc : accountList){
            System.debug('acc' +acc);
            List<Contact> contactList = acc.Contacts;
            acc.Trainer_Count__c = contactList.size();
            accountListToUpdate.add(acc);
        }
        update accountListToUpdate;
 
    }
    
}

HI All,
Help me out with this trigger,
Thanks in Advance
Job has a field called Active (checkbox), If job is active and Candidate for that Job is being hired, trigger should calculate total number of Candidates hired so far including the current one and check if it exceeds or equals to number of open position on the Job. If it exceeds or equals, the Job's Active fields should be set to false (unchecked) so the Job is taken out from Active Job lists hence Candidates can not apply for it anymore.
Job manager should be allowed to hire n number of Candidates. Where n= Number of Open Positions. Throw error when Job Manager Hire Candidates beyond Number of Open Positions limit stating "Sorry, No vacancies available for this Job"
Once Job is deactivated, new Candidates should not be allowed to apply for particular deactivated job. Provide error for such Candidates who are applying for Deactivated Job stating "Sorry, Job does not exist".
If more than one Candidate is being hired for the Job at a time, throw an error for such .
Candidates stating "At a time only one Candidate can be hired for a Job"

Hi All, 

When an opportunity status is being changed to prospect, make sure there is a value in start date and (one of: field A, field B, field C, field D)

Please help me to write the validation rule of above condition.

Hi All,

I have posted my requirements, please help me to write the trigger Thanks in Advance.

Create a field in Account => NumOfContact__c
This field should be a pick list. Values - 1,2,3,4,5

This field value should be same as the number of contacts in the related list.

when  candidate enter date of birth he/she must be greater than 18 years. how can i write the conditional formula ?
When a checkbox field is 'true' want to automate the sending of a docusign. I know all the logic can be included in javascript for a custom button. Can you do the same for process builder or workflow? Can you use javascript? Or is there another way to automate this process?
Hi ,

I am setting up email to case for an outlook email alias.
I am trying to configure the outlook email system to forward messages to the email alias to the email services address provided by salesforce.
(Through Manage Rules & Alerts in outlook).
but then the case is not getting created. 

Please advise!!

Thank you!

Hi ,

i have been getting this mail from salesforce form yesterday.

 

Your organization (XYZ) has reached its hourly limit for processing workflow time triggers. Processing will resume in the next hour. For information on application limits, see the salesforce.com online help.

 

Could anybody guide me to take corrective as well as preventive action for this?