• Darshit Pathak 3
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 22
    Replies
Case Status marked as "closed" is not visible in Status picklist on case detail page.
There no such "Close Case" button provided in lightning as it is provided in classic.
So how to close the case in lightning?
This issue is occuring in sandbox only and that too from today only, not in PROD instance.
I want to connect to Adobe analytics from SFDC to track lightning community page's activity such as page load or some click.
If User lands on a community page, event should be captured by Adobe Analytics.

Consider below situation.
public without sharing class Class3 {
    @future
     public static void meth1() {}
}
public with sharing class Class2 {
    Class3.meth1();
}

in which mode meth1() of Class3 will execute?

with sharing or without sharing?

I want to make validation , but that error should not be thrown for users of pre defined 27 user roles.
What is the best way I can proceed with? 
- Hardcoding in validation rule?
- through apex (but where to store this list of roles, and in future if any modification required in the list, can it be configurable?)
I've installed Visual Studio Code v1.24.0 and installed "forceCode" extension in it.
I could enter my sfdc sandbox credentials using "ForceCode Menu" command.
But when I try to retrieve package from sfdc it throws me and error : "tunneling socket could not be established, cause=connect ECONNREFUSED".
I've also set my company proxy in HTTPS_PROXY and ALL_PROXY environment variables.
What is the reason for this error, this I am getting while inserting a case record within System.runAs block.
There is no validation rule on case with "CLASSIFICATION_CONTENT_NOT_FOUND"  error message.
below is my code in test class in which I am getting the exception.
Can anyone help me with root cause and solution?

ContentVersion cv = new ContentVersion();
        cv.Title = 'Test Content';
        cv.PathOnClient = 'test';
        cv.VersionData = EncodingUtil.base64Decode('Unit Test Attachment Body');
        cv.NetworkId = // customer community network id;
        insert cv;
Id contentDocumentId = [select Id, ContentDocumentId, OwnerId from ContentVersion where Id = :cv.Id].ContentDocumentId; 
      List<ContentDocument> documents = [SELECT Id, Title, LatestPublishedVersionId FROM ContentDocument where ID =:contentDocumentId];
      System.assertEquals(documents.size(), 1);
      System.debug('DocId : '+contentDocumentId);
      ContentDocumentLink cdl = New ContentDocumentLink(); 
      cdl.LinkedEntityId = caserec.id; // id of a case record inserted earlier in the method
      cdl.ContentDocumentId = contentDocumentId;
      cdl.shareType = 'V';
      insert cdl;   // getting exception on this line.
I have a validation which does not accepts only alphabetic characters for contact first and last name. No numerics are allowed.
So how can I generate bulk data with unique names for my test class without using numeric value in first last name.
I've completed superbedges on trailhead.
Want to appear for MCQ exam.
If you have any relevant study material / sample questions/ Dumps please let me know.

Thaks in Advance!
I am asking for help, please avoid business / Trading of dumps here.
OrderItem object is a junction of Order and a product.
It has 2 lookup fields , 1 for Order (API : OrderId) and 1 for Product (API : Product2Id)
But when we try to create record of OrderItem it throws error Product2Id field does not exists.
Instead it's accepting "PricebookEntryId".
As per scheme it should accept Product Id and not the pricebookEntry Id.
Since we cannot disable "Grant Access using Hierarchy" for standar objects. Is there any way I can restrict superiors to see account records owned by their sub ordinates?
Consider the below code:
Page :
<apex:form >
      <table>
          <tr>
              <td>
                  Description: &nbsp;&nbsp;
              </td>
              <td>
                  <apex:inputTextarea value="{!dsc}" >
                      <apex:actionSupport reRender="searchResultPanel" event="onKeyUp"/>
                  </apex:inputTextarea>
              </td>
          </tr>
      </table>
<div>
          <apex:outputPanel id="searchResultPanel">
          {!dsc}
</apex:outputPanel>
      </div>

</apex:form>
</apex:page>

Controller :
public with sharing class BotPageController {
    public String dsc { get; set; }
    public BotPageController() {
        
    }


I want that whenever input is given in the textArea , it should be reflected on outputPanel in real time. without any submit button.
How to achieve this?
Basically I want the String to be stored in the controller variable as soon as it is changed on the page.
If I append lastModified date everytime the record is updated it will exceed the name field character limit that is 80.
And also to get the latest LastMpdifiedDate I need to update the record in afterUpdate by doing DML. so it may go in infinite recursive trigger call.

I am not getting how to acomplish this?
We have Event records created in Salesforce (classic). That I want to sync with outlook Calendar for mac users.
is it possible to that?
If yes what tools and settings are required?
 
I know the limit of both of them which is 50 and 100 respectively.
But can anyone explain what these terms means?
Maximum number of methods with the future annotation allowed per Apex invocation = 50 means what ?
Maximum number of callouts (HTTP requests or Web services calls) in a transaction = 100 means what?

If my VF page already has custom controller. Now I am creating extension class with method getVal() , how can I call this extension method in my VF page?

When Sync back happens from mulesoft , trigger executes in sfdc . Trigger is calling helper class method (class is declared as without sharing) which has SOQL to return one formula field value .
When this sync back happens field from that SOQL returns 0.0 value.
But when the same code is executed after doing login as Integration User (user created for Mulesdoft Integration) it returns the expected value of the formula field.
Cannot figure out how is it happening.

Please help me your opinions, Any leads would be appreciated.

What are the requirements to sync the salesforce calendar and outlook on windows and Mac?
What is the Office 365 service account?
 
There is an existing text field.
I want to convert it to a picklist.
I am deploying a picklist schema through ANT for the same field API name.
But while deploying I am getting this error.
Salesforce has a limitation of of scheduling only 5 jobs in flex queue. So batches must be scheduled in such a way to make sure this limit.
How do I identify suitable time slot to schedule my batch?    
below is my code in test class in which I am getting the exception.
Can anyone help me with root cause and solution?

ContentVersion cv = new ContentVersion();
        cv.Title = 'Test Content';
        cv.PathOnClient = 'test';
        cv.VersionData = EncodingUtil.base64Decode('Unit Test Attachment Body');
        cv.NetworkId = // customer community network id;
        insert cv;
Id contentDocumentId = [select Id, ContentDocumentId, OwnerId from ContentVersion where Id = :cv.Id].ContentDocumentId; 
      List<ContentDocument> documents = [SELECT Id, Title, LatestPublishedVersionId FROM ContentDocument where ID =:contentDocumentId];
      System.assertEquals(documents.size(), 1);
      System.debug('DocId : '+contentDocumentId);
      ContentDocumentLink cdl = New ContentDocumentLink(); 
      cdl.LinkedEntityId = caserec.id; // id of a case record inserted earlier in the method
      cdl.ContentDocumentId = contentDocumentId;
      cdl.shareType = 'V';
      insert cdl;   // getting exception on this line.
OrderItem object is a junction of Order and a product.
It has 2 lookup fields , 1 for Order (API : OrderId) and 1 for Product (API : Product2Id)
But when we try to create record of OrderItem it throws error Product2Id field does not exists.
Instead it's accepting "PricebookEntryId".
As per scheme it should accept Product Id and not the pricebookEntry Id.
If I append lastModified date everytime the record is updated it will exceed the name field character limit that is 80.
And also to get the latest LastMpdifiedDate I need to update the record in afterUpdate by doing DML. so it may go in infinite recursive trigger call.

I am not getting how to acomplish this?
We have Event records created in Salesforce (classic). That I want to sync with outlook Calendar for mac users.
is it possible to that?
If yes what tools and settings are required?
 

If my VF page already has custom controller. Now I am creating extension class with method getVal() , how can I call this extension method in my VF page?

What are the requirements to sync the salesforce calendar and outlook on windows and Mac?
What is the Office 365 service account?
 
Hello All,  

I'm new to the salesforce and recently tried adding Advanced Code Searcher extension to the chrome but I couldn't see it in the left panel under quick find box. All I can see is the Developer Utilities above the recent items in my Developer Org. Is there anything else that I could do to fix this. Please help me out. Thank you.
VF Page: 
<apex:selectList styleclass="slds-select" value="{!EditOrSave}"  size="1">
                                <apex:actionSupport event="onchange" action="{!redirectToEditOrDetail}" reRender="">
                                    <apex:param name="recId" value="{!bscheduleRecord.Id}" assignTo="{!recId}"/>
                                </apex:actionSupport> 
                                    <apex:selectOptions value="{!selectOptionEditSave}"/>
                                </apex:selectList>

Controller:
public String EditOrSave{get;set;}
 public PageReference redirectToEditOrDetail(){
    System.debug('***EditOrSave: '+EditorSave);     
    }

But I am getting blank value on changing picklist value.
A command button on VF page that should calls one method,insert the record and redirect to that record.

This is my code:
System.debug('@@@BatchVar Id: '+batchVar.id);
                     return new PageReference('/'+batchVar.id);

It redirects to the same VF page only.
but in debug logs I can see the record Id in debug statement and if I copy that Id and append in browser's URL, the record is opening .
That means method is called and record is inserted properly.
But redirection is not happening properly.

Unit is Developer Intermediate ->Apex Integration Services -> Apex Web Services

If this is the actual error how is it possible that code runs perfectly in developer console?

Hello All,

 After save of the record, I would like to redirect my Visual force page to custom object created..
 Save is happening ... But the page is not getting redirected to the custom object...
 I am using the below code

 PageReference reference=new PageReference('https://cs18.salesforce.com/a0U/o');
 reference.setRedirect(true);
 return reference;
 

Below is the Full Code ..
VF Page - 
<apex:page standardcontroller="BIA__c" extensions="BIAcontroller" sidebar="false"> 
<apex:messages style="color:blue"></apex:messages>
    <apex:form id="theform">
   
    <apex:pageblock mode="edit">
    <apex:pageBlockSection title="Business Impact Analysis Information">

          <apex:inputField id="opportunityName" value="{!account.name}" />
          <apex:inputField id="opportunityName1" value="{!account.Date_of_BIA_Meeting__c}"/>
          <apex:inputField id="opportunityName2" value="{!account.Manager__c}"/>
          <apex:inputField id="opportunityName3" value="{!account.Department_BC_Coordinator__c}"/>
          <apex:inputField id="opportunityName4" value="{!account.Backup_BC_Coordinator__c}"/>
          <apex:inputField id="opportunityName5" value="{!account.Custodian__c}"/>
          <apex:inputField id="opportunityName6" value="{!account.Prepared_by__c}"/>
          <apex:inputField id="opportunityName7" value="{!account.Endorsed_by__c}"/>
          <apex:inputField id="opportunityName8" value="{!account.Approved_by__c}"/>
      </apex:pageBlockSection>
                <apex:pageblockSection title="Team Search" >
                   <apex:inputfield value="{!objAct.CoE__c}" />
                   <apex:inputfield value="{!objAct.Department__c}" />
                   <apex:inputfield value="{!objAct.OpCo__c }" />
                </apex:pageblockSection>

                <center>    <apex:commandButton value="Search" action="{!search}" rerender="theform" /> </center>
                
            </apex:pageblock>
            <apex:pageBlock >
                <apex:pageBlockButtons >
                  <apex:commandButton value="Process Selected" action="{!processSelected}" rerender="table" /> 
                </apex:pageBlockButtons>
                <apex:pageBlockTable value="{!MSAWrapperList}" var="obj" id="table">
                     <apex:column >
                        <apex:inputCheckbox value="{!obj.selected}"/>
                    </apex:column>
                    <apex:column value="{!obj.msaObj.Name}" />
                </apex:pageBlockTable>
           </apex:pageBlock>
            
    </apex:form>
</apex:page>

Controller --
public class BIAcontroller
    {

    public BIAcontroller(ApexPages.StandardController controller) {
        account=new BIA__c();
        bia=new BIA__c();
    //contact=new SOC__c();
    opportunity=new Team__c();
    records=new List<Team__c>();
    objAct=new Team__c();
    msawrapperlist=new List<MSAWrapper>();
    }


        public BIA__c account{set;get;}
        public BIA__c bia{get;set;}
        //public SOC__c contact{set;get;}
       public Team__c opportunity{set;get;}
            
        public List<Team__c> records{get;set;}
        public Team__c objAct{get;set;}
        public List<MSAWrapper> MSAWrapperList {get; set;}
                  
       public     List<Team__c > selectedMSA = new List<Team__c >();
       public     List<Team__c > TeamssToUpdate = new List<Team__c >{};
        
 
        
        public BIA__c getAccount() {
        if(account == null) account = new BIA__c ();
        return account;
        }
        
    
        
        
        public pagereference search()
        {
            MSAWrapperList.clear();
            records=[Select ID,Name,CoE__c,BIA__c,Department__c,OpCo__c from Team__c where CoE__c=: objAct.CoE__c and Department__c=: objAct.Department__c];
            for(Team__c obj : records)
            {
                MSAWrapperList.add( new MSAWrapper(obj) );
            }
           return null;
        }

        public PageReference processSelected() 
        {
        
          account.Name = account.Name;
          account.Date_of_BIA_Meeting__c= account.Date_of_BIA_Meeting__c;
          account.Manager__c= account.Manager__c;
          account.Department_BC_Coordinator__c= account.Department_BC_Coordinator__c;
          account.Backup_BC_Coordinator__c= account.Backup_BC_Coordinator__c;
          account.Custodian__c= account.Custodian__c;
          account.Prepared_by__c= account.Prepared_by__c;
          account.Endorsed_by__c= account.Endorsed_by__c;
          account.Approved_by__c= account.Approved_by__c;

          insert account;

            for(MSAWrapper cCon: MSAWrapperList ) 
            {
                if(cCon.selected == true) 
                {
                    selectedMSA.add(cCon.msaObj);
                }
            }
            for(Team__c msa: selectedMSA) 
            {
                    system.debug(msa);
                    msa.BIA__c= account.id;
                    TeamssToUpdate.add(msa);
            }
            update TeamssToUpdate;
       //     return null;
            
            system.debug('11111');
            PageReference reference=new PageReference('https://cs18.salesforce.com/a0U/o');
                    system.debug('22222');
        reference.setRedirect(true);
        system.debug('33333');
        return reference;
        }

        
        
        public class MSAWrapper 
        {
            public Team__c msaObj {get; set;}
            public Boolean selected {get; set;}
            public MSAWrapper(Team__c c) {
                msaObj = c;
                selected = false;
            }
        }
        
       
         
    }


Please help..


Thanks..
Hi, I want to connect Eclipse IDE with my Salesforce Org. When I give my credentials, it says "unable to fetch organization details". Can anyone help to solve this issue?
 screenshot