Hi experts ,
Hope everyone is fine...
As many of you already know that FieldRef.value[(Any)] - method that it gets the value of the field and it does some modifications in that also
So my questions is ,
Is that be applicable/possible to apply it from one page to another ?
var
MyFieldRef: FieldRef;
CustomerRecref: RecordRef;
CustomerNo: Code;
Text000: Label 'Customer name has changed to %1.';
begin
CustomerNo := '50000';
CustomerRecref.Open(18);
MyFieldRef := CustomerRecref.Field(1);
if MyFieldRef.Active then begin
MyFieldRef.Value(CustomerNo);
MyFieldRef := CustomerRecref.Field(2);
MyFieldRef.Value('Contoso');
CustomerRecref.Modify;
Message(Text000, MyFieldRef.Value);
end;
end;
In the above example they done to change the name as 'Contoso' for the no 50000. Is that possible to made some changes from one page to another and can be called without specifying customer no whereelse it should be applicable to all the customer .
I hope my question is understandable
please help me out of this ...
Thanks & Regards,
Karthikeyani C
Receiving error ,
The Production BOM Line does not exist. Identification fields and values: Production BOM No.='',Version Code='WHITEWHITE',Line No.='0'
whereas this is my code
action(Testing)
{
Caption = 'Testing';
ApplicationArea = Suite;
ToolTip = 'Just for Testing the fieldref datatype';
trigger OnAction()
var
MyFieldRef: FieldRef;
ProdbomRecref: RecordRef;
ItemNo: Code[20];
SelectedRequisitionlines: Record "Requisition Line";
Text000: Label 'Variant name has changed to %1.';
begin
SelectedRequisitionlines.Reset();
CurrPage.SetSelectionFilter(SelectedRequisitionlines);
if SelectedRequisitionlines.FindSet() then
repeat
"Variant Code" += SelectedRequisitionlines."Variant Code";
until
SelectedRequisitionlines.Next() = 0;
ItemNo := rec."No.";
ProdbomRecref.Open(99000772);
MyFieldRef := ProdbomRecref.Field(2);
if MyFieldRef.Active then begin
MyFieldRef := ProdbomRecref.Field(3);
MyFieldRef.Value(Rec."Variant Code");
ProdbomRecref.Modify;
Message(Text000, MyFieldRef.Value);
end;
end;
}
And I'm Receiving runtime error on ProdbomRecref.Modify;---this line
Hi, Here is a special application that does not specify the field number, I hope it can give you some hints.
Thanks.
ZHU
Hi,
I dont under what you mean by One page to another, but you can use the same method to change the customer's field value without providing the hardcoded values, if you on page Customer card, you can use Onaftergetrecord trigger or instead you can use Batch Processing report of any table dataitem.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,524 Super User 2024 Season 2
Martin Dráb 228,493 Most Valuable Professional
nmaenpaa 101,148