• Raghav T
  • NEWBIE
  • 50 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 36
    Questions
  • 8
    Replies
Hi there,
I have been doing an data import through Data Loader for the Notes object. But while i was creating a note using Data Loader it gives me an error.
Below is the Data in am trying to import :
User-added imagePlease help in understanding the mistake or approach.
Thanks
Hello,

In my org I have SF to SF connection setup which target and share the case and related child record of case through that connection.
But whenever I tried to share the attachment that is attached in claassic mode then it got share with connected org.
But when we attach new attachment in lightning mode and then try to share that attachment it wont et shared.
Do anyone know whats the problem here?
Hi there,

I have a task to export all email under case object and move to other org and import all those emails there.
So can we do this with data loader to achieve this scenario? Or Else?

Thanks
Hi there,
I have setup the Salesforce-to-Salesforce connection through which i am trying to send the Case records from Org1 to Org 2.
In Org 1 i have written a PartnerNetworkRecordConnection code to send Case record data.
Here's a probelm In Org 2 I also created a trigger that can target the newly created Case record so that i can catch the record comming from Connections and perform some actions. But I am not able to generate any logs even system.debug().
Trigger Code :
if(Trigger.isAfter && Trigger.isInsert){
        System.debug('Inside trigger InitalCaseLoadFromEmmiTrigger');
        InitalCaseLoadFromEmmiTriggerHandler.initailCaseLoad(Trigger.new);
    }

 
Hi there,
I have been trying to share records from one org to another through SF-To-SF connection, although i've been able to share the Case record but unable to share the related Attachments to  it.
I have also done the setup for that like Publish and Subscribe the Attachments on both the side. But still its not working. Is there any other way round to do this, or am i doing it incorrectly?
Code :
global class SFConnectionFromAToB implements Database.Batchable<sObject> {
    global Date fromDate= date.newInstance(2023,01,09);
    global Date toDate;
    global List <PartnerNetworkRecordConnection> prncList = new List<PartnerNetworkRecordConnection>();
    global Id connectionId = [Select Id, ConnectionStatus, ConnectionName From PartnerNetworkConnection Where ConnectionName = 'MyConnection' AND ConnectionStatus = 'Accepted'].Id;
    
    global Database.QueryLocator start(Database.BatchableContext BC){
        system.debug('inside start');
        String queryString = 'SELECT Id, (SELECT Id FROM Attachments), (SELECT Id FROM CaseComments), (SELECT Id FROM Events), (SELECT Id FROM Tasks) FROM CASE WHERE Id=\'5002i00000D67ybAAB\'';
        system.debug('inside start '+queryString);
      	return Database.getQueryLocator(queryString);
   }

   global void execute(Database.BatchableContext BC, List<sObject> scope){
       system.debug('inside exec '+scope);
       
       for(Case cs : (List<Case>)scope){
           prncList.add(new PartnerNetworkRecordConnection(
               ConnectionId = connectionId,
               LocalRecordId = cs.Id,               
               SendClosedTasks = true,
               SendOpenTasks = true,
               SendEmails = true));
           
       		if(!cs.Attachments.isEmpty()){
               for(Attachment att : cs.Attachments){
                   prncList.add(new PartnerNetworkRecordConnection(
                       ConnectionId = connectionId,
                       ParentRecordID = cs.Id,
                       LocalRecordId = att.Id
					   SendEmails = true));
               }
           }
       }
       
       if(!prncList.isEmpty()){

            try{
                system.debug('prncList : '+prncList);
                upsert prncList;
            }
            catch(System.Dmlexception dmlExceptionInstance){
                System.debug('Record Share Error:' + dmlExceptionInstance.getMessage());
            }
        }
   }

   global void finish(Database.BatchableContext BC){
       
   }
}
Img :
Publishsubscribe
 
Hello,
I have created a batch class that will take a case and related case data like task, atttachment, etc.
Then that data is being transfered/Shared with Partner connection.
But on executing the batch class  if i comment- down the Task, then the case is shared with partner connection but the Attachments is not.
And if I execute the code with the Task as uncommented the it gives error like this :
20:46:15:070 USER_DEBUG [75]|DEBUG|Record Share Error:Insert failed. First exception on row 1; first error: INVALID_PARTNER_NETWORK_STATUS, invalid status for partner network operation: []

Code - Batch Class:
global class SFConnectionFromAToB implements Database.Batchable<sObject> {
    global Date fromDate= date.newInstance(2023,01,09);
    global Date toDate;
    global List <PartnerNetworkRecordConnection> prncList = new List<PartnerNetworkRecordConnection>();
    global Id connectionId = [Select Id, ConnectionStatus, ConnectionName From PartnerNetworkConnection Where ConnectionName = 'MyConnection' AND ConnectionStatus = 'Accepted'].Id;
    
    global Database.QueryLocator start(Database.BatchableContext BC){
        system.debug('inside start');
        String queryString = 'SELECT Id, (SELECT Id FROM Attachments), (SELECT Id FROM CaseComments), (SELECT Id FROM Events), (SELECT Id FROM Tasks) FROM CASE WHERE Id=\'5002i00000C3e4bAAB\'';
        system.debug('inside start '+queryString);
      	return Database.getQueryLocator(queryString);
   }

   global void execute(Database.BatchableContext BC, List<sObject> scope){
       system.debug('inside exec '+scope);
       
       for(Case cs : (List<Case>)scope){
           prncList.add(new PartnerNetworkRecordConnection(
               ConnectionId = connectionId,
               LocalRecordId = cs.Id,               
               SendClosedTasks = true,
               SendOpenTasks = true,
               SendEmails = true));
           
       		if(!cs.Attachments.isEmpty()){
               for(Attachment att : cs.Attachments){
                   prncList.add(new PartnerNetworkRecordConnection(
                       ConnectionId = connectionId,
                       ParentRecordID = cs.Id,
                       LocalRecordId = att.Id
					   SendEmails = true));
               }
           }
           
           if(!cs.Tasks.isEmpty()){
               for(Task tsk : cs.Tasks){
                   prncList.add(new PartnerNetworkRecordConnection(
                       ConnectionId = connectionId,
                       LocalRecordId = tsk.Id,
                       ParentRecordID = cs.Id,
                       SendEmails = true));
               }
           }
       }
       
       if(!prncList.isEmpty()){

            try{
                system.debug('prncList : '+prncList);
                upsert prncList;
            }
            catch(System.Dmlexception dmlExceptionInstance){
                System.debug('Record Share Error:' + dmlExceptionInstance.getMessage());
            }
        }
   }

   global void finish(Database.BatchableContext BC){
       
   }
}

Please guide me in this. Thanks.
Hi there,
I have been trying to send some case and related case records from apex batch class from SF to SF connectors with code.
But here i am stuck init as it is unable to execute.
Which means its not getting inside the start and execute method of batch class. Please let me understand where i am wrong.
Below is the code for same :
public class SFConnectionFromABCToDEFOrg implements Database.Batchable<sObject> {
    public Date dateFrom = date.newInstance(2023,01,10 0,0,0);
    public Id connectionId;
    public String query;
    public SFConnectionFromABCToDEFOrg(Date dateRange) {        
        dateFrom = dateRange;
        system.debug('inside const '+dateRange);
        connectionId = [Select Id, ConnectionStatus, ConnectionName From PartnerNetworkConnection Where ConnectionName = 'MyConnectionOrg' AND ConnectionStatus = 'Accepted'].Id;
    }
    
    public Database.QueryLocator start(Database.BatchableContext BC){
        system.debug('inside start ');
        query = 'SELECT Id, (SELECT Id FROM Attachments), (SELECT Id FROM CaseComments), (SELECT Id FROM Events), (SELECT Id FROM Tasks) FROM CASE WHERE createdDate>=:'+dateFrom;
        system.debug('inside start '+query);
      	return Database.getQueryLocator(query);
   }

   public void execute(Database.BatchableContext BC, List<Case> caseRecords){
       system.debug('inside exec '+caseRecords);
       List <PartnerNetworkRecordConnection> prncList = new List<PartnerNetworkRecordConnection>();
       for(Case cs : caseRecords){
           prncList.add(new PartnerNetworkRecordConnection(
               ConnectionId = connectionId,
               LocalRecordId = cs.Id,
               SendClosedTasks = true,
               SendOpenTasks = true,
               SendEmails = true));
           
           if(!cs.Attachments.isEmpty()){
               for(Attachment att : cs.Attachments){
                   prncList.add(new PartnerNetworkRecordConnection(
                       ConnectionId = connectionId,
                       LocalRecordId = att.Id,
                       SendClosedTasks = true,
                       SendOpenTasks = true,
                       SendEmails = true));
               }
           }
		
       
           if(!cs.CaseComments.isEmpty()){
               for(CaseComment cc : cs.CaseComments){
                   prncList.add(new PartnerNetworkRecordConnection(
                       ConnectionId = connectionId,
                       LocalRecordId = cc.Id,
                       SendClosedTasks = true,
                       SendOpenTasks = true,
                       SendEmails = true));
               }
           }
           
           if(!cs.Events.isEmpty()){
               for(Event evt : cs.Events){
                   prncList.add(new PartnerNetworkRecordConnection(
                       ConnectionId = connectionId,
                       LocalRecordId = evt.Id,
                       SendClosedTasks = true,
                       SendOpenTasks = true,
                       SendEmails = true));
               }
           }
           
           if(!cs.Tasks.isEmpty()){
               for(Task tsk : cs.Tasks){
                   prncList.add(new PartnerNetworkRecordConnection(
                       ConnectionId = connectionId,
                       LocalRecordId = tsk.Id,
                       SendClosedTasks = true,
                       SendOpenTasks = true,
                       SendEmails = true));
               }
           }
       }
       
       if(!prncList.isEmpty()){

            try{
                system.debug('prncList : '+prncList);
                // upsert prncList;
            }
            catch(System.Dmlexception dmlExceptionInstance){
                System.debug('Record Share Error:' + dmlExceptionInstance.getMessage());
            }
        }
   }

   public void finish(Database.BatchableContext BC){
       
   }
}

 
Hi there,

I have a requirement, where I have one field on case record named "Last Message Date" and its a Date/time field.
Here, I want to populate the value of latest email(inbound/outbound) date, means I want the Date of recently sent/recieved email date from that case.
Any help is appreciated. Thanks
Hi
In my Org I have case object with OWD as Private for Internal/External Access.
Now I also have one Sharing rule which gives access to Portal user of "Communes Partner" profile. This Sharing rule share the cases of Record Type "Support" and "Implementation" with the Partner User role.
But When I login as Partner user I see the cases with Record Type "Support" and "Implementation" and also Record Type of "Technical".
So here I need to understand why i am seeing this record type cases without having an access to the record type.
I checked for the record data and i figure out something that these Cases "Contact Name" filed has value of partner user.
And for one case record its owner is queue and the members of the queue is of type Partner User.And this does not have the contact name as the above partner user.
So please help me understand what's issue happening here.
Hi there,
I have an site named as ABC Partner Community in my org. So when ever i logged in as partner user i am not able to see the Notes realted list under related section of page layout. Although i also have Attachments related list and this is present.
Can anyone tell me what i am missing here?
Notes related list i can see when i am in salesforce org. But when i login as partner user under community i am unable to see that.
PFA for the related list on community,
User-added image
 
Hi there,
Is there a way that we can customize the Email List View under case record.
I want to add new column as attachments under that related list but not sure how.
This is the current view:User-added imageHere i want to add new column as attachments.
Any help is appreciated. Thanks.
Hello there,
Can upper role hierarchy restores the deleted record of lower role hierarchy?
What i observed is deleted record can be restored by the owner itself or system Admin. No other user can restore the deleted record if if they are in upper role hierarchy. is it true?
Please help me to understand it.
Thanks
Hello,
I have roles set in my salesforce org. There are multiple role like Support Manager, CS Manager, CS Representative.
This role hierarchy looks like this: 
> 1. Support Manager
       > i. CS Manager (reports to Support Manager)
              > a . CS Representative (reports to CS Manager)
Now the scenario is like, when ever a record gets deleted by CS Representative can the CS Manager should be able to restore that record.
For now what i see is, if any user delete the record thye can restore its own not others.
And only system admin can see and restore all data, reason might be system admin has Mdify All Data as a system permission.
Can anyone guide me on this what should i do? how can we make the above role user to restore the record that is deleted by the below role user in rolw hierarchy?
Thanks.
Hello there,
There is a related list on Task object named as Attachments, but there i am not able to see the button to Upload Files button.
I am currently logged in as System Admin.
I dont know what is the exact problem here.
Any help is appriciated. Thanks

User-added image
Hello,
Is there a way that we can rename the Related list like Files, Attachments with another name as per requirement.
If there's a way can anyone help me out in this one.
Really Appreciated. Thanks
 
Hi there,
Is this the standard and default functionality?
There is a contact present in an Org with Email Id(abc@gmail.com) in it.
Now the case is getting created from Email to Case by the Same Email Id(abc@gmail.com).
Once the case gets created it automatically associates that Case with the Contact which has Same Email Id(abc@gmail.com).
But this is only happens in a case where there is only single contact withemail id.
But it does not associate the case to contact when there are multiple Contact with the same Email Id(abc@gmail.com).
Can anyone explain me the reason.
Thanks.
Hello there,
I have a requirement where i want to show the cases of specific record types to the partner portal user.
For now the user is able to see the record of other record type from listviews.
So there a way that we can make it possible to view only specific record types cases to the portal user. please help me out in this.
Thanks.
Hello,
I have a profile called PartnerPortal Profile in that profile i have some user in it. So whenever there partner user login to the portal, i want thenm to only see the case of specific record types.
RecordType like : "LVID Support" & "LVID Implementation".
I want thenm to see only these recordtype cases.
How can i achieve this? Thanks.
Hi there,
How can we login to the comunity site in lightning like we used to do in the classic view.
User-added imageDoes anybody know how we can do that in lightning?
Thanks.
Hi,
How can i get the picklist values for OpportuintyContactRole object, coz this object does not have any RecordType in it.
@wire(getPicklistValues,
        {
            fieldApiName: ROLE
        }
    )
    jobrolePicklist;
I tried this one but it didnt work out for me.
Hello,
I have roles set in my salesforce org. There are multiple role like Support Manager, CS Manager, CS Representative.
This role hierarchy looks like this: 
> 1. Support Manager
       > i. CS Manager (reports to Support Manager)
              > a . CS Representative (reports to CS Manager)
Now the scenario is like, when ever a record gets deleted by CS Representative can the CS Manager should be able to restore that record.
For now what i see is, if any user delete the record thye can restore its own not others.
And only system admin can see and restore all data, reason might be system admin has Mdify All Data as a system permission.
Can anyone guide me on this what should i do? how can we make the above role user to restore the record that is deleted by the below role user in rolw hierarchy?
Thanks.
Hello there,
There is a related list on Task object named as Attachments, but there i am not able to see the button to Upload Files button.
I am currently logged in as System Admin.
I dont know what is the exact problem here.
Any help is appriciated. Thanks

User-added image
Hello there,
I have a requirement where i want to show the cases of specific record types to the partner portal user.
For now the user is able to see the record of other record type from listviews.
So there a way that we can make it possible to view only specific record types cases to the portal user. please help me out in this.
Thanks.
Hi,
I have been creating LWC component, and there i have one button called "Submit". So I wanted to make that button disable on the pageload and make it enable again after button click(Another method).

Code:
html=>
<lightning-button variant="success" class="slds-m-left_x-small" label="Submit" title="Submit" disabled={checkSubmit}></lightning-button>
js=>
checkSubmit=true;

//this is a method on another button.
addRow(event) {
        //window.alert("Import Alert!!!");
        this.indx++;
        this.partsList.push(this.record);
        checkSubmit=false;  
    }
 
HI there,
I am working on paglayout. And I see the Layout is different..
Here the field values are below the field label.
User-added image
hat i Actually want :
User-added imageCan anyone guide me, and how can i do that?
Thank You.
This is Controller Class:
public with sharing class DataController {
    
    @AuraEnabled(cacheable=true)
    public static List<List<sObject>> getData(String keyword){
        String searchquery = 'FIND \'' + keyword + '*\' IN ALL FIELDS RETURNING Account(Id, Name), Contact(Id, Name)'; 
        List<List< SObject>> searchList = search.query(searchquery);
        system.debug('Search List is ' + searchList);
        Account[] searchAccounts = (Account[])searchList[0];
        System.debug('searchAccounts'+searchAccounts);
        Contact[] searchContacts = (Contact[])searchList[1];
        System.debug('searchContacts'+searchContacts);

        return searchList;
    }
}
Thanks.