• Ravi P
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi all, I already have Salesforce Einstein Bot for unauthenticated users and now i would want to be able to authenticate the customer and proceed with his chat afterwards, any information on this? Thanks for your help. 
Hello, I am building an einstein bot, and I want to get the url (window.location.href) of the chatbot in the MIDDLE of the einstein bot dialogue (and therefore extraprechatformdetails won't do the job here.) Einstein bots allow invoking either apex or a flow in the middle of a dialogue. My question is: can I run javascript from a flow or apex class, so that I can get the window.location.href and save it as a variable that I can reference in my bot dialogue?
I have a simple Contact trigger in a sandbox org that is exhibiting some serious performance issues. After doing some debugging it looks like the issue boils down to accessing the items inside Trigger.new list. I mean literally just doing this:
Contact c = Trigger.new[i]
is really slow.

For example, this code runs reasonably quickly (processing 1000 updates in about 30 seconds):
trigger MyTrigger on Contact (after insert, after update, before delete) {
    if (Trigger.isUpdate) {
        for (Integer i = 0; i < Trigger.new.size(); i++) {
            Integer dummy = 0;
        }
    }
}

Results from bulk data load (coming from the bulk job details page):
Total Processing Time (ms): 29370
API Active Processing Time (ms): 27229
Apex Processing Time (ms): 28852

However, this code takes about six minutes to run:
trigger MyTrigger on Contact (after insert, after update, before delete) {
    if (Trigger.isUpdate) {
        for (Integer i = 0; i < Trigger.new.size(); i++) {
            SObject o = Trigger.new[i];
        }
    }
}

Results from bulk data load:
Total Processing Time (ms): 321264
API Active Processing Time (ms): 319187
Apex Processing Time (ms): 893650

If I record the time required to access individual list items like this:
trigger MyTrigger on Contact (after insert, after update, before delete) {
    if (Trigger.isUpdate) {
        for (Integer i = 0; i < Trigger.new.size(); i++) {
            Long e = System.currentTimeMillis();
            SObject o = Trigger.new[i];
            Long s = System.currentTimeMillis();
            System.debug('time: ' + (e - s));
        }
    }
}

I see a lot of times around 400 milliseconds.

What's going on here? Does it really take that long to access an element in a list? Is there any way around this?
 
Hi all,
I am creating a simple example with Jquery Mobile and lightning.When i am iterating my records using <aura:iteration> component Jquery and css is not working with it.But when i am using simple html code it is working fine.It is showing the records.
Here is my component code : -
<--------- Component---------------------------->
<aura:component controller="balluforce.fetchContacts">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"></aura:handler>
    <aura:attribute name="contacts" type="contact"/>
    
    <div data-role="page" id="pageone">
            <div data-role="header">
                <h1>Company Contacts</h1>
            </div>
                <aura:iteration items="{!v.contacts}" var="con">
                    <div data-role="collapsible">
                        <h1>{!con.Name}</h1>
                        <p>
                            Email &nbsp;&nbsp; : &nbsp;&nbsp; {!con.email}
                            Phone &nbsp;&nbsp; : &nbsp;&nbsp; {!con.phone}<br/>
                        </p>
                    </div>
                </aura:iteration>
            </div>
    </div>
    </aura:component>
<============ App Code=============>
<aura:application >
    <link rel="stylesheet" href="/resource/balluforce__lightninglib/lightninglib/bootstrap.css"/>
    
    <balluforce:jquerymobilecomp />
    
    <script src="/resource/balluforce__lightninglib/lightninglib/jquery.js"></script>
    <script src="/resource/balluforce__lightninglib/lightninglib/bootstrap.js"></script>
    
</aura:application>
Is there any mistake in the code.Please help me.Thanks in advance.