• movie apk 4
  • NEWBIE
  • -13 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 8
    Replies
I have overriden new Account and Edit Account standard actions with some custom Lightning Components. On console navigation apps i want to close some tabs on Account save and then open a new tab to the record id just created. But this does not seem to work and i do not understand the reason why.
 
navigateTo: function(component, recId) {
        //First determine whether navigation is Console or Standard
        var workspaceAPI = component.find("workspace");
        workspaceAPI.isConsoleNavigation().then(function(response) {
            if (response) { //navigation is console
                //Open a new tab with the record
                workspaceAPI.openTab({
                    recordId: recId,
                    focus: true,
                    overrideNavRules: true
                }).catch(function(error) {
                    console.log('error' +error);
                });
                workspaceAPI.getAllTabInfo().then(function(response) {
                    console.log(response);
                    for (var i=0; i<=response.length; i++) {
                        if ((response[i].title == 'Loading...') || (response[i].title == 'New Account') || (response[i].title == 'Νέος πελάτης') || (response[i].title == 'Φόρτωση...')) {
                            console.log(response[i].title);
                            workspaceAPI.closeTab({tabId: response[i].tabId});
                        }
                    }
                })
                .catch(function(error) {
                    console.log(error);
                });
            } else { //Standard navigation
                var navEvt = $A.get("e.force:navigateToSObject");
                navEvt.setParams({
                    "recordId": recId
                });
                navEvt.fire();
                window.setTimeout(
                    $A.getCallback(function() {
                        $A.get('e.force:refreshView').fire();
                    }), 2000
                );
            }
        })
    },

The issue is, new tab opens, the tabs i want to close get closed, but focus is not on the opened tab by my code. It is one tab left from the tab opened by my code. Any Ideas ?
Trying to upload the sandbox classes to production but its gettinf error of code coverage , just know to create tet class of my apex class.my class code coverage show only 29%

public class DomDocument {
    public list<GoogleNewsItem> actualList { get; set; }
    // public GoogleNewsItem googleNewsItem { get; set; }
    public Account aa { get; set; }
    public String endPoint { get; set; }
    public String accountName { get; set; }
    public String url { get; set; }
    // Pass in the URL for the request
    // For the purposes of this sample,assume that the URL
    // returns the XML shown above in the response body
    public DomDocument() {
        
    }
    public DomDocument(ApexPages.StandardController controller) {
        Account aa= [SELECT Name FROM Account WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
                accountName = aa.name;
        endPoint = 'https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=' + accountName + '&gl=IN&ceid=IN:en';
        // url = endPoint.deleteWhitespace();
        url = endPoint.replaceAll(' ','%20');
        actualList = parseResponseDom(url);
    }
    
    // Method to parse the element value in page block and Return to display the List Element value in page block.
    public list<GoogleNewsItem> parseResponseDom(String url){
    
    // For Developer Console and Debugging.
    // public void parseResponseDom(String url){
        
        // For individual list only for Single Single Tabs of XML.
        // list<String> titles = new list<String>();
        // list<String> links = new list<String>();
        
        // For List of Objects of Google News Items.
        //List of wrapper class.
        list<GoogleNewsItem> googleNewsItemsList = new list<GoogleNewsItem>();
        
        Http h = new Http();
        HttpRequest req = new HttpRequest();
        // url that returns the XML in the response body
        req.setEndpoint(url);
        req.setMethod('GET');
        HttpResponse res = h.send(req);
        Dom.Document doc = res.getBodyDocument();
        
        //Retrieve the root element for this document.
        Dom.XMLNode rss = doc.getRootElement();
        //System.debug(rss);
        Dom.XmlNode channelNode = rss.getChildElement('channel', null);
        Dom.XmlNode itemNode = channelNode.getChildElement('item', null);
        String title = itemNode.getChildElement('title', null).getText();
        //System.debug('Title:  ' + title);
        System.debug(channelNode.getChildElement('link', null).getText());
        //String state = address.getChildElement('state', null).getText();
        // print out specific elements
        //System.debug('State: ' + state);
        
        //System.debug('Name: ' + channelNode);
        
        // Alternatively, loop through the child elements.
        // This prints out all the elements of the address
        for(Dom.XMLNode child : channelNode.getChildElements()) {
           //System.debug(child.getText());
        }
        
        // Traverse through the list of child element inside the root element.
        for(Dom.XMLNode channelForLoop: doc.getRootElement().getChildElements()) {
            for(Dom.XmlNode channelChildForLoop: channelForLoop.getChildElements()) {
                if(channelChildForLoop.getName() == 'item') {
                    // titles.add(channelChildForLoop.getChildElement('title', null).getText());
                    // links.add(channelChildForLoop.getChildElement('link', null).getText());
                    
                    //Instance of wrapper class to add the value in Wrapper property and then adding to the above list.
                    GoogleNewsItem googleNewsItem = new GoogleNewsItem(); // Dynamically Object creation.

                    googleNewsItem.title = channelChildForLoop.getChildElement('title', null).getText();
                    googleNewsItem.link = channelChildForLoop.getChildElement('link', null).getText();
                    googleNewsItem.publishDate = channelChildForLoop.getChildElement('pubDate', null).getText();
                    googleNewsItem.description = channelChildForLoop.getChildElement('description', null).getText();
                    googleNewsItem.source = channelChildForLoop.getChildElement('source', null).getText();
                    googleNewsItem.sourceUrl = channelChildForLoop.getChildElement('source', null).getAttribute('url', null);

                    googleNewsItemsList.add(googleNewsItem); // Object added to List of NewsItem.
                }
            }
        }
        
        // Using List of individual Single Single Tabs of XML.
        // System.debug(titles); // All the Titles.
        // System.debug(links); // All the Links.
        // System.debug(titles[10]); // Only 1st Title.
        
        // Using List Object.
        System.debug('**********');
        System.debug('Full Object:  ' + googleNewsItemsList);// Full Objects.
        System.debug('First Object:  ' + googleNewsItemsList[0]);// 1st Object.
        System.debug('Last Object:  ' + googleNewsItemsList[99]);// 103rd Object.
        System.debug('Last Object Source:  ' + googleNewsItemsList[99].source);// 103rd Object's Source Content.
        System.debug('Last Object Source URL Attribute:  ' + googleNewsItemsList[99].sourceUrl);// 103rd Object's Source Url Attribute Content.
        
        
        // Return to display the element value in page block.
        return googleNewsItemsList;
        // System.debug('Last Object:  ' + googleNewsItemsList);// Full Object.
    }
}

and created test class for this block of code as follows

@isTest
public class DomDocumentTest {
    @IsTest(SeeAllData=true) public static void testDomDocument() {
        
        DomDocument dom = new DomDocument();
        
        Account aa = new Account(name='Test');
        insert aa;
        dom.aa = aa;
        // Contact myContact = new Contact(firstname='Goquest', lastname='Media');
        // insert myContact;
 
        dom.accountName = 'Goquest';
        dom.endPoint = 'https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=Goquest&gl=IN&ceid=IN:en';
        dom.url = 'https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=Goquest&gl=IN&ceid=IN:en';
        dom.actualList = dom.parseResponseDom('https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=Goquest&gl=IN&ceid=IN:en');
        
        Apexpages.StandardController testSC = new Apexpages.StandardController(aa);
        DomDocument dom1 = new DomDocument(testSC);
        dom1.aa = aa;
        dom1.accountName = 'Goquest';
        dom1.endPoint = 'https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=Goquest&gl=IN&ceid=IN:en';
        dom1.url = 'https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=Goquest&gl=IN&ceid=IN:en';
        dom1.actualList = dom.parseResponseDom('https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=Goquest&gl=IN&ceid=IN:en');
   
        System.assertEquals(dom.parseResponseDom('https://news.google.com/rss/search?cf=all&hl=en-IN&pz=1&q=Goquest&gl=IN&ceid=IN:en'),dom.actualList); 
        
    }
    

}

 
Is there a way to allow the user to single click to open the select, and then single click to select a value?

I have a table with a "Pay?" column that is a select list field that uses inline-edit on dbl click, which works, but I would like it to work on a single click. Unfortunately, when I change the event to onclick, it will open up the select box but toggle off and on when I try to select a value because I am using a single click on the cell.

Is there a way to allow the user to single click to open the select, and then single click to select a value?

Page:
<apex:page controller="DTTestPageController" lightningStylesheets="true">
    <apex:pageMessages />

 <apex:form id="form">  
    
    <apex:pageBlock mode="inlineEdit" id="pageblock1">  
        <div id="header" class="headerborder">
            <p id="title">DT Worksheet</p>

            <p id="select">
            <apex:selectList size="1" id="filter" value="{!pickValue}">
                <apex:actionSupport event="onchange"  action="{!GetMedicals}" rerender="table1"/>
                <apex:selectOption itemLabel="All" itemValue="All" ></apex:selectOption>
                    <apex:selectOption itemLabel="Needs Review" itemValue="Review" ></apex:selectOption>
                    <apex:selectOption itemLabel="Pay" itemValue="Pay"></apex:selectOption>
                    <apex:selectOption itemLabel="Don't Pay" itemValue="Dont Pay"></apex:selectOption>
            </apex:selectList>
            <apex:commandButton id="alert" value="Alert" rerender="" action="{!alertUser}"/>
        </p>

        </div>
        <apex:pageBlockButtons location="bottom">  
               <apex:commandButton id="saveButton" value="Save" rerender="" action="{!saveme}"/>  
               <apex:commandButton id="cancelButton" value="Cancel" rerender="table1"/>  
        </apex:pageBlockButtons> 
    
        

        <div class="tableborder" id="border">
    <apex:pageBlockTable value="{!lstMedicals}" var="med" id="table1">
        
        <apex:column headerValue="Medical Bill Number" headerClass="headerStyle">
                <apex:actionRegion >
                      <apex:outputLink value="/{!med.Id}" styleClass="link">
                            {!med.Name}
                      </apex:outputLink>
                </apex:actionRegion>  
        </apex:column>

            <apex:column headerValue="Provider" headerClass="headerStyle">
                <apex:actionRegion >
                      <apex:outputField value="{!med.Provider_Name__c}">
                      </apex:outputField>
                </apex:actionRegion>  
        </apex:column>

        <apex:column headerValue="Pay?" headerClass="headerStyle" id="column1">
            
            
                <apex:actionRegion id="actionRegion1">
                      <apex:outputField value="{!med.Disburse__c}" id="pay">
                              <apex:inlineEditSupport event="onClick" showOnEdit="saveButton,cancelButton"/>
                      </apex:outputField>
                </apex:actionRegion>  
        </apex:column>

        <apex:column headerValue="Notes" headerClass="headerStyle">
                <apex:actionRegion >
                      <apex:outputField value="{!med.Disbursement_Note__c}">
                              <apex:inlineEditSupport event="ondblClick" showOnEdit="saveButton,cancelButton" id="note"/>
                      </apex:outputField>
                </apex:actionRegion> 
        </apex:column>
    </apex:pageBlockTable>
</div>
 </apex:pageBlock>  
</apex:form>

Controller:
public class DTTestPageController {
    /* private String sortOrder = 'LastName'; */
    public string pickValue{get; set;}
    public litify_pm__Matter__c matterId{get; set;}
    public Id recordTypeId = Schema.SObjectType.Medical_Bill__c.getRecordTypeInfosByName().get('Medical').getRecordTypeId();
    public list<Medical_Bill__c> lstMedicals{get; set;}

    public DTTestPageController(){
        pickValue = 'All';
        GetMedicals();
    }

    public void GetMedicals() {
        
        matterId = [SELECT Id, litify_pm__Principal_Attorney__c, Litigation_Attorney__c  FROM litify_pm__Matter__c WHERE Id = :ApexPages.currentPage().getParameters().get('id')];
        

        


        if (pickValue == 'All') {
            lstMedicals = [Select Id, Name, Provider_Name__c, Disburse__c, Disbursement_Note__c from Medical_Bill__c WHERE Matter__c =: matterId.Id AND RecordTypeId =: recordTypeId];
            
        }
        else if (pickValue == 'Review') {
            lstMedicals = [Select Id, Name, Provider_Name__c, Disburse__c, Disbursement_Note__c From Medical_Bill__c WHERE Matter__c =: matterId.Id AND RecordTypeId =: recordTypeId AND Disburse__c = null];
        }
        else if (pickValue == 'Pay') {
            lstMedicals = [Select Id, Name, Provider_Name__c, Disburse__c, Disbursement_Note__c From Medical_Bill__c WHERE Matter__c =: matterId.Id AND RecordTypeId =: recordTypeId AND Disburse__c = 'Yes'];
        }
        else if (pickValue == 'Dont Pay') {
            lstMedicals = [Select Id, Name, Provider_Name__c, Disburse__c, Disbursement_Note__c From Medical_Bill__c WHERE Matter__c =: matterId.Id AND RecordTypeId =: recordTypeId AND Disburse__c = 'No'];
        }
        else {
             lstMedicals = [Select Id, Name, Provider_Name__c, Disburse__c, Disbursement_Note__c from Medical_Bill__c WHERE Matter__c =: matterId.Id AND RecordTypeId =: recordTypeId];
        }
        
    }

    public pagereference saveme()
    {
    try
    {
        System.debug(lstMedicals);
        update lstMedicals;
         ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'Medical Bill List Updated!'));
    }   
    catch(DmlException ex)
    {
        ApexPages.addMessages(ex);

    }
    return NULL;
    }   

  /*   public void sortByFirstName() {
        this.sortOrder = 'LastName';
    } */

    public void alertUser() {
        Id profileId=userinfo.getProfileId();
        String profileName=[Select Id,Name from Profile where Id=:profileId].Name;
        Id ownerId;
        String assignedRole;
        String subject;

        if (profileName == 'Disbursements Team' || profileName == 'Disbursements Team Lead') {

            if (matterId.Litigation_Attorney__c == null) {
                ownerId = matterId.litify_pm__Principal_Attorney__c;
            }
            else {
                ownerId = matterId.Litigation_Attorney__c;
            }

            assignedRole = 'Attorney';
            subject = 'Verify The List Of Medical Bills We Are Paying Is Correct';

        }
        else {
            ownerId = '0056A000000mKxc';
            assignedRole = 'Disbursements';
            subject = 'The Attorny Has Reviewed The List of Medical Bills';
        }

        Task taskRecord = new Task();
        taskRecord.OwnerId = ownerId;
        taskRecord.Assigned_Role__c = assignedRole;
        taskRecord.Subject = subject;
        taskRecord.WhatId = matterId.Id;
        taskRecord.litify_pm__Matter__c = matterId.Id;
        taskRecord.ActivityDate = System.today();
        taskRecord.Priority = 'Normal';

        insert taskRecord;
        ApexPages.addmessage(new ApexPages.message(ApexPages.severity.CONFIRM,'Alert Sent!'));  
    }
}

​​​​​​​​​​​​​​
I all of a sudden started to get this Error. Related to Picklist. It was working fine yesterday.

User-added image
Hello community,

I'm currently working on a new implementation of Service Call with omnichannel including the live agent and community.
My client and I were really interested into the Einstein bot... but we support multiple languages. Seems like there is no support at all of multi-language with the Chat bot... just like so many other functionnalities with limited multi-language support.

As a workaround, I thought it might be possible to duplicate everything for each languages (lucky we have only two) and use audience in community to show one or the other Chat snap-in. We would also need to create one bot per language and have them training individually...

Another workaround would be to use only on chat bot, and include multi language with different dialog and everything.


My question is, anyone here ever implemented a chat bot in Salesforce which was supporting multiple languages? This is relativaly new so my guess is probably no

Regards