Hi Friends,
I'm stuck in a part that actually my requirement is to :
I have to select the single line in a page and I should ADD Action button
After when I select that line and click action button it should display the variant that is specifies only for the particular Item what I added to the variants.
For Example , You can take in Item Card as an example when you click Item availability by variant it specifies particular thing alone
rather In lines I want to select and view ...using AL CODE
Thanks & Regards
Karthikeyani C
Hi,
please share the written code, I will check and correct it.
Regards
Amit Sharma
Hi,
I have tried to create some AL objects for you, for just an idea, more you can changes according to your need.
pageextension 60100 "Modify SubSOPage" extends "Sales Order Subform"
{
actions
{
addafter("F&unctions")
{
action(VariantSelection)
{
ApplicationArea = All;
Caption = 'Select Variant';
Promoted = true;
PromotedIsBig = true;
PromotedCategory = Process;
image = SelectEntries;
trigger OnAction()
var
VariantSelection: Page "Variant Selection";
begin
if rec.Type = rec.Type::item then begin
VariantSelection.SetRequest(rec."No.");
VariantSelection.RunModal();
end;
end;
}
}
}
}
|
page 60102 "Variant Selection"
{
Caption = 'Variant Selection';
PageType = ConfirmationDialog;
layout
{
area(content)
{
group(General)
{
field(ItemNo; itemNo)
{
ApplicationArea = all;
}
}
}
}
trigger OnQueryClosePage(CloseAction: Action): Boolean
var
ItemVariant: Record "Item Variant";
begin
ItemVariant.Reset();
ItemVariant.SetRange("Item No.", ItemNo);
Message('There are total %1 Variant found for Item No. %2', ItemVariant.Count, ItemNo);
end;
procedure SetRequest(ItemNo2: code[20])
begin
ItemNo := ItemNo2;
end;
var
ItemNo: code[20];
}
|
On the list page, how to show variants on selected lines and that should be selected and update in another Page.
This is what I'm trying to ..
Thanks and Regards ,
Karthikeyani C
Yes, Absolutely correct
but I didn't know and so much confused like how to code in my existing pages and tables
can you please teach with the syntax so I can get a better understanding.
Thanks & Regards ,
Karthikeyani C
Hi,
I think somewhere you have to tell the system which line you want to select, for example if there are 100 lines, For which line you want to see the Variant, in that case you have to use a Dialog window should open, ask the particular Item and then show the variant for that selected item if found in the sales lines.
Thanks.
Sohail Ahmed
2,655
Mansi Soni
1,574
YUN ZHU
1,453
Super User 2025 Season 1