Skip to content

Commit 7f32c55

Browse files
authored
Merge pull request #173 from Acumatica/feature/EDU-9566-2026R1-T230-Course-Update-Code-Snippets
EDU-9566: Updated files in T230 to use LongOperationManager.StartOperation
2 parents cb9b434 + f813223 commit 7f32c55

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

Customization/T230/CodeSnippets/Activity3.1_Step3/RSSVRepairPriceMaint.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,11 @@ protected virtual IEnumerable validateItemPrices(PXAdapter adapter)
9191

9292
var repairPriceItem = RepairPrices.Current;
9393
// Execute the ValidatePrices method asynchronously by
94-
// using PXLongOperation.StartOperation
95-
PXLongOperation.StartOperation(this, () => ValidatePrices(repairPriceItem));
94+
// using LongOperationManager.StartOperation
95+
LongOperationManager.StartOperation(cancellationToken =>
96+
{
97+
ValidatePrices(repairPriceItem);
98+
});
9699

97100
// Return the local list variable.
98101
return list;

Customization/T230/PhoneRepairShop_Code/PhoneRepairShop_Code/RSSVRepairPriceMaint.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,20 @@ protected virtual IEnumerable validateItemPrices(PXAdapter adapter)
7676
Actions.PressSave();
7777

7878
var repairPriceItem = RepairPrices.Current;
79-
//Execute ValidatePrices method asynchronously using PXLongOperation.StartOperation
80-
PXLongOperation.StartOperation(this, () => ValidatePrices(repairPriceItem));
79+
// Execute the ValidatePrices method asynchronously by
80+
// using LongOperationManager.StartOperation
81+
LongOperationManager.StartOperation(cancellationToken =>
82+
{
83+
ValidatePrices(repairPriceItem);
84+
});
8185

8286
// Return the local list variable.
8387
return list;
8488
}
8589
#endregion
86-
87-
private static void ValidatePrices(RSSVRepairPrice repairPriceItem)
90+
91+
92+
private static void ValidatePrices(RSSVRepairPrice repairPriceItem)
8893
{
8994
/* Create an instance of the RSSVRepairPriceMaint graph and set
9095
the Current property of its RepairPrices view.*/

0 commit comments

Comments
 (0)