web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

I would like to select two record from n number of record in Automated Test case

(1) ShareShare
ReportReport
Posted on by 132
I have one action called 'Reject', when I click on it , the status will go to Reject , When I do the multi selection and Click on Reject It will rejects the all the selected Lines.
In page we used setselectionfilter to work.
 
But, When its comes to automated test case , how can I select the records, even If I do filter the first record is taking place, not the remaining records
 
On the Date filter there are two records, I would like to reject those two.
 
How can I do that. Please suggest your answers.
 
Thank you.
 
I have the same question (0)
  • HeinKruger Profile Picture
    on at
    I would like to select two record from n number of record in Automated Test case
    If its more than one record the standard is to use FindSet.
    You add your SetRange and SetFilters and then you use Findset,.
    Inside the FindSet you will Reject them one by one.

    Something like this:
     SalesLine.SetRange("Document Type", SalesLine."Document Type"::Order);
            SalesLine.SetRange("Document No.", SalesHeader."No.");
            SalesLine.SetRange(Type, SalesLine.Type::Item);
            SalesLine.SetFilter("Location Code", '<>%1', '');
            SalesLine.SetLoadFields("Document No.", "Line No.");
            if SalesLine.FindSet() then
                repeat
    SalesLine.Reject.Invoke();
                until SalesLine.Next() = 0;

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,160

#2
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,943

#3
Sumit Singh Profile Picture

Sumit Singh 2,823

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans