• Christian Schwabe (x)
  • NEWBIE
  • 120 Points
  • Member since 2019
  • Salesforce Technical Consultant
  • Colliers International Deutschland GmbH


  • Chatter
    Feed
  • 2
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 49
    Replies
I have a extension contrlloer for a visualforce page that i need to create a simple text class, but i'm not sure how to accomplish this. Any help would be greatly appreciated. My apex controller is below.
 
Public Class AccountExtensionController{
   private Account acct;
   public List<Bids_Sent__c> bidsList {get;set;}
   public Map<String,List<Site_Bid_Details__c>>  bidsMap {get;set;}
   public AccountExtensionController(ApexPages.StandardController sc){
       acct = (Account)sc.getRecord();
       bidsList = new List<Bids_Sent__c>();
       bidsList = [SELECT Id,IsAddedToPDF__c,Customer__r.Service_Agreement_Verbiage__c,Site__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Site__r.Customer_Location_ID__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acct.Id AND IsAddedToPDF__c=true];
    
    Set<Id> bidId = new  Set<Id>();  
    for(Bids_Sent__c bs : bidsList){
     bidId.add(bs.Id);
    }
     
    bidsMap = new Map<String,List<Site_Bid_Details__c>> ();
    for(Site_Bid_Details__c bd : [SELECT Id, Bid_Name__r.Name,Site__c,Site__r.Customer_Location_ID__c,Cost__c,Increment__c,Total__c,Price__c,Scope__c,Bid_Name__r.Service_Type__c,Number_of_Months__c,Retainer_Fee__c,Monthly_Payment__c,UOM__c  FROM Site_Bid_Details__c WHERE Bid_Name__c IN : bidId]){
        
    if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
    System.debug('CONTAINS KEY: ' + bd.Bid_Name__r.Name);
    bidsMap.get(bd.Bid_Name__r.Name).add(bd);
    } 
  
    else { 
    System.debug('CREATE: ' + bd.Bid_Name__r.Name);
    bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd}); 
   }
 } 

}

}

 
  • January 10, 2020
  • Like
  • 1
Visualforce:

<apex:page standardController="Lead" extensions="testthustd" >

</apex:page>

Apex code

---
public with sharing class testthustd
{

public testthustd(ApexPages.StandardController stdController)


{


HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();

req.setEndpoint('https://goodle.com/api/v2/job/14/launch');
req.setMethod('POST');

req.setCompressed(false);
//req.setBody('key1=value1&key2=value2');
req.setHeader('Content-type', 'application/json'); 
req.setHeader('Authorization', 'Bearer IYGIUHYwfwifuhwufhoGIYHOIVU'); 
req.setHeader('Content-type', 'application/json'); 



try {
res = http.send(req);
} catch(System.CalloutException e) {
System.debug('Callout error: '+ e);
}
System.debug(res.getBody());


}


}

This is not working.  Please help
Hi folks,

I followed this example to have an toogle-input component in my lightning-datatable: https://devlife.tech/lwc/how-to-create-a-custom-column-in-datatable-lwc/
The lightning-databtable show all validation rules in an org.

After successfully implementation I decided to also show a spinner during toogling and reject the toogling when the http response statuscode was not 204 (success). That is the point it was getting curious.

The validation rule ist active, I toogle it and during the toogling a spinner is shown and the validation rules is getting disabled and the toogle is also unchecked. Everything is fine. I click again on the toogle and the spinner appear again and the toogle is getting active again and the validation also. Everything works fine.
BUT NOW, when I click again on the toogle the spinner is not getting active again during apex callout.

Do you know why the code behave like this way?

Here is the code for investigation and support:

toogleValidationRule.html
<template>
    <!--Custom component which will be rendered as each cell in custom column in datatable-->
    <div>
        <template if:true={isLoading}>
            <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner>
        </template>

        <lightning-input 
            type="toggle" 
            variant="label-hidden" 
            message-toggle-active="On"
            message-toggle-inactive="Off"
            checked={checked}
            onchange={handleToggle}>
        </lightning-input>
    </div>
</template>

toogleValidationRule.js
import { LightningElement, api, track } from 'lwc';

/******************
 * MODULES
 ******************/
import { reduceErrors } from 'c/lwcUtil';
import { notifyUser } from 'c/toastMessageHelper';
import { createNotifyMessage } from 'c/toastMessageHelper';

/******************
 * APEX METHODS
 ******************/
import toogleValidationRule from '@salesforce/apex/DataloadSwitchController.toogleValidationRule';


export default class ToogleValidationRule extends LightningElement {

    /*****************************
     * PUBLIC REACTIVE PROPERTIES
     *****************************/
    @api rowId;// Id of validation rule.
    @api manageableState;// Indicates the manageable state of the specified component that is contained in a package: beta, deleted, deprecated, deprecatedEditable, installed, installedEditable, released, unmanaged
    @api validationName;// Api name of validation rule.
    @api entityDefinitionId;// The entity definition for the object associated with the validation rule.

    /*****************************
     * PUBLIC FUNCTIONS
     *****************************/
     // Indicate if validation rule is active or inactive.
    @api 
    get checked()
    {
        return this._checked;
    }

    set checked(value)
    {
        this._checked = value;
    }

    /*****************************
     * PRIVATE REACTIVE PROPERTIES
     *****************************/
    @track isLoading = false;// Indicate if spinner is enabled (true).
    @track _checked;// Is used in public function checked().

    /*****************************
     * PRIVATE PROPERTIES
     *****************************/
    hasRendered = false;// Indicate if component rendered the first time.

    /******************
     * LIFECYCLE HOOKS
     ******************/
    connectedCallback()
    {
        //console.log('>>>ToogleValidationRule (' + this.validationName + ') -- connectedCallback.');
        this.isLoading = true;
        //console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
    }

    renderedCallback()
    {
        //console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
        //console.log('>this.hasRendered: ' + JSON.stringify(this.hasRendered, null, '\t'));

        if( ! this.hasRendered)
        {
            console.log('>>>ToogleValidationRule (' + this.validationName + ') -- renderedCallback.');

            this.hasRendered = ! this.hasRendered;
            this.isLoading = false;
            console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
        }
    }

    /******************
     * TEMPLATE
     ******************/
    get buttonDisabled()
    {
        return this.manageableState !== 'unmanaged' ? true : false;
    }

    /*handleClick()
    {
        this.checked = ! this.checked;
        this.isLoading = ! this.isLoading;
    }*/

    /******************
     * EVENT HANDLER
     ******************/
    handleToggle(event)
    {
        console.log('>>>BEGIN ToogleValidationRule -- handleToggle.');
        console.log('>event.detail: ' + JSON.stringify(event.detail, null, '\t'));
        const checked = event.detail.checked;
        
        console.log('>#1');
        this.isLoading = true;
        console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
        toogleValidationRule({ validationRuleId: this.rowId, state: checked })
            .then(result => {
                console.log('>#2');
                //console.log('>>>ToogleValidationRule -- then().');
                //console.log('>result: ' + JSON.stringify(result, null, '\t'));
                const httpResponse = JSON.parse(result);

                this.handleResponse(httpResponse, checked);
                console.log('>#4');
                //this.isLoading = false;
                console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
            })
            .catch(error => {
                console.error('>error: ' + JSON.stringify(error, null, '\t'));
                /*notifyUser(
                    'Error!',
                    reduceErrors(error).join(', '),
                    'error',
                    'sticky'
                );*/
                this.isLoading = false;
                this.checked = ! checked;
            })
        
        console.log('>>>END ToogleValidationRule -- handleToggle.');
    }

    /******************
     * HELPER FUNCTIONS
     ******************/
    handleResponse(httpResponse, checked)
    {
        console.log('>#3');
        console.log('>>>BEGIN ToogleValidationRule -- handleResponse.');

        console.log('>httpResponse: ' + JSON.stringify(httpResponse, null, '\t'));
        console.log('>checked: ' + JSON.stringify(checked, null, '\t'));
        const statusCode = Number(httpResponse.statusCode);
        console.log('>statusCode: ' + JSON.stringify(statusCode, null, '\t'));



        let notifyMessage = {};
        switch (statusCode) {
            case 204:
                console.log('>204');
                this.checked = checked;
                this.isLoading = false;
                console.log('>this.checked: ' + JSON.stringify(this.checked, null, '\t'));
                /*notifyMessage = createNotifyMessage(
                    `${this.validationName} on ${this.entityDefinitionId} was updated.`,
                    null,
                    'success',
                    'pester'
                );*/
                break;
            default:
                const body = JSON.parse(httpResponse.body);
                console.log('>body: ' + JSON.stringify(body, null, '\t'));
                this.checked = ! checked;// Revert change state when it is not allowed.
                this.isLoading = false;
                console.log('>this.checked: ' + JSON.stringify(this.checked, null, '\t'));
                */notifyMessage = createNotifyMessage(
                    'Error!',
                    reduceErrors(body).join(', '),
                    'error',
                    'sticky'
                )*/
                break;
        }
        console.log('>notifyMessage: ' + JSON.stringify(notifyMessage, null, '\t'));

        */notifyUser(
            notifyMessage.title,
            notifyMessage.message,
            notifyMessage.variant,
            notifyMessage.mode
        );*/

        console.log('>>>END ToogleValidationRule -- handleResponse.');
    }
}



Best regards,
Christian

Hello guys

I need some help with the following business case:

Users create an opportunity with the estimated amount and close date when starting a project. Details on the actual payment amounts and dates are added in the product schedules once the project moves forward.
We need a report that shows all opportunity cashflows on a timeline, combining opportunities with and without schedules and using whatever date and amount is available. For opportunities without a product schedule this would be closedate and amount, for opportunites with a scheduleDate and revenue.

Here is screenshot of the given datat and the expected outcome:
https://www.bilder-upload.eu/bild-326f1a-1601560325.png.html

Best regards,
Christian
Hello everyone,

we are currently successfully testing the connection of Salesforce to our Microsoft 365 e-mail relay (previous: Office 365)

However, we have not yet managed to store the e-mails sent via this interface in the 'Sent Items' folder in Outlook.

Does anyone have experience with this and can they share their experiences? We do not want to go the way suggested by Salesforce (use of BCC recipients).

Best regards,
Christian
Hi guys,

I am on my way to search for a solution in lwc that is able to provide a smooth transition during scrolling on app page for https://lightningdesignsystem.com/components/page-headers/#Record-Home

It should have the same 'animation' like every hightlight panel on a record page. Is there someone who could help me with that?

What I've already done was translate Record Home to lwc template:
<template>
    <div class="slds-page-header slds-page-header_record-home slds-is-fixed" style="z-index: 99; width: 98%;">
        <div class="slds-page-header__row">
            <div class="slds-page-header__col-title">
                <div class="slds-media">
                    <div class="slds-media__figure">
                        <span class="slds-icon_container">
                            <slot name="icon"></slot>
                        </span>
                    </div>
                    <div class="slds-media__body">
                        <div class="slds-page-header__name">
                            <div class="slds-page-header__name-title">
                                <h1>
                                    <slot name="objectLabelSingular"></slot>
                                    <slot name="recordName" class="slds-page-header__title slds-truncate"></slot>
                                </h1>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <template if:true={showPageHeaderActions}>
                <div class="slds-page-header__col-actions">
                    <div class="slds-page-header__controls">
                        <div class="slds-page-header__control">
                            <lightning-button-group>
                                <!-- <template if:true={showButtonGroup}> -->
                                    <template for:each={listOfVisibleButton} for:item="button">
                                        <lightning-button
                                            key={button.name}
                                            name={button.name}
                                            label={button.label}
                                            title={button.title}
                                            icon-name={button.iconName}
                                            onclick={handlePageHeaderActionClicked}
                                        ></lightning-button>
                                    </template>
                                <!-- </template> -->
                                <template if:true={showLightningButtonMenu}>
                                    <lightning-button-menu alternative-text="Show menu" menu-alignment="auto" variant="border-filled">
                                        <template for:each={listOfMenuItem} for:item="menuItem">
                                            <lightning-menu-item
                                                key={menuItem.name}
                                                label={menuItem.label}
                                                value={menuItem.name}
                                                icon-name={menuItem.iconName}
                                            ></lightning-menu-item>
                                        </template>
                                    </lightning-button-menu>
                                </template>
                            </lightning-button-group>
                        </div>
                    </div>
                </div>
            </template>
        </div>
    </div>
</template>

But I stuck on the dynamic part of this scrolling aninmation on my app page. Currently I'm working on show and hide buttons in button-group and move them to lightning-menu-item if you shrink the size of your browser horizontal.

I really appreciate every single help. Thank you.


Best regards,
Chris
Hi all,

I try to start building a lwc based on this lightning design system: https://www.lightningdesignsystem.com/components/page-headers/#Record-Home

The result of the lwc (PageHeaderRecordHome) looks like the following and contains slots to dynamically pass into buttons in the actions area:
<template>
    <div class="slds-page-header slds-page-header_record-home">
        <div class="slds-page-header__row">
            <div class="slds-page-header__col-title">
                <div class="slds-media">
                    <div class="slds-media__figure">
                        <span class="slds-icon_container">
                            <slot name="icon"></slot>
                        </span>
                    </div>
                    <div class="slds-media__body">
                        <div class="slds-page-header__name">
                            <div class="slds-page-header__name-title">
                                <h1>
                                    <slot name="objectLabelSingular"></slot>
                                    <slot name="recordName" class="slds-page-header__title slds-truncate"></slot>
                                </h1>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="slds-page-header__col-actions">
                <div class="slds-page-header__controls">
                    <div class="slds-page-header__control">
                        Number of assigned slot elements: {numberOfSlotElementInPageHeaderActions}
                        <slot
                            name="pageHeaderActions"
                            onslotchange={handlePageHeaderActionsChange}
                        ></slot>
                    </div>
                </div>
            </div>
        </div>
        <div>
            <slot name="subheader"></slot>
        </div>
    </div>
</template>
JS:
import { LightningElement, track } from 'lwc';

export default class PageHeaderRecordHome extends LightningElement {

    @track numberOfSlotElementInPageHeaderActions = 0;
    @track showIt = false;

    renderedCallback(){
        console.log('>>>renderedCallback.');

        
        const test = this.template.querySelectorAll('lightning-button');
        console.log('>>>test:' + JSON.stringify(test.length, 'null', '\t'));
    }

    handlePageHeaderActionsChange(event) {
        console.log('>>>handlePageHeaderActionsChange.');
        const slot = event.target;
        //const hasTitle = slot.assignedElements().length !== 0;
        this.showIt = true;
        /*
        const test = this.template.querySelectorAll('lightning-button');
        console.log('>>>test:' + JSON.stringify(test.length, 'null', '\t'));

        this.numberOfSlotElementInPageHeaderActions = slot.assignedElements().length;
        console.log('>>>slot:' + JSON.stringify(slot, 'null', '\t'));
        console.log('>>>slot.assignedElements():' + JSON.stringify(slot.assignedElements(), 'null', '\t'));
        console.log('>>>slot.assignedNodes():' + JSON.stringify(slot.assignedNodes(), 'null', '\t'));*/
        //this.slotTitleClass = hasTitle ? 'with-title' : '';
    }
}

Unfortunately it contains crappy code. But that's the result from my different tests.

Now I have a parent component (GetAndSearchAllBanks) which consumes this lwc and that looks like the following:
<template>
    <c-page-header-record-home>
        <div slot="objectLabelSingular">Description</div>
        <div slot="pageHeaderActions">
            <lightning-button label="Ok"></lightning-button>
            <lightning-button label="Ok2"></lightning-button>
        </div>
    </c-page-header-record-home>
</template>

Now my main question:
Is it possible (in PageHeaderRecordHome) to only show the buttons if the parent lwc (GetAndSearchAllBanks) implement the slot?
I want to make the child component (PageHeaderRecordHome) to render only this parts who are required and avoid to show divs which are not needed in some usecases.

I found the following: https://salesforce.stackexchange.com/questions/260305/lwc-check-if-slot-is-empty, but I think I implement it wrong or it doesn't work this way.


Have you any tips to make this possible?



Kind regards,
Chris


 
Hi everybody,

based on this article (https://metillium.com/2018/04/collapsible-section-page-layout-record-display-lightning-components/) I've tried to adapt and implement a custom page layout with collapsible sections with lightning web component.
Currently everything works fine, BUT I didn't get it to work to open and close the section with transition so that is looks really smart.

Currently the ui looks like the following:
User-added image

In comparison with the standard pagelayout there are very small differences for the layout.

The arrow looks like a fat arrow:
User-added image

Could you give me a hint how to implement a transition to that the ui looks really smoothly and how to make my custom component look like teh standard layout section?
Is there also the possibility to change the text color?

Unfortunately I have only rudimentary knowledge about CSS.

Best regards,
Christian
 
Hello everybody,

do someone know how to change the color of lightning-button-icon to white?

Based on this example (https://lightningdesignsystem.com/components/modals/#Small-Modal) I've build the following modal window:
User-added image

Everything works fine, except the color of the button-icon.
Does someone know how to style this button into white?


Greetings,
Christian
 

Hi everybody

I read the article "Get #Buildspiration with Asynchronous Apex Triggers in Summer ‘19" (https://developer.salesforce.com/blogs/2019/06/get-buildspiration-with-asynchronous-apex-triggers-in-summer-19.html) a few days ago a had to think about the question "What is the difference between event-driven asynchronous apex trigger vs. @future-Annotation".

I can't think of an academically 100% correct answer right now, because both do the same: They outsource very limit-intensive (related to execution governors and limit) out of the current apex-transaction.

But, why and when should I use @future-Annotation and when event-driven asynchronous apex trigger?

I hope we can discuss this topic together and find a solution to understand vor everyone.


Best regards,
Christian

Hi everyone

I build a custom lightning web component (lwc) with a datatable and a wire-function with an apex-controller.
If i place the lwc on the lightnig record page an error appears:

Looks like there's a problem.

Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. An internal server error has occurred Error ID: 747686150-78663 (1184503911)

Here is a screenshot with the error: https://i.imgur.com/3Ov7PnQ.png

No error in debug log and no error is shown up in browser-console.
I have no reason why this happen. Has anyone some suggestions?

rssFeed.html:
<template>
    <div class={flexipageRegionWidth}>
        <div class="slds-m-top_medium slds-m-bottom_x-large">

            <!-- Simple -->
            <template if:true={data}>
                <div class="slds-p-around_medium lgc-bg">
                    <lightning-datatable
                        key-field="id"
                        data={data}
                        columns={columns}
                        is-loading={tableLoadingState}
                        hide-checkbox-column={hideCheckboxColumn}>
                    </lightning-datatable>
                </div>
            </template>
        </div>
        
        <!-- Data failed to load -->
        <template if:false={data}>
            <div class="slds-text-color_error">
                An error occurred while loading.
            </div>
        </template>
    </div>
</template>

rssFeed.js:
import { LightningElement, wire, track, api } from 'lwc';

import { getObjectInfo } from 'lightning/uiObjectInfoApi'; // https://developer.salesforce.com/docs/component-library/documentation/lwc/lwc.reference_wire_adapters_object_info
import RSSFEED_OBJECT from '@salesforce/schema/RSSFeed__c';

import getFilteredRssFeeds from '@salesforce/apex/RssFeedController.getFilteredRssFeeds';

export default class RssFeed extends LightningElement {
    @api flexipageRegionWidth; // https://developer.salesforce.com/docs/component-library/documentation/lwc/use_width_aware
    @api recordId;// Public property. Id of brand-record.
    @api columnNames = undefined; // Public property. Set by lightning app builder.
    objectInfo = undefined; // 

    hideCheckboxColumn = true; // If true, the checkbox column for row selection is hidden.

    @track data;
    @track error;

    @track columns;
    @track tableLoadingState = true;
   

    @wire(getObjectInfo, { objectApiName: RSSFEED_OBJECT })
    wireObjectInfo({error, data}){
        console.log('>>>wireObjectInfo called.');

        if (data) {
            console.log('>>>data: ' + JSON.stringify(data, null, '\t'));
            this.objectInfo = data;
            this.error = undefined;

            this._prepareTableColumns();
        } else if (error) {
            console.error('>>>error: ' + JSON.stringify(error, null, '\t'));

            this.error = error;
            this.objectInfo = undefined;
        }
    }
    
    @wire(getFilteredRssFeeds, { brandId: '$recordId' })
    wiredFilteredRssFeeds({error, data}){
        console.log('>>>wiredFilteredRssFeeds called.');

        if (data) {
            console.log('>>>' + JSON.stringify(data, null, '\t'));
            this.data = data;
            this.error = undefined;
        } else if (error) {
            console.error('>>>' + JSON.stringify(error, null, '\t'));
            this.error = error;
            this.data = undefined;
        }
    }

    _prepareTableColumns(){
        console.log('>>>_prepareTableColumns called.');
        this.columns.forEach(column => {
            let columnLabel = ((this.objectInfo) ? this.objectInfo.fields[column.fieldName].label : '');
            column.label = columnLabel;
            console.log('>>>column' + JSON.stringify(column, null, '\t'));
        });
    }

    /**
    * https://developer.salesforce.com/docs/component-library/documentation/lwc/create_lifecycle_hooks_dom.html
    * The connectedCallback() lifecycle hook fires when a component is inserted into the DOM.
    */
    async connectedCallback() {
        console.log('>>>async connectedCallback called.');
        this.tableLoadingState = false;
        console.log('>>>this.columnNames: ' + this.columnNames);

        this.columns = JSON.parse(this.columnNames);
        console.log('>>>this.columns: ' + JSON.stringify(this.columns, null, '\t'));
    }
}

rssFeed.js-meta.xml:
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="RssFeed">
    <apiVersion>46.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage">
            <property default="[{ 'label': 'Title', 'fieldName': 'Title__c' },{ 'label': 'Description', 'fieldName': 'Description__c' },{ 'label': 'Link', 'fieldName': 'Link__c', 'type': 'url', 'fixedWidth': 200 },{ 'label': 'Date', 'fieldName': 'Date__c', 'type': 'date', 'fixedWidth': 100 }]" description="Specifies which columns are displayed." label="Column Names" name="columnNames" required="true" type="String"/>
            <objects>
                <object>Brand__c</object>
            </objects>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

Here is the apex-controller:
/**
* Is used for lightning web component (lwc) named rssFeed.
* Query relevant rss feed filtered by Id of Brand (Brand__c).
*
* @author: <Christian Schwabe> (Christian.Schwabe@colliers.com)
*
* @history:
* version		    | author				                                | changes
* ====================================================================================
* 0.1 08.05.2019	| Christian Schwabe (Christian.Schwabe@colliers.com)	| initial version.
*/
public with sharing class RssFeedController {

    /**
    * Query RSS-Feed records filtered by Id for Brand (Brand__c).
    *
    * @param  brandId          Id for Brand (Brand__c)
    *
    * @return List<Brand__>
    */
    @AuraEnabled(cacheable=true)
    public static List<RSSFeed__c> getFilteredRssFeeds(Id brandId){
        List<RSSFeed__c> listOfRssFeed = new List<RSSFeed__c>();
        for(RSSFeed__c rssFeed : [SELECT Id, Link__c, Title__c, Author__c, Description__c, Date__c FROM RSSFeed__c WHERE Brand__c = :brandId]){
            rssFeed.Description__c = String.valueOf(rssFeed.Description__c).stripHtmlTags();

            listOfRssFeed.add(rssFeed);
        }

        return listOfRssFeed;
    }
}


 
Hi all,

I have built a vf-page, that should show helptext in classic, lightning experience and salesforce1 but does not rendered helptext in lightning experience properly.

Question:
Does anyone know why helptext is not rendered in lightning experience?

Related article:
  • https://salesforce.stackexchange.com/questions/21412/help-text-not-appearing-when-using-apexoutputfield-with-a-custom-label

That's the way it look (currently):
Lightning experience:
User-added image
Classic:
User-added image
Salesforce1:
User-added image

Following code is used for vf-page:
<apex:page applyBodyTag="false"
    applyHtmlTag="true"
    renderAs="html"
    docType="html-5.0"
    showHeader="true"
    sidebar="true"
    standardStylesheets="true"
    title="{!title}"
    controller="SepaTransactionController"
    tabStyle="SepaSearchTransaction__tab"
    lightningStylesheets="true" 
>

<apex:form >
        <apex:pageMessages id="pageMessage" escape="false"/>

        <apex:pageBlock title="{!title}" mode="detail" id="pageBlockSetionItemSearchCriteria">

            <apex:pageBlockSection title="{!$Label.Input}" columns="{!IF(OR($User.UIThemeDisplayed = 'Theme3', $User.UIThemeDisplayed = 'Theme4d'), 2, 1)}" id="pageBlockSearchCriteria">
                <apex:PageBlockSectionItem helpText="{!$Label.HelpGASATIds}">
                    <apex:outputLabel value="{!transactionPluralName} Ids" for="idsId"/>
                    <apex:inputText id="idsId" value="{!transactionIds}"/>
                </apex:PageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

Hello guys

I need some help with the following business case:

Users create an opportunity with the estimated amount and close date when starting a project. Details on the actual payment amounts and dates are added in the product schedules once the project moves forward.
We need a report that shows all opportunity cashflows on a timeline, combining opportunities with and without schedules and using whatever date and amount is available. For opportunities without a product schedule this would be closedate and amount, for opportunites with a scheduleDate and revenue.

Here is screenshot of the given datat and the expected outcome:
https://www.bilder-upload.eu/bild-326f1a-1601560325.png.html

Best regards,
Christian
Hi all,

I have built a vf-page, that should show helptext in classic, lightning experience and salesforce1 but does not rendered helptext in lightning experience properly.

Question:
Does anyone know why helptext is not rendered in lightning experience?

Related article:
  • https://salesforce.stackexchange.com/questions/21412/help-text-not-appearing-when-using-apexoutputfield-with-a-custom-label

That's the way it look (currently):
Lightning experience:
User-added image
Classic:
User-added image
Salesforce1:
User-added image

Following code is used for vf-page:
<apex:page applyBodyTag="false"
    applyHtmlTag="true"
    renderAs="html"
    docType="html-5.0"
    showHeader="true"
    sidebar="true"
    standardStylesheets="true"
    title="{!title}"
    controller="SepaTransactionController"
    tabStyle="SepaSearchTransaction__tab"
    lightningStylesheets="true" 
>

<apex:form >
        <apex:pageMessages id="pageMessage" escape="false"/>

        <apex:pageBlock title="{!title}" mode="detail" id="pageBlockSetionItemSearchCriteria">

            <apex:pageBlockSection title="{!$Label.Input}" columns="{!IF(OR($User.UIThemeDisplayed = 'Theme3', $User.UIThemeDisplayed = 'Theme4d'), 2, 1)}" id="pageBlockSearchCriteria">
                <apex:PageBlockSectionItem helpText="{!$Label.HelpGASATIds}">
                    <apex:outputLabel value="{!transactionPluralName} Ids" for="idsId"/>
                    <apex:inputText id="idsId" value="{!transactionIds}"/>
                </apex:PageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 
Hi

I am trying to get the result in testclass from SOSL query ,but the SOSL is not returning any values even when there is a matching test data.

Please refer below code:
User user=new User(FirstName='Test',
                             LastName='Contact',
                             Alias='tcont',
                             email='test.contact@xyz.com',
                             Username='test.contact@xyz.com',
                             CommunityNickname='cont',
                                        profileId=sysAd.id,
                             EmailEncodingKey=DummyUser.EmailEncodingKey,
                             TimeZoneSidKey=DummyUser.TimeZoneSidKey,
                             LocaleSidKey=DummyUser.LocaleSidKey,
                             LanguageLocaleKey=DummyUser.LanguageLocaleKey
                            );
                            insert user;
         System.RunAs(user){
        
         Account acc=new Account(Name='Test',
                                 RecordTypeId=accRecMap.get('Con').getRecordTypeId()
                                );
         insert acc;
         Contact cont=new Contact(Account=acc,
                                  FirstName='Test',
                                  LastName='Contact',
                                  AccountId = acc.Id,
                                  RecordTypeId=contRecMap.get(' Contact').getRecordTypeId()
                                 );
         insert cont;
         
        String userName=Userinfo.getName();
        Map<String, Schema.RecordTypeInfo> contactRecMap= Schema.SObjectType.Contact.getRecordTypeInfosByName();
      
                   
        String searchQueryCon = 'FIND \'' + userName + '\' IN ALL Fields RETURNING Contact(Id, Name,FirstName, LastName, Title, Email, Phone, Description)';
        System.debug(searchQueryCon);
        System.debug(cont);
        List<List<Contact>> contactListNew = search.query(searchQueryCon);
        System.debug(contactListNew);
       
         }
Hi folks,

I followed this example to have an toogle-input component in my lightning-datatable: https://devlife.tech/lwc/how-to-create-a-custom-column-in-datatable-lwc/
The lightning-databtable show all validation rules in an org.

After successfully implementation I decided to also show a spinner during toogling and reject the toogling when the http response statuscode was not 204 (success). That is the point it was getting curious.

The validation rule ist active, I toogle it and during the toogling a spinner is shown and the validation rules is getting disabled and the toogle is also unchecked. Everything is fine. I click again on the toogle and the spinner appear again and the toogle is getting active again and the validation also. Everything works fine.
BUT NOW, when I click again on the toogle the spinner is not getting active again during apex callout.

Do you know why the code behave like this way?

Here is the code for investigation and support:

toogleValidationRule.html
<template>
    <!--Custom component which will be rendered as each cell in custom column in datatable-->
    <div>
        <template if:true={isLoading}>
            <lightning-spinner alternative-text="Loading" size="small"></lightning-spinner>
        </template>

        <lightning-input 
            type="toggle" 
            variant="label-hidden" 
            message-toggle-active="On"
            message-toggle-inactive="Off"
            checked={checked}
            onchange={handleToggle}>
        </lightning-input>
    </div>
</template>

toogleValidationRule.js
import { LightningElement, api, track } from 'lwc';

/******************
 * MODULES
 ******************/
import { reduceErrors } from 'c/lwcUtil';
import { notifyUser } from 'c/toastMessageHelper';
import { createNotifyMessage } from 'c/toastMessageHelper';

/******************
 * APEX METHODS
 ******************/
import toogleValidationRule from '@salesforce/apex/DataloadSwitchController.toogleValidationRule';


export default class ToogleValidationRule extends LightningElement {

    /*****************************
     * PUBLIC REACTIVE PROPERTIES
     *****************************/
    @api rowId;// Id of validation rule.
    @api manageableState;// Indicates the manageable state of the specified component that is contained in a package: beta, deleted, deprecated, deprecatedEditable, installed, installedEditable, released, unmanaged
    @api validationName;// Api name of validation rule.
    @api entityDefinitionId;// The entity definition for the object associated with the validation rule.

    /*****************************
     * PUBLIC FUNCTIONS
     *****************************/
     // Indicate if validation rule is active or inactive.
    @api 
    get checked()
    {
        return this._checked;
    }

    set checked(value)
    {
        this._checked = value;
    }

    /*****************************
     * PRIVATE REACTIVE PROPERTIES
     *****************************/
    @track isLoading = false;// Indicate if spinner is enabled (true).
    @track _checked;// Is used in public function checked().

    /*****************************
     * PRIVATE PROPERTIES
     *****************************/
    hasRendered = false;// Indicate if component rendered the first time.

    /******************
     * LIFECYCLE HOOKS
     ******************/
    connectedCallback()
    {
        //console.log('>>>ToogleValidationRule (' + this.validationName + ') -- connectedCallback.');
        this.isLoading = true;
        //console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
    }

    renderedCallback()
    {
        //console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
        //console.log('>this.hasRendered: ' + JSON.stringify(this.hasRendered, null, '\t'));

        if( ! this.hasRendered)
        {
            console.log('>>>ToogleValidationRule (' + this.validationName + ') -- renderedCallback.');

            this.hasRendered = ! this.hasRendered;
            this.isLoading = false;
            console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
        }
    }

    /******************
     * TEMPLATE
     ******************/
    get buttonDisabled()
    {
        return this.manageableState !== 'unmanaged' ? true : false;
    }

    /*handleClick()
    {
        this.checked = ! this.checked;
        this.isLoading = ! this.isLoading;
    }*/

    /******************
     * EVENT HANDLER
     ******************/
    handleToggle(event)
    {
        console.log('>>>BEGIN ToogleValidationRule -- handleToggle.');
        console.log('>event.detail: ' + JSON.stringify(event.detail, null, '\t'));
        const checked = event.detail.checked;
        
        console.log('>#1');
        this.isLoading = true;
        console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
        toogleValidationRule({ validationRuleId: this.rowId, state: checked })
            .then(result => {
                console.log('>#2');
                //console.log('>>>ToogleValidationRule -- then().');
                //console.log('>result: ' + JSON.stringify(result, null, '\t'));
                const httpResponse = JSON.parse(result);

                this.handleResponse(httpResponse, checked);
                console.log('>#4');
                //this.isLoading = false;
                console.log('>this.isLoading: ' + JSON.stringify(this.isLoading, null, '\t'));
            })
            .catch(error => {
                console.error('>error: ' + JSON.stringify(error, null, '\t'));
                /*notifyUser(
                    'Error!',
                    reduceErrors(error).join(', '),
                    'error',
                    'sticky'
                );*/
                this.isLoading = false;
                this.checked = ! checked;
            })
        
        console.log('>>>END ToogleValidationRule -- handleToggle.');
    }

    /******************
     * HELPER FUNCTIONS
     ******************/
    handleResponse(httpResponse, checked)
    {
        console.log('>#3');
        console.log('>>>BEGIN ToogleValidationRule -- handleResponse.');

        console.log('>httpResponse: ' + JSON.stringify(httpResponse, null, '\t'));
        console.log('>checked: ' + JSON.stringify(checked, null, '\t'));
        const statusCode = Number(httpResponse.statusCode);
        console.log('>statusCode: ' + JSON.stringify(statusCode, null, '\t'));



        let notifyMessage = {};
        switch (statusCode) {
            case 204:
                console.log('>204');
                this.checked = checked;
                this.isLoading = false;
                console.log('>this.checked: ' + JSON.stringify(this.checked, null, '\t'));
                /*notifyMessage = createNotifyMessage(
                    `${this.validationName} on ${this.entityDefinitionId} was updated.`,
                    null,
                    'success',
                    'pester'
                );*/
                break;
            default:
                const body = JSON.parse(httpResponse.body);
                console.log('>body: ' + JSON.stringify(body, null, '\t'));
                this.checked = ! checked;// Revert change state when it is not allowed.
                this.isLoading = false;
                console.log('>this.checked: ' + JSON.stringify(this.checked, null, '\t'));
                */notifyMessage = createNotifyMessage(
                    'Error!',
                    reduceErrors(body).join(', '),
                    'error',
                    'sticky'
                )*/
                break;
        }
        console.log('>notifyMessage: ' + JSON.stringify(notifyMessage, null, '\t'));

        */notifyUser(
            notifyMessage.title,
            notifyMessage.message,
            notifyMessage.variant,
            notifyMessage.mode
        );*/

        console.log('>>>END ToogleValidationRule -- handleResponse.');
    }
}



Best regards,
Christian
Hello everyone,

we are currently successfully testing the connection of Salesforce to our Microsoft 365 e-mail relay (previous: Office 365)

However, we have not yet managed to store the e-mails sent via this interface in the 'Sent Items' folder in Outlook.

Does anyone have experience with this and can they share their experiences? We do not want to go the way suggested by Salesforce (use of BCC recipients).

Best regards,
Christian
Hi guys,

I am on my way to search for a solution in lwc that is able to provide a smooth transition during scrolling on app page for https://lightningdesignsystem.com/components/page-headers/#Record-Home

It should have the same 'animation' like every hightlight panel on a record page. Is there someone who could help me with that?

What I've already done was translate Record Home to lwc template:
<template>
    <div class="slds-page-header slds-page-header_record-home slds-is-fixed" style="z-index: 99; width: 98%;">
        <div class="slds-page-header__row">
            <div class="slds-page-header__col-title">
                <div class="slds-media">
                    <div class="slds-media__figure">
                        <span class="slds-icon_container">
                            <slot name="icon"></slot>
                        </span>
                    </div>
                    <div class="slds-media__body">
                        <div class="slds-page-header__name">
                            <div class="slds-page-header__name-title">
                                <h1>
                                    <slot name="objectLabelSingular"></slot>
                                    <slot name="recordName" class="slds-page-header__title slds-truncate"></slot>
                                </h1>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <template if:true={showPageHeaderActions}>
                <div class="slds-page-header__col-actions">
                    <div class="slds-page-header__controls">
                        <div class="slds-page-header__control">
                            <lightning-button-group>
                                <!-- <template if:true={showButtonGroup}> -->
                                    <template for:each={listOfVisibleButton} for:item="button">
                                        <lightning-button
                                            key={button.name}
                                            name={button.name}
                                            label={button.label}
                                            title={button.title}
                                            icon-name={button.iconName}
                                            onclick={handlePageHeaderActionClicked}
                                        ></lightning-button>
                                    </template>
                                <!-- </template> -->
                                <template if:true={showLightningButtonMenu}>
                                    <lightning-button-menu alternative-text="Show menu" menu-alignment="auto" variant="border-filled">
                                        <template for:each={listOfMenuItem} for:item="menuItem">
                                            <lightning-menu-item
                                                key={menuItem.name}
                                                label={menuItem.label}
                                                value={menuItem.name}
                                                icon-name={menuItem.iconName}
                                            ></lightning-menu-item>
                                        </template>
                                    </lightning-button-menu>
                                </template>
                            </lightning-button-group>
                        </div>
                    </div>
                </div>
            </template>
        </div>
    </div>
</template>

But I stuck on the dynamic part of this scrolling aninmation on my app page. Currently I'm working on show and hide buttons in button-group and move them to lightning-menu-item if you shrink the size of your browser horizontal.

I really appreciate every single help. Thank you.


Best regards,
Chris
Hi all,

I try to start building a lwc based on this lightning design system: https://www.lightningdesignsystem.com/components/page-headers/#Record-Home

The result of the lwc (PageHeaderRecordHome) looks like the following and contains slots to dynamically pass into buttons in the actions area:
<template>
    <div class="slds-page-header slds-page-header_record-home">
        <div class="slds-page-header__row">
            <div class="slds-page-header__col-title">
                <div class="slds-media">
                    <div class="slds-media__figure">
                        <span class="slds-icon_container">
                            <slot name="icon"></slot>
                        </span>
                    </div>
                    <div class="slds-media__body">
                        <div class="slds-page-header__name">
                            <div class="slds-page-header__name-title">
                                <h1>
                                    <slot name="objectLabelSingular"></slot>
                                    <slot name="recordName" class="slds-page-header__title slds-truncate"></slot>
                                </h1>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="slds-page-header__col-actions">
                <div class="slds-page-header__controls">
                    <div class="slds-page-header__control">
                        Number of assigned slot elements: {numberOfSlotElementInPageHeaderActions}
                        <slot
                            name="pageHeaderActions"
                            onslotchange={handlePageHeaderActionsChange}
                        ></slot>
                    </div>
                </div>
            </div>
        </div>
        <div>
            <slot name="subheader"></slot>
        </div>
    </div>
</template>
JS:
import { LightningElement, track } from 'lwc';

export default class PageHeaderRecordHome extends LightningElement {

    @track numberOfSlotElementInPageHeaderActions = 0;
    @track showIt = false;

    renderedCallback(){
        console.log('>>>renderedCallback.');

        
        const test = this.template.querySelectorAll('lightning-button');
        console.log('>>>test:' + JSON.stringify(test.length, 'null', '\t'));
    }

    handlePageHeaderActionsChange(event) {
        console.log('>>>handlePageHeaderActionsChange.');
        const slot = event.target;
        //const hasTitle = slot.assignedElements().length !== 0;
        this.showIt = true;
        /*
        const test = this.template.querySelectorAll('lightning-button');
        console.log('>>>test:' + JSON.stringify(test.length, 'null', '\t'));

        this.numberOfSlotElementInPageHeaderActions = slot.assignedElements().length;
        console.log('>>>slot:' + JSON.stringify(slot, 'null', '\t'));
        console.log('>>>slot.assignedElements():' + JSON.stringify(slot.assignedElements(), 'null', '\t'));
        console.log('>>>slot.assignedNodes():' + JSON.stringify(slot.assignedNodes(), 'null', '\t'));*/
        //this.slotTitleClass = hasTitle ? 'with-title' : '';
    }
}

Unfortunately it contains crappy code. But that's the result from my different tests.

Now I have a parent component (GetAndSearchAllBanks) which consumes this lwc and that looks like the following:
<template>
    <c-page-header-record-home>
        <div slot="objectLabelSingular">Description</div>
        <div slot="pageHeaderActions">
            <lightning-button label="Ok"></lightning-button>
            <lightning-button label="Ok2"></lightning-button>
        </div>
    </c-page-header-record-home>
</template>

Now my main question:
Is it possible (in PageHeaderRecordHome) to only show the buttons if the parent lwc (GetAndSearchAllBanks) implement the slot?
I want to make the child component (PageHeaderRecordHome) to render only this parts who are required and avoid to show divs which are not needed in some usecases.

I found the following: https://salesforce.stackexchange.com/questions/260305/lwc-check-if-slot-is-empty, but I think I implement it wrong or it doesn't work this way.


Have you any tips to make this possible?



Kind regards,
Chris


 
I have a extension contrlloer for a visualforce page that i need to create a simple text class, but i'm not sure how to accomplish this. Any help would be greatly appreciated. My apex controller is below.
 
Public Class AccountExtensionController{
   private Account acct;
   public List<Bids_Sent__c> bidsList {get;set;}
   public Map<String,List<Site_Bid_Details__c>>  bidsMap {get;set;}
   public AccountExtensionController(ApexPages.StandardController sc){
       acct = (Account)sc.getRecord();
       bidsList = new List<Bids_Sent__c>();
       bidsList = [SELECT Id,IsAddedToPDF__c,Customer__r.Service_Agreement_Verbiage__c,Site__c,Site__r.Contract_Start_Date__c,Site__r.Contract_End_Date__c,Site__r.Customer_Location_ID__c,Service_Year__c,Customer__r.Contract_Start_Date__c,Name,Customer__r.Contract_End_Date__c,Site__r.Name,Customer__r.Name,Primary_Contact__r.FirstName,Site__r.BillingCity,Site__r.BillingState,Site__r.BillingStreet,Site__r.BillingPostalCode  FROM Bids_Sent__c WHERE Awarded__c =: acct.Id AND IsAddedToPDF__c=true];
    
    Set<Id> bidId = new  Set<Id>();  
    for(Bids_Sent__c bs : bidsList){
     bidId.add(bs.Id);
    }
     
    bidsMap = new Map<String,List<Site_Bid_Details__c>> ();
    for(Site_Bid_Details__c bd : [SELECT Id, Bid_Name__r.Name,Site__c,Site__r.Customer_Location_ID__c,Cost__c,Increment__c,Total__c,Price__c,Scope__c,Bid_Name__r.Service_Type__c,Number_of_Months__c,Retainer_Fee__c,Monthly_Payment__c,UOM__c  FROM Site_Bid_Details__c WHERE Bid_Name__c IN : bidId]){
        
    if(bidsMap.containsKey(bd.Bid_Name__r.Name)){
    System.debug('CONTAINS KEY: ' + bd.Bid_Name__r.Name);
    bidsMap.get(bd.Bid_Name__r.Name).add(bd);
    } 
  
    else { 
    System.debug('CREATE: ' + bd.Bid_Name__r.Name);
    bidsMap.put(bd.Bid_Name__r.Name,new List<Site_Bid_Details__c>{bd}); 
   }
 } 

}

}

 
  • January 10, 2020
  • Like
  • 1
So the requirement is to build a way for users to be able to schedule emails to go out at certain times. So what I have done is built a custom object called EmailScheduler__c and gave it fields such as Recipients__c, Time__c, Subject__c, Body__c, FileName__c, ClassName__c, etc. I have then made a trigger that will run after inserting a new record of EmailScheduler__c and it will grab the information for that new object. 

Where I'm stuck at is how do I setup the scheduler class from the trigger. I know I can setup a dynamic scheduler and a dynamic emailGenerator class but how do I set that up to run, and when the user deletes a record would it delete the schedule on the backend?
Hello everyone,

i try to build a custom lightning web component for a generic way to merge custom and standardobjects like the standard merge functionality for account, contact and leads.

Therefore i built two lwcs:
  • potentialDuplicates
  • mergeDuplicates
potentialDupplicates show the result for the duplicate rules (DuplicateRule), duplicate recordset (DuplicateRecordSet) and duplicate record item (DuplicateRecordItem) and looks like the following one:
https://ibb.co/gwp1fRk (https://ibb.co/jMRKJZL)

The first lwc (german language) show the salesforce standard "potential duplicates" component.
Below that - the highlighted one is my custom lwc.

The first screen (step1) looks like the following (Unfortunately I can't upload images - sorry for that):
https://ibb.co/MkJmmZT

After the selection and click on "Next" second screen (step2) appears and looks like the follwing:
https://ibb.co/xXQZDV1

On screen2 you have to choose the masterrecord and fields which has to move to masterrecord.

For comparison: In the standard potential duplicates the screen for step2 looks like the following:
https://ibb.co/5x7hfFv

I want to do this the exact same way. Here comes my problem: I didn't find a structure provided by apexcontroller that is able to iterate in a way to this list that columns and rows are syncron. The prepared structure of (selected) data records should be combined in such a way that they can be passed on to an apex controller, which then takes over the merge process.

One of my various solutions provide the following structure: Map<Id, List<Map<String, String>>>. Where key of map is the record id. The value of the outer map is a list with a map (key: apiname, value: fieldvalue). But this structure does not fit to the columns of screen2 and you can't iterate over map. Also a template expression doesn't allow NumericLiteral to access a specific index or key. It seems like everything has to be a list.

If I can realize this list of the selection, the processing of the data sets in Apex is only a child's play. Today I have worried all day about it and have not found an adequate solution.

Any suggestions for a provided structure of objects, arrays, maps to rule this target?

After i finished that components and everything works fine I am willing to publish the corresponding components.
Hi all,

I have built a vf-page, that should show helptext in classic, lightning experience and salesforce1 but does not rendered helptext in lightning experience properly.

Question:
Does anyone know why helptext is not rendered in lightning experience?

Related article:
  • https://salesforce.stackexchange.com/questions/21412/help-text-not-appearing-when-using-apexoutputfield-with-a-custom-label

That's the way it look (currently):
Lightning experience:
User-added image
Classic:
User-added image
Salesforce1:
User-added image

Following code is used for vf-page:
<apex:page applyBodyTag="false"
    applyHtmlTag="true"
    renderAs="html"
    docType="html-5.0"
    showHeader="true"
    sidebar="true"
    standardStylesheets="true"
    title="{!title}"
    controller="SepaTransactionController"
    tabStyle="SepaSearchTransaction__tab"
    lightningStylesheets="true" 
>

<apex:form >
        <apex:pageMessages id="pageMessage" escape="false"/>

        <apex:pageBlock title="{!title}" mode="detail" id="pageBlockSetionItemSearchCriteria">

            <apex:pageBlockSection title="{!$Label.Input}" columns="{!IF(OR($User.UIThemeDisplayed = 'Theme3', $User.UIThemeDisplayed = 'Theme4d'), 2, 1)}" id="pageBlockSearchCriteria">
                <apex:PageBlockSectionItem helpText="{!$Label.HelpGASATIds}">
                    <apex:outputLabel value="{!transactionPluralName} Ids" for="idsId"/>
                    <apex:inputText id="idsId" value="{!transactionIds}"/>
                </apex:PageBlockSectionItem>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 
HI,

Need help covering test class for below Apex Batch class,i really appreciate if someone respond me quickly.
Thanks In Advance!
 
global class UpdateBatch_Usr_login implements Database.Batchable<sObject> {
    String query;
    global Database.QueryLocator start(Database.BatchableContext BC) {

        query = 'SELECT Id, isActive, Status__c FROM User';

        return Database.getQueryLocator(query);

    }
    global void execute(Database.BatchableContext BC, List<User> scope) {    

        List<Id> usrLogLst = new List<Id>();

        for(UserLogin ul : [SELECT UserId, isFrozen from UserLogin where isFrozen = true and UserId IN: scope]){

           usrLogLst.add(ul.userid);
        }
        for(User usr : scope){

            if(usrLogLst.contains(usr.id)){

                usr.status__c = 'Frozen';
            }

            else{

                if(usr.isActive==true){

                    usr.status__c = 'Active';
                }

                else{
                    usr.status__c = 'Inactive';

                }

            }

        }

        update scope;
    }

    global void finish(Database.BatchableContext BC) {

    }
}