• Moritz Mueller
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 4
    Replies
I've the following evaluation assignment in one of our apex classes; 
boolean isInternalUser = !'Support Site Guest User'.equals(userinfo.getName());

I tried using different values for 'Support Site Guest User' but I'm just not sure where that expression is being defined? 

Based on the boolean assigment decisions are made such as;
if (isInternalUser)
			email = UserInfo.getUserEmail();

Can anyone help pointing me in the right direction? 

This is for a public knowledge, community cloud 'forcecommunity:availableForAllPageTypes'

Thanks
Hi,

So I've made this custom list view component to show a couple articles, since the inbuilt component doesn't allow for a preset sorting. However, when clicking one of these line items, they do open in a new subtab but the page will reload, which seems unnecessary compared to the unbuilt list view items which open seamlessly in a subtab.

How would I go about having links opened without forcing the entire browser to reload the console;
 
<aura:iteration items="{!v.Articles}" var="articles">
            <tr scope="row">
                <td class="slds-cell-buffer_left slds-cell-wrap"><a href="{!'/lightning/r/Knowledge__kav/'+articles.Id+'/view'}">{!articles.Title}</a></td>
                <td class="slds-cell-buffer_left slds-cell-wrap"><ui:outputDate value="{!articles.LastModifiedDate}"/></td>
            </tr>
          </aura:iteration>

Thanks!
Hi all,

I would like to add another condition which forces the next step within a flow after a setCallback is reached;
 
action.setCallback(this, function(response) {
            var state = response.getState();
            console.log(response.getState());
            if (state === 'SUCCESS'){
                console.log('Response: ' + response.getReturnValue());
                var toastEvent = $A.get("e.force:showToast");
                toastEvent.setParams({
                    "title": "Success!",
                    "message": "entitlement applied.",
                    "type" : "success"
                });
                toastEvent.fire();
                component.find("overlayLib").notifyClose();
                navigate("NEXT");


Any idea what the correct call would be here? 

Thanks
 
Hi,

Am struggling to get a test class for the following custom list view and hoping for some input here, apex;
 
public with sharing class RecentTechnicalBulletinsHomePage {
  @AuraEnabled
  public static List<Knowledge__kav> getArticles(){
	return [Select Id, Title, LastModifiedDate From Knowledge__kav Where RecordTypeId = '0121k000000CipgAAC' ORDER BY LastModifiedDate DESC LIMIT 10];
  }
}

Now my test class looks as follows;
 
@isTest
public class RecentTechnicalBulletinsHomePageTest
{
@testSetup
static void createArticle(){
    List<Knowledge__kav> testArt = new List<Knowledge__kav>();
            for(Integer i=0;i<10;i++) {
            testArt.add(new Knowledge__kav(Title = 'TestArt'+i));
        }
    insert testArt;
}
public static testMethod void getListView(){
        
	
     } 
}

I am just not sure what method to look for and what to test really.

Any direction/input is highly appreciated! 
I've the following evaluation assignment in one of our apex classes; 
boolean isInternalUser = !'Support Site Guest User'.equals(userinfo.getName());

I tried using different values for 'Support Site Guest User' but I'm just not sure where that expression is being defined? 

Based on the boolean assigment decisions are made such as;
if (isInternalUser)
			email = UserInfo.getUserEmail();

Can anyone help pointing me in the right direction? 

This is for a public knowledge, community cloud 'forcecommunity:availableForAllPageTypes'

Thanks
Hi all,

I would like to add another condition which forces the next step within a flow after a setCallback is reached;
 
action.setCallback(this, function(response) {
            var state = response.getState();
            console.log(response.getState());
            if (state === 'SUCCESS'){
                console.log('Response: ' + response.getReturnValue());
                var toastEvent = $A.get("e.force:showToast");
                toastEvent.setParams({
                    "title": "Success!",
                    "message": "entitlement applied.",
                    "type" : "success"
                });
                toastEvent.fire();
                component.find("overlayLib").notifyClose();
                navigate("NEXT");


Any idea what the correct call would be here? 

Thanks
 
Hi,

Am struggling to get a test class for the following custom list view and hoping for some input here, apex;
 
public with sharing class RecentTechnicalBulletinsHomePage {
  @AuraEnabled
  public static List<Knowledge__kav> getArticles(){
	return [Select Id, Title, LastModifiedDate From Knowledge__kav Where RecordTypeId = '0121k000000CipgAAC' ORDER BY LastModifiedDate DESC LIMIT 10];
  }
}

Now my test class looks as follows;
 
@isTest
public class RecentTechnicalBulletinsHomePageTest
{
@testSetup
static void createArticle(){
    List<Knowledge__kav> testArt = new List<Knowledge__kav>();
            for(Integer i=0;i<10;i++) {
            testArt.add(new Knowledge__kav(Title = 'TestArt'+i));
        }
    insert testArt;
}
public static testMethod void getListView(){
        
	
     } 
}

I am just not sure what method to look for and what to test really.

Any direction/input is highly appreciated!