• harsha B R 9
  • NEWBIE
  • 50 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 18
    Replies
Hi,

Business requirement :-
"Edit" standard button on the Junction object should take to the edit page of the master record insted of Junction object record.

How to achieve the above functionality?

Thanks & Regards,
Harsha BR
Hi ,

I have embedded a Report on a VF page and added the VF page in the Record detail page of a object.
I have used analytics:reportChart tag and dynamically filtering the reports based on the Record ID. It is working as expected.

But, when a user clicks the report name or Refresh Date like "As of Yesterday 4:45 PM", the report is breaking and an instance of Salesforce is opening inside the report.

Please suggest a workaround which disables the click event on Report chart name.

Any help is highly appreciated.

Thanks & Regards,
Harsha BR
 
Hello,

I am using the basic username and password authentication mechanism for integration.

Which is the endpoint URL that needs to set as endpointurl to get the access token and inturn data?

Please check the below code and suggest if any changes are required.

public class AccessToken {
    
    
       private Static final String username = 'test@test.com';
       private static final String password = 'XXXsecuritytoken';
    
      public class deserializeResponse
       {
         public String id;
          public String access_token;
       }
    
   public static void ReturnAccessToken ()
   {
        String reqbody = 'grant_type=password&username='+username+'&password='+password;
         Http h = new Http();
          HttpRequest req = new HttpRequest();
          req.setBody(reqbody);
          req.setMethod('GET');
        req.setEndpoint('https://test.salesforce.com/services/oauth2/token');
          HttpResponse res = h.send(req);
        system.debug('*** Response Body***'+res.getbody() );
         deserializeResponse resp1 = (deserializeResponse)JSON.deserialize(res.getbody(),deserializeResponse.class);
         system.debug('@@@@access_token@@'+resp1 );
          //return resp1.access_token;
   }
}

Any help is much appreciated.

Thanks & Regards,
Harsha BR
 
Hello Everyone,

Salesforce displays the standard message of "No Records to display" if records are not available for the object in the Related list of the Master detail page.

Can we customize the standard salesforce message to "No Records to display today".

Please let me know if this can be achieved.

Thanks & Regards,
Harsha BR
Hi Everyone,

How to enable live agent to 1000 users who belong to a single profile?I need to do this in the production org.

Any help is appreciated.

Thanks & Regards,
Harsha BR
after installing node.js when i am running the command ask deploy i am getting the following error

Profile for the deployment: [default]
Skill Id: amzn1.ask.skill.f0439ae9-befa-4ece-a4c7-293f30e1669f
Skill deployment finished.
Call update-model error.
Error code: 400
{
  "message": "Interaction model is not valid.",
  "violations": [
    {
      "message": "InvalidSlotTypeName: Slot type name \"AMAZON.SearchQuery\" is invalid. The name of a custom slot type must begin with an alphabetic character and can consist only of alphabetic characters or underscores."
    }
  ]
}
How to solve this error
Hi ,

I am doing sorting at the client side in helper class in lightning datatable using the below code. However, I am receiving null values in few columns and that is impacting the sorting of my data. How can I handle the null values to show at the last in the sorted table?

 sortData: function (cmp, fieldName, sortDirection) {
        var data = cmp.get("v.mydata");
        var reverse = sortDirection !== 'asc';
        data.sort(this.sortBy(fieldName, reverse))
        cmp.set("v.mydata", data);
    },
    sortBy: function (field, reverse, primer) {
        var key = primer ?
            function(x) {return primer(x[field])} :
            function(x) {return x[field]};
        reverse = !reverse ? 1 : -1;
        return function (a, b) {
            return a = key(a), b = key(b), reverse * ((a > b) - (b > a));
        }
    },
 
I am going through the trailhead ‘Build a Private Alexa for Business Skill for Salesforce’ and am unable to proceed past the Create Alexa Skills and Lambda Functions with the ASK CLI section. I am on the section to Run a Basic Test Using the ASK CLI Simulator and every time I run the command I get the error “Request to skill endpoint resulted in an error”.
Does anyone know how to overcome this?
 
If I try to create Vivian Torres, as an Account with Record Type, Individual, I get an error message:

"FinServ.AccountTrigger: execution of BeforeInsert caused by: FinServ.MoiExceptionWrapper.ValidationException: The Individual record type isn't available. Contact your administrator for help. (FinServ)"
Hello Everyone,

Facing the below error in test class.

System.DmlException: Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, field integrity exception: unknown (pricebook entry is in a different pricebook than the one assigned to the opportunity): [unknown]

Following is the piece of code:-
 public static testmethod void updateAccumulatedPriceTest()
    {
        Date closedDate=System.today()+1;
        Id accRecordTypeId =[SELECT id from RecordType where Name ='Partner VIP'].Id;
        
        //Creating Price book records
        List<Pricebook2> lstPriceBooks=new List<Pricebook2>();
        Pricebook2 objPriceBook=new Pricebook2(Name='VirtualCare',IsActive=true);
        lstPriceBooks.add(objPriceBook);
        insert lstPriceBooks;
        
        //Fetching system standard price book
        Pricebook2 standardPB = [select id from Pricebook2 where isStandard=true];
        
        //Creating an Account records
        List<account> lstAccs=new List<account>();
        Account objAcc=new Account(Name='Test Account',Envios_Automaticos__c=false,Tarifa_Acumulado__c=objPriceBook.Id,
                                   Contact_email__c='dummy@email11.com',RecordTypeId=accRecordTypeId);
        lstAccs.add(objAcc);
        insert lstAccs;
        
        
        //Creating Product records
        List<Product2> lstProducts=new List<Product2>();
        Product2 objProd=new Product2(Name='Product',isActive=true);
        lstProducts.add(objProd);
        insert lstProducts;
        
        

        //Creating the list the opportunities
       List<Opportunity> lstOpps=new List<Opportunity>();
        Id oppRecordTypeId =[SELECT id from RecordType where Name ='Orders'].Id;
        Opportunity objOpp=new Opportunity(Name='Opportunity1',StageName='Prospecting',CloseDate=closedDate,AccountId=lstAccs[0].Id,Pricebook2Id = objPriceBook.Id,
                                          RecordTypeId=oppRecordTypeId,Viene_de__c=lstAccs[0].Id,Email_de_Contacto__c='dummyOpp@email.com',
                                          Codigo_Postal_de_Envio__c='tesage',Calle_de_Envio__c='tesst',Contacto_Destinatario_Mens__c='cpntacto',
                                          Ciudad_de_Envio__c='ciudad',Pais_de_Envio__c='Pais',Provincia_de_Envio__c='provincia',Telefono__c='1244556677',
                                          Email_Destinatario_Mens__c='dummyOpp1@email.com');
               
        insert objOpp;
    system.debug('***objOpp***'+objOpp.Pricebook2Id);
    //Creating PriceBookEntry Records
        List<PricebookEntry> lstPriceBookEntry=new List<PricebookEntry>();
        PricebookEntry standardPrice = new PricebookEntry(Pricebook2Id = standardPB.Id, Product2Id = objProd.Id, UnitPrice = 10000, IsActive = true, UseStandardPrice = false);
        lstPriceBookEntry.add(standardPrice);
        
        PricebookEntry pbe = new PricebookEntry(Pricebook2Id=objOpp.Pricebook2Id,Product2Id = objProd.Id, UnitPrice = 10000, IsActive = true, UseStandardPrice = false);
        lstPriceBookEntry.add(pbe); 
     insert lstPriceBookEntry;
    
        PriceBookEntry pbe2=[select Id, name,Pricebook2Id from Pricebookentry WHERE Pricebook2Id=:objOpp.pricebook2Id];
        system.debug('***pbe2.Id***'+pbe2.Pricebook2Id);
        
        //Creating Opportunity Line Item records
        List<OpportunityLineItem> lstOppItems=new List<OpportunityLineItem>();
        OpportunityLineItem objLineItem=new OpportunityLineItem(OpportunityId=objOpp.Id,Quantity=2,UnitPrice = 7500,PriceBookEntryId=pbe2.Id,Description = '2007 CMR #4 - Anti-Infectives');
        lstOppItems.add(objLineItem);
        
        if(!lstOppItems.isEmpty())
        {
           insert lstOppItems;  
            
        }  
    }

The pricebookId is same and verified using debug statements.Still I am facing the above mentioned error.

Any help would be appreciated.

Thanks & Regards,
Harsha BR
Hi All,

I have created a custom object which has a Master detail relationship with Standard Salesforce Event.I am unable to add the custom object as the related list to the Standard Event object.Please let me know the procedure.

Thanks & Regards,
Harsha BR

Thanks & Regards,
Harsha BR
Hi,

I am trying to apply filter dynamically on a custom object by giving link in the visualforce page.It is not working as expected.Below is the code snipnet.


<apex:page standardController="SVMXC__Service_Contract__c"> <p> <a href="/00Oq0000000FuVa?pc0=SVMXC__Service_Contract__c.ID&pn0=eq&pv0={!LEFT (SVMXC__Service_Contract__c.ID,15)}&pc1=Name&pn1=eq&pv1={!SVMXC__Service_Contract__c.Name}" target="_blank">Contract Margin</a> </p> </apex:page>

Please help me to resolve the issue.

Any help would be appreciated.

Thanks & Regards,
Harsha