• Rahul Singh 1384
  • NEWBIE
  • 55 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 11
    Replies
Hi Friends,
I am stuck with an issue of a trigger where
I have 3 objects
1) 'Parent_ParentObject_One'    

- Two Child Object in Related List of 'Parent_ParentObject_One' Object.
2) 'Child_ParentObject_One' [Self-Lookup(Parent_ParentObject_One)]
3) 'ChildObject_One' [Lookup(Parent_ParentObject_One)]

Suppose I have a two records in related list of 'Parent_ParentObject_One' under 'ChildObject_One'.
- c_obj1
- c_obj2

- On Updating any record of 'Parent_ParentObject_One' Object, the same record should be cloned under the 'Child_ParentObject_One' Object as a record.
and the child records[ChildObject_One] should also be replicated as under new Child_ParentObject_One's record's related list.

If there would be any possible solution to this It would be highly appreciable.
Thanks.
Hi all,

Can we Check if any Date is fourth Friday of a month in APEX?
Suppose we have a Date '25 Jan 2019'. how can we check if this is fourth friday of month or not in apex?

Any help would be highly appreciated.
Hi all,

Can we have Cron Expression to schedule Job on every 2nd Week only on(Monday, Wednesday and Friday) only at 12 AM.?
What cron we can use for this?

Any help would be highly appreciated.
Hi all,

Cron Expression to schedule on WeekDays only(Monday to Friday).
An example like which will run from 7-July-2018 to 15-July-2019 after every 2 Days on Weekdays(Monday to Friday) only at 12 AM.

Any help would be highly appreciated.
Hi friends,

I have a custom object 'Retailer'[Parent], it has a Picklist Type Field 'Status' with values 'Daily, Weekly, Monthly'
I have another custom object 'Asset'[Child].
Whenever I am creating a record of 'Asset' manually by adding lookup of 'Retailer' that has 'Status' = 'Daily'.
I want to Auto Create 'Asset' Records 'Daily' in midnight with the help of Batch Class.

Any help would be greatly appreciated.
Hi Everyone,

Someone please help me, to Query Any records which contains any numeric value on 2nd place.
For eg: I have 7 accounts with name : 

UnitedAccount,
B12Account,
c13Account,
e6account,
BerlingtonAccount,
75account,
p18TestAccount etc.

I want to query details of those accounts whose name has numeric value on 2nd place.
So, output should be for these accounts:

B12Account,
c13Account,
e6account,
71account,
p18TestAccount

So, what query can i write to fetch these accounts details?
Any help would be greatly appreciated.
Hi friends,

I have a custom object 'MyFixOrder' which has 2 Record Types 'AccountMyOrder' and 'ContactMyOrder'.
I have another custom object 'MyPartOrder' which also has 2 Record Types 'AccountMyOrder' and 'ContactMyOrder'.

Fields for both Objects are Same.
- Name(Text)
- Date of Start(Date)
- Date of End(Date)
- Active(Checkbox)
- OrderType(Text)
Suppose I have two 2 records in 'MyFixOrder' object of 'AccountMyOrder' and 'ContactMyOrder' RecordType
then i have to copy those records in 'MyPartOrder' object with their record types.

Any help would be greatly appreciated.
Hello Friends,

I have a 3 Lists of Account 'acclist1' , 'acclist2', & 'acclist3'
'acclist1' has 3 records.
'acclist2' has 2 records which are also present in 'acclist1'.

and I have a third list 'acclist3' in which i want to add that record which is not present in 'acclist2'.
So How can i acheive this scenario in Apex Code?

Any Example or Code assitance will be greatly appreciated.
I want to write a trigger on Opportunity, in which i have a field 'Individual Type'
I want to insert an event under this opportunity, if 'Individual Type' has some value.
and Send the mail to opportunity owner about event details.
i want to send mail only in case of 'Individual Type' field on opportunity is updated, i do not want to send mail incase of stage or another field updation for e.g:
--> 'Individual Type' is Null after insert or updation of opportunity, then do not send mail.
--> 'Individual Type' is not Null after insert or updation of opportunity, then  send the mail. 
--> 'Individual Type' value has changed from 'ABC' to 'XYZ' after updation of opportunity, then send the mail. 
--> 'Individual Type' value has not changed, after updation of opportunity, it was ABC, and it is still ABC, then do not send mail again. 

Please someone help with solution or any code assistance.
Any help would be greatly appreciated.
please help someone i need to cretae a
Vf Template which have Number of Leads(Unconverted).

any help would be greatly appreciated.
Hello Friends,
I am new to visualforce development,
I want to create a visualforce form in which i want a picklist field and values for picklist will be : DOC, RAR, ZIP
and a TextArea Field in which we can give comment or description
and a Save Button which will save all data of the form to the Activity Object Inside Salesforce
I have picklist field 'Filetype' with values DOC, RAR, ZIP and a TextArea Field 'Description' on Activity Object

and please do not provide any link or reference, if possible, then help me with an example,

Any help would be greatly appreciated
Thanks in Advance
Hello all,
this is code to find total number of contacts for an account. need to write a test class for this code. anyone help me with this!

trigger TriggerCntact on Contact (after insert, after delete) {
    set<ID> accSet = new Set<Id>();
    if(trigger.isinsert){
        for(Contact Con : Trigger.new){
            accSet.add(con.AccountId);
        }
    }
        if(trigger.isDelete){
        for(Contact Con : Trigger.old){
            accSet.add(con.AccountId);
        }
    }
    List<Account> acclist = [SELECT Id from Account WHERE ID IN :accSet];
    List<Contact> conlist = [SELECT AccountId FROM Contact WHERE AccountId IN :accSet];
    list<Contact> listCon = new List<Contact>();
    list<Account> listacc = new List<Account>();
    map<String, Integer> conMap = new Map<String, Integer>();
    for(Account acnt : acclist){
        listCon.clear();
        for(contact cont : conlist){
            if(cont.AccountId == acnt.Id){
                listcon.add(cont);
            ConMap.put(cont.AccountId, listCon.size());
            }
        }
    }
    if(acclist.size()>0){
        for(account a : acclist){
            if(conMap.get(a.Id)==NULL){
                a.Total_Contacts__c    = 0;
            }
            else{
                a.Total_Contacts__c    = ConMap.get(a.Id);
                listacc.add(a);
            }
        }
        if(listacc.size()>0){
            update Listacc;
        }
    }
}

urgent requirement
I Want to set the record value on my multi Lookup field in lightning componentI Want to set the record value on my multi Lookup field in lightning component like this screenshot.

User-added image
I have these 3 objects and all have lookup fields need to update using trigger.
 these are my objects
 1. daily report has fields:
    daily Report Name :
    RegionofReport         :
    Company                 :
 
 2. RegionofReport  object has fields
    RegionofReport Name:
    Resource   :
 
 3. Resource object has fields
    Resource Name :
    Company       :
    
 need to write trigger that when 'daily report' has created need to update company name automatically from (daily_report__r.RegionofReport__r.Resource__r.Company__c
 
  1. daily report has fields
 
    daily report Name :  Travel to company
    RegionofReport                :  US
    Company                :
 
 2. RegionofReport object has fields
    RegionofReport Name:  US
    Resource   :    rajat
 
 3. Resource object has fields
    Resource Name :    rajat
    Company       : Sumit Industries
    
    If daily report 'Travel to comapny' is saved i need to update company as 'sumit Industries' automatically.
I have to refresh a div in a Lightning Component, the same as how we use rerender in a Visualforce Page. How can I do so?

I want to use SVG Icons in my lightning component. Can anyone help me on how to create static resource of SVG Icons,
I can upload static resource and set path accordingly, I only want to know the steps included in creating SVG Icons Static Resource.

Any help would be appreciated.
Thanks In Advance
Rahul

This is a standard component of activity But I want to make same component as a custom component with different tabs? If Any Help, it would be greatly appreciated. Thanks in Advance. 
Hi all,

Can we Check if any Date is fourth Friday of a month in APEX?
Suppose we have a Date '25 Jan 2019'. how can we check if this is fourth friday of month or not in apex?

Any help would be highly appreciated.
Hi all,

Cron Expression to schedule on WeekDays only(Monday to Friday).
An example like which will run from 7-July-2018 to 15-July-2019 after every 2 Days on Weekdays(Monday to Friday) only at 12 AM.

Any help would be highly appreciated.
Hi friends,

I have a custom object 'MyFixOrder' which has 2 Record Types 'AccountMyOrder' and 'ContactMyOrder'.
I have another custom object 'MyPartOrder' which also has 2 Record Types 'AccountMyOrder' and 'ContactMyOrder'.

Fields for both Objects are Same.
- Name(Text)
- Date of Start(Date)
- Date of End(Date)
- Active(Checkbox)
- OrderType(Text)
Suppose I have two 2 records in 'MyFixOrder' object of 'AccountMyOrder' and 'ContactMyOrder' RecordType
then i have to copy those records in 'MyPartOrder' object with their record types.

Any help would be greatly appreciated.
I want to write a trigger on Opportunity, in which i have a field 'Individual Type'
I want to insert an event under this opportunity, if 'Individual Type' has some value.
and Send the mail to opportunity owner about event details.
i want to send mail only in case of 'Individual Type' field on opportunity is updated, i do not want to send mail incase of stage or another field updation for e.g:
--> 'Individual Type' is Null after insert or updation of opportunity, then do not send mail.
--> 'Individual Type' is not Null after insert or updation of opportunity, then  send the mail. 
--> 'Individual Type' value has changed from 'ABC' to 'XYZ' after updation of opportunity, then send the mail. 
--> 'Individual Type' value has not changed, after updation of opportunity, it was ABC, and it is still ABC, then do not send mail again. 

Please someone help with solution or any code assistance.
Any help would be greatly appreciated.
Hello Friends,
I am new to visualforce development,
I want to create a visualforce form in which i want a picklist field and values for picklist will be : DOC, RAR, ZIP
and a TextArea Field in which we can give comment or description
and a Save Button which will save all data of the form to the Activity Object Inside Salesforce
I have picklist field 'Filetype' with values DOC, RAR, ZIP and a TextArea Field 'Description' on Activity Object

and please do not provide any link or reference, if possible, then help me with an example,

Any help would be greatly appreciated
Thanks in Advance
I have these 3 objects and all have lookup fields need to update using trigger.
 these are my objects
 1. daily report has fields:
    daily Report Name :
    RegionofReport         :
    Company                 :
 
 2. RegionofReport  object has fields
    RegionofReport Name:
    Resource   :
 
 3. Resource object has fields
    Resource Name :
    Company       :
    
 need to write trigger that when 'daily report' has created need to update company name automatically from (daily_report__r.RegionofReport__r.Resource__r.Company__c
 
  1. daily report has fields
 
    daily report Name :  Travel to company
    RegionofReport                :  US
    Company                :
 
 2. RegionofReport object has fields
    RegionofReport Name:  US
    Resource   :    rajat
 
 3. Resource object has fields
    Resource Name :    rajat
    Company       : Sumit Industries
    
    If daily report 'Travel to comapny' is saved i need to update company as 'sumit Industries' automatically.
This is a standard component of activity But I want to make same component as a custom component with different tabs? If Any Help, it would be greatly appreciated. Thanks in Advance.