• Aleksey Sheldagaev
  • NEWBIE
  • 20 Points
  • Member since 2015
  • CTO
  • Advanced Communities


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
My Lightning component stopped work after Summer '16 update and LockerService activation
The reason is sObject attribute and its fields not accessible as before.

Here is my attribute and inputReachText component with binded field of Idea:
<aura:attribute name="newIdea" type="Idea" default="{'sObjectType':'Idea', 'Body':''}" />

<ui:inputRichText aura:id="ideaBodyText" value="{!v.newIdea.Body}" label="Description" />
And here is controller code after change the body field and click save:
console.log(cmp.get('v.newIdea')); //= {sObjectType:'Idea', Body:''} - Body is empty
console.log(cmp.get('v.newIdea.Body')); //= TEST BODY
And when trying to send the object to Apex controller method it says 'Unable to read SObject'.
Did anybody face with something similar?
 
I have 'customPage' created in Community Builder and I need to navigate a user to this page from my Lightning component inside other community page.

I've tried to use direct link:
<a href="custom-page">Custom Page</a>
it works, but with browser refreshing, that's not appropriate, I need the same behavior as Top Navigation have.

And I've tried the second approach:
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
  "url": "custom-page",
  "isredirect": true
});
urlEvent.fire();
again, it works, but it opens new tab|window what isn't thery helpful

So, how to handle such simple action within community?
P.S.: I'm using Napili template for my community.
Can sombody explain why I get 'null' in my component's controller when trying to find child component by aura:id within aura:iteration
Here are markup and controller code example:
<aura:component>
  <aura:attribute name="someObjs" type="Object[]" />
  <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    
  <div class="wrapper">
    <ui:button label="Click me" press="{!c.changeObjectTxt}" />

    <aura:iteration items="{!v.someObjs}" var="obj">
      <c:SimpleChildComponent someText="{!obj.txt}" aura:id="item_{!obj.id}" />
    </aura:iteration>
  </div>
</aura:component>
({
    doInit: function(cmp, event, helper) {
        var objs = [
                {id: 11, txt: 'First object'},
                {id: 12, txt: 'Second object'},
                {id: 13, txt: 'Third object'}
            ];
        
        cmp.set('v.someObjs', objs);
    },
    
    changeObjectTxt: function(cmp, event, helper) {
        var chCmp = cmp.find('item_12');
        
        console.log(chCmp);
    }
})


 
How can I order by KnowledgeArticleViewStat.NormalizedScore when getting rows from KnowledgeArticleVersion table

My SOQL query looks like this:
SELECT Id, KnowledgeArticleId, ArticleType, LastPublishedDate 
FROM KnowledgeArticleVersion 
WHERE PublishStatus = 'online' AND Language = 'en_US' AND ArticleType IN ('...')
LIMIT 5

 
Hi All,
How can i auto update records/Auo assign records.I have created custom object with a custom lookup field on user and have 5 users.Admin will upload 100 records then it will autometically change user name with 20 record  each for 5 users.How can i achieve this type of custom requirement. Any idea?
I keep getting the following error
Lightning Web Component Bundle  LWC1075: Multiple roots found

Whenever I try to deploy/push source to my scratch org. I don't know why.. anyone else experienced this? I am not sure what it means by multiple roots, I haven't found any duplicate or multiple anythings.
My Lightning component stopped work after Summer '16 update and LockerService activation
The reason is sObject attribute and its fields not accessible as before.

Here is my attribute and inputReachText component with binded field of Idea:
<aura:attribute name="newIdea" type="Idea" default="{'sObjectType':'Idea', 'Body':''}" />

<ui:inputRichText aura:id="ideaBodyText" value="{!v.newIdea.Body}" label="Description" />
And here is controller code after change the body field and click save:
console.log(cmp.get('v.newIdea')); //= {sObjectType:'Idea', Body:''} - Body is empty
console.log(cmp.get('v.newIdea.Body')); //= TEST BODY
And when trying to send the object to Apex controller method it says 'Unable to read SObject'.
Did anybody face with something similar?
 
I have 'customPage' created in Community Builder and I need to navigate a user to this page from my Lightning component inside other community page.

I've tried to use direct link:
<a href="custom-page">Custom Page</a>
it works, but with browser refreshing, that's not appropriate, I need the same behavior as Top Navigation have.

And I've tried the second approach:
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
  "url": "custom-page",
  "isredirect": true
});
urlEvent.fire();
again, it works, but it opens new tab|window what isn't thery helpful

So, how to handle such simple action within community?
P.S.: I'm using Napili template for my community.
Hi,


I have deployed my community and site from one sandbox to another but somehow the page editor in the community builder in the destination org does not show any components to drag on to the pages. It shows the pages correctly. All the lightning components are deployed correctly as I can see them in the developer console. 

Can anyone please indicate what could be the problem?

Thanks for your help :)

Sumit
How can I order by KnowledgeArticleViewStat.NormalizedScore when getting rows from KnowledgeArticleVersion table

My SOQL query looks like this:
SELECT Id, KnowledgeArticleId, ArticleType, LastPublishedDate 
FROM KnowledgeArticleVersion 
WHERE PublishStatus = 'online' AND Language = 'en_US' AND ArticleType IN ('...')
LIMIT 5