Best Of

Re: OnPrem-to-SaaS Cloud Migration Tool

Hi,
I think you've answered yourself. Most likely that is the issue.
I would recommend to publish the extension again in both environments with -force and try again.

Re: Edit custom field on Sales Invoice Header easy way?

samantha73 wrote: »
So my question is after creating a new field via extension do you still have to create the update logic similar to codeunit "Sales Inv. Header - Edit" or can you make the field editable only. Making the custome fields editable did not work

If you are trying to edit posted invoice then yes, you need to create a similar codeunit as codeunits can't be extended, or looking into the standard code there is an event publisher you can use:
OnRunOnBeforeAssignValues(SalesInvoiceHeader, Rec);

I wouldn't recommend to allow editing posted documents at all apart from what BC standard offers.

In your original question you were talking about a sales order, this is an unposted document.

You may need to clarify your question.

Re: How to increase Client Session Timeout

You still have the IIS session timeout setting that also indicates how long the session is kept alive. Via Session State in the ASP.NET group of the properties of the website.

Re: Time calculation

If you want to do something like 5:00:00 + 3:00:00 = 8:00:00 you can use the DateTime type for that. You can transform the time to DateTime with 1.1.0000 date part and add them. Than extract the time part from the DateTime. Do not forget that if you do "23:00:00" + "2:00:00" it will be next day with time "1:00:00".

It means:
 NewTime := DT2TIME(CREATEDATETIME(0D,MyTime1)+(CREATEDATETIME(0D,MyTime2)-CREATEDATETIME(0D,0T)))
kinekine

Re: FTP Transfer using WinSCP

TallyHo wrote: »
Is there anyone here that has implemented WinSCP for BC24 or up (.net core 6, OnPrem)?

Yes, it's possible. I've just got it working on BC25. In BC20 I was using .Net4.0 version library and now I've switched it to use the netstandard2.0 in the folder contained in the download.fgxhjc4r9fya.png
Take the dll from the netstandard2.0 folder and the app file (WinSCP.exe) and place those in your add-ins folder under C:\Program Files\Microsoft Dynamics 365 Business Central\250\Service\Add-ins and restart service.

Re: Bar coding solution for NAV 4.0

kine wrote:
You just needs to thing about "what I will do with the BarCode". Where it will be entered through scanner, is this area in NAV or have access to needed information? Printing BarCode is one thing, working with it is another one...

hey kine.U r rite on ur part but until n unless the code doesn't work ,there's no use of printing it.
So kindly help me to move further.
one more thing i don't think that it was a tedious job to print the bar code.The real skill is to get it read.
Thanx

Re: General Journal - Test Report shows as Blank

Hi

Thanks for your reply.

I found the issue, due to a line had empty Journal Line Number, after filling the Line number printed properly.

Re: Global Variables in a Page List

The issue can be solved very simple way - just add CurrPage.UPDATE to OnValidate trigger of the controls that contain global variables.

Changes to record cannot be saved because some information on the page is not up-to-date

Hello,

In the "Item Variants" page we have a customized field "Packsation" - "Packtisch". By validating or changing this field, the new value should also be updated on the "Packstation" field on the "Sales Line" table.
p927c15rooql.png
The error occurs in the Item Variants page and not in the Sales Order Subform page


Therefore, I have this code in the OnValidate trigger of the table:

trigger OnValidate()
var
SalesOrderLineMgmt: Codeunit "Sales Order Line Management";
begin
if Rec.Packstation <> xRec.Packstation then
SalesOrderLineMgmt.UpdatePackstation(Rec."Item No.", Rec.Code, Packstation);
end;



The UpdatePackstation will do the changes on the Sales Lines:
procedure UpdatePackstation(ItemNo: Code[20]; ItemVariantCode: Code[20]; NewPackstation: Enum "ACH Packstation")
var
SalesLine: Record "Sales Line";
begin
SalesLine.SetCurrentKey("Document Type", Type, "No.", "Variant Code", "Is Weighed", "Location Code", "Shipment Date");
SalesLine.SetRange("Document Type", SalesLine."Document Type"::Order);
SalesLine.SetRange(Type, SalesLine.Type::Item);
SalesLine.SetRange("No.", ItemNo);
SalesLine.SetRange("Variant Code", ItemVariantCode);
SalesLine.SetRange("Is Weighed", false);
SalesLine.SetRange("Location Code", BKLbl);
SalesLine.SetFilter("Shipment Date", '%1..', Today());

SalesLine.ModifyAll(Packstation, NewPackstation, false);
end;



The problem is this error only occurs directly in customers system environment and due to this, it's not possible to recreate this error locally or in development environment. Maybe the reason is the fact that multiple users a working parallely.

How can I solve this problem? By using a Tablelock maybe?

Thank you in advance! :smile:

Re: NAV2015 Email Quote, Sales order. LDAP server is unavailable

Hi,

I managed to skip the line in Code397 and it worked.


CollectCurrentUserEmailAddresses(VAR TempNameValueBuffer : TEMPORARY Record "Name/Value Buffer")
AddAddressToCollection('UserSetup',GetEmailFromUserSetupTable,TempNameValueBuffer);
AddAddressToCollection('AuthEmail',GetAuthenticationEmailFromUserTable,TempNameValueBuffer);
//AddAddressToCollection('AD',GetActiveDirectoryMailFromUser,TempNameValueBuffer);

KCLaiKCLai