• TUSHAR_MATHUR
  • NEWBIE
  • 30 Points
  • Member since 2021

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 12
    Replies
I queried Tasks
SELECT accountid FROM Task WHERE What.Type = 'Account 'AND CreatedDate = LAST_N_MONTHS:24
I queried Account and Opportunity
SELECT Id, Name FROM account WHERE Rating = 'Prospect 'AND Id NOT IN (SELECT accountid FROM Opportunity WHERE CreatedDate = LAST_N_MONTHS:24) 
how to connect this withmy Account and opportunity.

Thanksin Advance
Hi All,

I want to know how can we delete the Azure blob from Salesforce itself.
We are able to upload it and preview it.

 
Hi all, I just seen that lightning:fileupload won't work on lightning out or standalone apps. i have seen a code for custom file upload using apex .
but i can't see the files where those files has been uploaded here is the link from where i get it to learn. please help me .
Thanks
Custom File Uploader (https://sfdcmonkey.com/2017/09/25/file-upload-lightning-component/)

picklist field name = Member_Level__c

value= Level 1 - Parent Account Holder
            Level 2 - Adult Secondary Account
            Level 3 - Child Dependent Account
 

Select Id,Account.id,Account.name,Account__c,Parent_Member_Name__r.id,(Select Id from cases),(select Id from Contact_Products__r) from contact WHERE Member_Level__c=:Level 1 - Parent Account Holder And AccountId IN :list_Employer

 

I try this query in batch class but when running the code I get an error "System.QueryException: unexpected token: '1' "

please tell me how to fix that

Thanks in Advance
 

iam trying to integrate Salesforce with Google cloud.during the process, i am trying to generate jks certificate by following steps. i am not sure how to generate eneCA.pem file? does any one know about it. using jks certificate ,we will create certificate to upload in certificate and key management system
My batch Class:-
```java
global with sharing class DeleteBulkRecordBatch2 implements Database.Batchable<SObject>, Database.Stateful {
    String query = '';
    String sObjectType = '';
    List<String> list_Employee = new List<String>();
    Date FROM_DATE = Null;
    Date toDate = Null;
    Set<Id> set_nonDeleteId = new Set<Id>();

    // Constructor
    //sobject type = Employeer(account),Contact
    global DeleteBulkRecordBatch2(String sObjectType, List<String> list_Employee,Date FROM_DATE,Date toDate){
        this.sObjectType = sObjectType;
        this.list_Employee = list_Employee;
        this.FROM_DATE = FROM_DATE;
        this.toDate = toDate;
        
    }

    global Database.QueryLocator start(Database.BatchableContext bc){       
        if(sObjectType == 'Order'){
            if(fromDate == null && toDate == null ){
                query='Select Id,account_holder__r.Account__c,account_holder__r.AccountId from Order__c WHERE account_holder__r.AccountId IN:list_Employer';
            }else{
                query='Select Id,account_holder__r.Account__c,account_holder__r.AccountId from Order__c WHERE account_holder__r.AccountId IN:list_Employer AND (NOT (CreatedDate >=:fromDate AND CreatedDate <=: toDate))'; 
            }
        }else if(sObjectType == 'Contact'){
            if(fromDate == null && toDate == null ){
                query='Select Id,Account.id,Account.name,Account__c,Parent_Member_Name__r.id,(Select Id from cases),(select Id from Contact_Products__r) from Contact WHERE AccountId IN :list_Employer';
            }else{
                query='Select Id,Account.id,Account.name,Account__c,Parent_Member_Name__r.id,(Select Id from cases),(select Id from Contact_Products__r) from contact WHERE Member_Level__c=:Level 1 - Parent Account Holder And AccountId IN :list_Employer AND account__c NOT IN :set_NonDeleteId AND CreatedDate >=:fromDate AND CreatedDate <=:toDate';
            }
        }
        System.debug(query);
        return Database.getQueryLocator(query);
    }

    global void execute(Database.BatchableContext bc, List<SObject> s_object){
        System.debug('--execute---');
        System.debug('--set_nonDeleteId---'+set_nonDeleteId);
        System.debug('--list_Employee---'+list_Employee);
        
        if(sObjectType == 'Order') {
            for(SObject obj : s_object){
                order__c order  = (order__c)obj;
                if(order != null){
                    set_nonDeleteId.add(order.Account_Holder__r.account__c); 
                }
                System.debug('--set_nonDeleteId---'+set_nonDeleteId);
            }
}else if(sObjectType == 'Contact'){
            List<Contact> list_contact = new List<contact>();
            List<Case> list_Case = new List<Case>();
            List<Contact_Products__c> list_Contact_Products = new List<Contact_Products__c>(); 
            for(SObject obj : s_object){
                Contact contacts  = (contact)obj;
                list_contact.add(contacts);
                System.debug('--list_contact---'+list_contact);
                for(Case c : contacts.cases){
                    Case Cas = (Case)c;
                    list_Case.add(Cas); 
                    System.debug('--list_Case---'+list_Case);
                }

                for(Contact_Products__c Contact_Products : contacts.Contact_Products__r){
                    Contact_Products__c ContactProducts  = (Contact_Products__c)Contact_Products;
                    list_Contact_Products.add(ContactProducts);
                    System.debug('--list_Contact_Products---'+list_Contact_Products);
                }
            }

            delete list_Case;
            delete list_Contact_Products;
            delete list_contact;
        }
    }
    global void finish(Database.BatchableContext bc){
        if (sObjectType == 'Order') {       
            Id batchJobId = Database.executeBatch(new DeleteBulkRecordBatch2('Contact',list_Employee,FROM_DATE,toDate), 100);
        }
    }
}
```
In this class I have a contact picklist field Member_Level__c have three value like
1.    Level 1 - Parent Account Holder
2.  Level 2 - Adult Secondary Account
3.    Level 3 - Child Dependent Account
and Contact have a selflookup field name- Parent_Member_Name__c here connect with those contact which have "Member_Level__c='Level 1 - Parent Account Holder'"
In my batch class contact query I filter that which "Member_Level__c='Level 1 - Parent Account Holder" those have store in list and Delete that list_contact
now I want when i delete list_contact Delete as well as those contact which are related to "Member_Level__c='Level 1 - Parent Account Holder" 

or how to fetch the record from my contact query which "Member_Level__c = Level 2 or level-3" which are related to level 1 contact

thanks in advance 
 
I queried Tasks
SELECT accountid FROM Task WHERE What.Type = 'Account 'AND CreatedDate = LAST_N_MONTHS:24
I queried Account and Opportunity
SELECT Id, Name FROM account WHERE Rating = 'Prospect 'AND Id NOT IN (SELECT accountid FROM Opportunity WHERE CreatedDate = LAST_N_MONTHS:24) 
how to connect this withmy Account and opportunity.

Thanksin Advance
 Need urgent help for this  Question related to LWC.--

 Make two address fields on CONTACT Object , correspondence address and permanent address.
                   We have to fill both the fields with different addresses, if anyone of them is empty then generate message, 
                  and if the checkbox is selected then both the addresses should be same. I Have to do this with LWC

// i have created 2 custom field on contact and 1 checkbox field as well.


..only below field requried in LWC page according to my question's requirement-- .

Last Name = 

Email = 

correspondence address = 

checkbox = [true,false]

permanent address = 


//  can anyone help me ,  I will be really greatful :-)
// make this simple and easy as much you can,but i need this urgently,plese
 
Hi all, I just seen that lightning:fileupload won't work on lightning out or standalone apps. i have seen a code for custom file upload using apex .
but i can't see the files where those files has been uploaded here is the link from where i get it to learn. please help me .
Thanks
Custom File Uploader (https://sfdcmonkey.com/2017/09/25/file-upload-lightning-component/)
Hi,

-> We have developed 3 lightning components and added that to lightning Record pages.
Even though the form factor is desktop and phone for all these components and pages, it doesn't show up on the iPad.
 
-> Similarly In the apps section, these components don't come up as tabs/apps.
 
-> Is there any Specific reason, for these components to not show up on the iPad?
Note: This is visible on iPhone
 
-> Apparently we have created  App pages that show up on iPad but not the record details page.
 
-> Is there any workaround for this issue? , else I am missing any configuration stuff that needs to be done to make components visible in IPad.
[select id,name,(select name,AccountId from Contacts) from Account where id in(select AccountId from Contact)]

In this SOQL query,What's the difference between Contacts and Contact.I didn't get this relationship.
Please give a hand.