• Prashant Gulve
  • NEWBIE
  • 20 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 8
    Replies
Hi Team Need your Help on this trigger detail info provide please help..

On this trigger while creatig new contact record when i select Child Sham record on 'Account Name' field then Parent website getting auto populate on contact website but when i Select Parent Account Ram in contact 'Account Name' filed then it's showing Contact Website field blank. so it should reflect parent website in both scenario. Below is details
[when ever new contact record will created parent account website filed should get update on contact. even if child selected]

Created a trigger on Contact object (before update) to auto populate  Website__c field on creation of New Contact record. on update of Account Parent -Account-Website field and Child Account Website field.
1- I have created Website Field in both account and conatct object data type URL
2- Account Parent Record created. e.g- Ram and website filed updated www.Ram@pareant.com
3- Account Child record created. e.g- Sham and Parent account name is Ram selected website updated www.sham@child.com
4- On New Contact creation always Pareant Account Website should get display on contact object. e.g- www.Ram@pareant.com  even if we select Sham on contact object Account name field still www.Ram@pareant.com should get display on Contact object website filed.
Trigger:-
trigger WebsiteAutopopuoonContactTrigger on Contact (before insert) {
    WebsiteAutopopuoonContact.createWebsite(trigger.new);
  }
Handler:-
public class WebsiteAutopopuoonContact {
    public static void createWebsite(List<Contact> contList) {
        
       Set<Id> accSet = new Set<Id>();
        
        for(Contact Con : contList) {
            accSet.add(Con.AccountId);
            System.debug('accSet===='+accSet);
        }
        List<Account> accList = [Select Id
                                       , Name
                                        , Website
                                         , Account.Parent.Website
                                 from Account where Id IN:accSet];
        
        map<Id, String> idvswebsite = new map<Id, String>();
        for(Account acc : accList){
            idvswebsite.put(acc.id, acc.Parent.Website);
        }
        System.debug('accList==='+accList);
        
        Map<Id,Contact> conNameKeys = new Map<Id,Contact>();
        for(Contact Con : contList) {
            conNameKeys.put(Con.AccountId, Con);
            Con.Website__c = idvswebsite.get(Con.AccountId);
            System.debug('conNameKeys==='+conNameKeys);
        }
    }
}
 
Hi Team
can any help me to create this batch class
How to write batch apex when Order__c object Amount__c field get change from 100 to 200 then Opportunity Amount Field should get update to 200.
On Order__c object there is formula field External_Id__c filed and on Opportunity there is Text field External_Id__c.
so can any one help me to create batch apex class.
Create a job which will run every hour and sync the opportunity and opp products with order and order products.
(ex. if amount field on order changes from 100 to 200 then update related opportunities amount field with 200) same for order line items and opportunity line items
Write a trigger on Contact object (after update) of any filed on contact the Mailing City  filed should get change to Pune .
e.g- if i made changes to any contact filed the Mailing City filed should get update to Pune.
Hi Everyone i am facing an Error: Syntax error. Extra account__c  how can i resolved it.

If account__c is not null, account__r.name+'|' +Customer_ID__c Else if Contact__c is not null , Contact__r.account.name+'|'+Customer_ID__c Else if Opportunity__c is not null, Opportunity__r.account.name+'|'+Customer_ID__c Else, null or blank
1. There should be series of progress indicators in a single lightning page which shall reside behind a tab.
2. Each progress indicator shall have a separate lwc component
3. First progress indicator should have input fields which shall accept basic Account details. On save Account should be created and should be redirected to next progress indicator screen, on cancel we should be redirect to home page.
4. This same progress indicator shall have an extra input field which shall accept number of contact records to be created for the Account. Meaning atleast 1 should be default value for this that means at least 1 contact progress indicator should be present.
5. Next progress indicators will be dependent on the number of contact records input:
           1. Each screen on this shall accept basic contact fields. On save Contact should be created and associated to Account and should be redirected to next progress indicator.
6. When all the contacts are created, we need to have a last progress indicator which shall accept each file input per Contact. Save these files below the Contact.
7-There will be finish button on the progress indicator present on the file progress indicator. On click of finish, we should be redirected to Account Detail page of the account which was created as part of step 
please help me to complete this task
Create two custom fields on account :
1. Contact Last updated ( date time )
2. Contact Updating  count ( number )
When ever a child contact record is updated, update the date/time field “Contact Last updated” field on parent account, also increment the counter field “Updating  count” with plus one. So that if the child contact record is updated 3 times the counter field “Updating  count” will have the value 3, and the “Contact Last updated” will have the value of the date/time it was last updated.
Apex function to collect and print all the unique IDs of account which belongs to banking industry ( account.industry) and are based on US and UK (account.country)? Please help ASAP..
Apex Trigger on Lead object, 2 Fileds Phone and Mobile Phone
if I make changes or updates/ modify any thing on phone same changes
needs to be happened to Mobile Phone as well?
Please Assist..
Create two custom fields on account :
1. Contact Last updated ( date time )
2. Contact Updating  count ( number )
When ever a child contact record is updated, update the date/time field “Contact Last updated” field on parent account, also increment the counter field “Updating  count” with plus one. So that if the child contact record is updated 3 times the counter field “Updating  count” will have the value 3, and the “Contact Last updated” will have the value of the date/time it was last updated.
Hi Team Need your Help on this trigger detail info provide please help..

On this trigger while creatig new contact record when i select Child Sham record on 'Account Name' field then Parent website getting auto populate on contact website but when i Select Parent Account Ram in contact 'Account Name' filed then it's showing Contact Website field blank. so it should reflect parent website in both scenario. Below is details
[when ever new contact record will created parent account website filed should get update on contact. even if child selected]

Created a trigger on Contact object (before update) to auto populate  Website__c field on creation of New Contact record. on update of Account Parent -Account-Website field and Child Account Website field.
1- I have created Website Field in both account and conatct object data type URL
2- Account Parent Record created. e.g- Ram and website filed updated www.Ram@pareant.com
3- Account Child record created. e.g- Sham and Parent account name is Ram selected website updated www.sham@child.com
4- On New Contact creation always Pareant Account Website should get display on contact object. e.g- www.Ram@pareant.com  even if we select Sham on contact object Account name field still www.Ram@pareant.com should get display on Contact object website filed.
Trigger:-
trigger WebsiteAutopopuoonContactTrigger on Contact (before insert) {
    WebsiteAutopopuoonContact.createWebsite(trigger.new);
  }
Handler:-
public class WebsiteAutopopuoonContact {
    public static void createWebsite(List<Contact> contList) {
        
       Set<Id> accSet = new Set<Id>();
        
        for(Contact Con : contList) {
            accSet.add(Con.AccountId);
            System.debug('accSet===='+accSet);
        }
        List<Account> accList = [Select Id
                                       , Name
                                        , Website
                                         , Account.Parent.Website
                                 from Account where Id IN:accSet];
        
        map<Id, String> idvswebsite = new map<Id, String>();
        for(Account acc : accList){
            idvswebsite.put(acc.id, acc.Parent.Website);
        }
        System.debug('accList==='+accList);
        
        Map<Id,Contact> conNameKeys = new Map<Id,Contact>();
        for(Contact Con : contList) {
            conNameKeys.put(Con.AccountId, Con);
            Con.Website__c = idvswebsite.get(Con.AccountId);
            System.debug('conNameKeys==='+conNameKeys);
        }
    }
}
 
Create a job which will run every hour and sync the opportunity and opp products with order and order products.
(ex. if amount field on order changes from 100 to 200 then update related opportunities amount field with 200) same for order line items and opportunity line items
Write a trigger on Contact object (after update) of any filed on contact the Mailing City  filed should get change to Pune .
e.g- if i made changes to any contact filed the Mailing City filed should get update to Pune.
Apex Trigger on Lead object, 2 Fileds Phone and Mobile Phone
if I make changes or updates/ modify any thing on phone same changes
needs to be happened to Mobile Phone as well?
Please Assist..