Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all 10032 articles
Browse latest View live

Assign multiple values ​​to 2d Array

$
0
0
How can I assign multiple values ​​to an two dimension array and not one by one
_matriz : array[2,10] of Text[100];


{
 {""," uno", " dos", " tres", " cuatro", " cinco", " seis", " siete", " ocho", " nueve"},
 {" diez"," once"," doce"," trece"," catorce"," quince"," dieciséis"," diecisiete"," dieciocho"," diecinueve"}
};

Thanks

xRec and Rec have same value in sales line OnAfterModifyEvent (automated tests)

$
0
0
We are using the Microsoft Sales Test Library to create sales lines. We have an extension where we need to log certain changes to sales line fields under certain conditions (change log won't work for what we need)

We have a subscription on sales lines that works fine when we use the web client with keyboard and mouse (BC2020 wave 1)

[EventSubscriber(ObjectType::Table, Database::"Sales Line", 'OnAfterModifyEvent', '', true, true)]
local procedure LogEntrySalesLine(var Rec: Record "Sales Line"; var xRec: Record "Sales Line")
var
CU1: Codeunit "My CodeUnit";
begin
if Rec.IsTemporary then exit;
if (Rec.Quantity = 0) and (xRec.Quantity = 0) then exit; // This is always true when run from tests
if Rec.Type = Rec.Type::Item then
CU1.LogSalesLines(Rec, xRec);
end;


We create a sales line using SalesLibrary.CreateSalesLine and then do SalesLine.Validate(Quantity, 10) and SalesLine.Modify(true). In the event subscription, Rec and xRec have the same values for all fields

We then tried doing it without using the Microsoft Test Libraries.

SalesLine.Init();
SalesLine.Validate("Document Type", SalesHeader."Document Type");
SalesLine.Validate("Document No.", SalesHeader."No.");
RecRef.GetTable(SalesLine);
SalesLine.Validate("Line No.", LibraryUtility.GetNewLineNo(RecRef, SalesLine.FieldNo("Line No.")));
SalesLine.Insert(true);
SalesLine.Validate(Type, SalesLine.Type::Item);
SalesLine.Validate("No.", Item."No.");
SalesLine.Validate("Shipment Date", SalesHeader."Shipment Date");
if Qty <> 0 then
SalesLine.Validate(Quantity, Qty);
SalesLine.Modify(true);

Same problem

The only way we can get the test execute the code in the subscription and pass the assertions by using a TestPage:

var
SalesOrderSubform: TestPage "Sales Order Subform";

Begin
SalesOrderSubform.OpenEdit();
SalesOrderSubform.GoToKey(SalesDocTypeEnum::"Order", SalesHeader."No.", SalesLineNo);
SalesOrderSubform.Quantity.SetValue(10);
SalesOrderSubform.OK.Invoke();

Anyone got any ideas?

Thanks

Mark

Business Central SaaS - Domain Change Question.

$
0
0
Hi all,

Popping this in here as I dont see a BC SaaS section, so apologies if it is wrong.

Question is around changing domains when having BC SaaS. I have been asked by someone considering getting BC SaaS whether they could purchase it now against their existing domain e.g. reggiescompany.com but are looking to change their primary domain in a few months time e.g. davidscompany.com

I know that BC subscription is enabled against the O365 details (which would be regiiescompany.com) but I am unsure as to what would happen with that domain change in a few months. I do not remember seeing anything in the admin center that would allow you to change all your BC SaaS connection strings and so on.

Can anyone point me to anything that explains how you would achieve this? Or is it something you would have to request Microsoft to do for you?

Looking forward to your thoughts.
Many thanks :)

Automatically declining sales price for each trip.

$
0
0
Hello
I have a serouselly question in the nav 2016 how to Automatically declining sales price for each trip., for exemple
Tripr one it lunch for start date 01/01/21 to 01/01/21 with sales price record from contrat for item No 000001 = 100 $
When shipped the first delivery unite price get from contract but when i send a new delivery in som shipping date the price should be automatically declinnihg for 10% for the price of the first line in sales line for the som item .
This my question nut i thing explain my problem
Thank you

multiple expiration dates error after reclass. journal

$
0
0
I've found several hotfixes related to error: "There are multiple expiration dates registered for lot XXXX". However they don't seem to work with this particular situation when I use a Reclassification Journal.

The case is:

- I create a new product with required batch number and expiration date.

- I purchase this product and create a new batch and expiration date

- Later I find out, I made a mistake in the expiration date, so I create a reclassification journal and update the expiration date.

- I sell this product and batch with a sales order, so that I have zero stock left.

- I create a new purchase order of the same product and batch. When i receive this order, I get error :"There are multiple expiration dates registered for lot XXXX"

This is even happening after updating to NAV 2013 R2 CU14

can anyone confirm if this bug is in their system as well?
Is there any other procedure for correcting expiry dates other than reclassification journal?

Thanks.

Import Picture in BC 18.0 (Cloud Environment)

$
0
0
Hi all experts,

I would like to ask about the import picture's coding.
In BC 18.0 (Cloud), it is no longer support FileManagement.UploadFile() function.

vk3psg21wlqr.png

cusdshldv0ki.png


If in the cloud environment, I want to select a picture from my computer, what should I do?

Thanks.

bestian

Permissions Dialog for Interacting with External Functionality

$
0
0
Hi, The first time you Send to Excel, or send an email via outlook from Microsoft Dynamics 2016, you get a one time dialog informing you that you are about to interact with external functionality.

The dialog asks you is if you want to not allow it, to allow it once, or to allow it always for that external functionality.

I have a user who type "never allow" and now I need to find out what setting to change and where to change it to get that dialog to appear again so that he can check Always Allow.

Does anyone know how to cause that dialog to re-appear again?

Thanks,

Michael

structure of a web service published in Business Central

$
0
0
Hi Experts!!

I have published a web service (via a published CU) to import data from an xml in Business Central.

When I see the schema from SOAPUI these two labels appear in the structure that I have highlighted in the attachment

e4ar9l6r0w8i.png

These labels correspond to the published CU function and its parameter

du54pc07i5s9.png

But as you can see, the parameter is "Request" and in the structure it says "request", it is essential for it to work that in the structure put "Request" with the R in uppercase otherwise the web service does not work.

It is something that makes up Business Central and I don't see the option to change it. Has anyone something similar happened to them and know how to solve it?

Thanks!!

(I hope I get lucky with this query because lately I don't see many being resolved ....)

How to add chart Chart in Role Centre Page

$
0
0
Hi ... is there any way to create a custom generic chart and add that to any roll canter page in new BC? Previously in NAV desktop application by add new chart part and then customize that part and selecting the required chart from generic chart list.
I could not find this option in Business Central web version. I can create new chart in generic chart list but cannot show it.

How to Setup Payment Service Connection

$
0
0
hi,
How can i setup Payment Services connection setup, if i am using Payment method code in Sales invoice, the Demo database 2016 IN is asking for the setup.
If
I have checked yes in Run inytyzbbzoka05.png
Test mode and Generated->Downloaded ->Uploaded the Key.

But, when i click on Sign up Now, dynamics link page open that i always in non responding state, if there any way, i can skip the setup.?

PFA

UnitPrice in sales line

$
0
0
Hello ,
My need is how to change automaically price unite if insert second line for the idem item on sales line , the sales line is connect to contract price , and can change if shipped for next qte on idem delivery date for 3 leavel variante.

BC17 Upgrade fails on Database Conversion

$
0
0
Doing an upgrade from V15.5 to V17.0 and it fails doing the database conversion with an SQL timeout after 1 minute.

This is on an Azure VM ( Standard E4s v3 (4 vcpus, 32 GiB memory) ) connected to an Azure SQL db (31GB).

Steps followed from here:

https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/upgrade/upgrade-unmodified-application-v15-to-v17

I have increased the DTUs to 200 and run exec sp_updatestats on the database. Still fails:



PS C:\windows\system32> Invoke-NAVApplicationDatabaseConversion -DatabaseServer "sql04.database.windows.net" -DatabaseName "BCTest" -ApplicationDatabaseCredentials (Get-Credential)



cmdlet Get-Credential at command pipeline position 1

Supply values for the following parameters:

Credential



sql04.database.windows.net

If you convert the database 'BCTest' on the 'sql04.database.windows.net' server, you will no longer be able

to open it with older versions of Dynamics 365 Business Central.



We strongly recommended that you make a database or transaction log backup in SQL Server before the conversion.



Note that the conversion removes any modifications that you have made to system tables.



Do you want to continue?

[Y] Yes [N] No Suspend [?] Help (default is "Y"):

Invoke-NAVApplicationDatabaseConversion : The database create operation failed due to the following error returned by

SQL Server:

Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not

responding.

The statement has been terminated.

At line:1 char:1

+ Invoke-NAVApplicationDatabaseConversion -DatabaseServer "sql04.dat ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ CategoryInfo : NotSpecified: (0:Int32) [Invoke-NAVApplicationDatabaseConversion], NavCommandException

+ FullyQualifiedErrorId : sql04.database.windows.net,Microsoft.Dynamics.Nav.Management.Cmdlets.InvokeNAVApplica

tionDatabaseConversion





Does anyone have an idea, how to make this work?



Cheers

Detlef

Error in Invoke-NAVApplicationDatabaseConversion for Azure SQL

$
0
0
Hi,

I am upgrading BC15 database to BC17. I am getting the following error when I run the Invoke-NAVApplicationDatabaseConversion command:

Invoke-NAVApplicationDatabaseConversion : The database create operation failed due to the following error returned by SQL
Server:
Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
The statement has been terminated.

I can access the Azure SQL db from the same machine (using ssms and powerhsell command when I am working in BC15). Has anyone ever faced this issue? Any suggestions on how to resolve it?


Regards,

Chenjerai Madziwa

Proforma Invoice

$
0
0
Hi, I'm using Navision Business Central. Is there any way to print proforma invoice having GL accounts instead of items?
The report layout includes only items and non GL accounts.

Export File to Azure Storage Location

$
0
0
Hi,

From BC on prem, is it possible to export a file to an azure storage location?

Regards,


Retrieve data from XML file

$
0
0
Hi everyone
I am new to the world of soap webservice response files and XML. I was wondering if anyone could advice on how to retrieve data like accno, carriername etc from the following file

<GetDeliveryOptionsResult><deliveryoptionresults>
<recommended><DeliveryOption><accno>123456</accno><carriername>TEST CARRIER1</carriername><carrzone>ZONE 1</carrzone><condate>1/04/2021</condate><datelong>20210401</datelong><fromzone>ZONE 1</fromzone><optionid>NDozOjEwOi0xOjMy</optionid><primarypricing>65.90</primarypricing><secondarypricing>13.18</secondarypricing><service>NEXT DAY</service></DeliveryOption>
</recommended>
<otheroptions>
<DeliveryOption><accno>789456</accno><carriername>TEST CARRIER2</carriername><carrzone>ZONE 1</carrzone><condate>1/04/2021</condate><datelong>20210401</datelong><fromzone>ZONE 1</fromzone><optionid>NTozOjEzOi0xOjMy</optionid><primarypricing>69.00</primarypricing><secondarypricing>13.80</secondarypricing><service>NEXT DAY</service></DeliveryOption>
<DeliveryOption><accno>565656</accno><carriername>TEST CARRIER3</carriername><carrzone>ZONE 1</carrzone><condate>1/04/2021</condate><datelong>20210401</datelong><fromzone>ZONE 1</fromzone><optionid>NjozOjc6LTE6MzI=</optionid><primarypricing>72.50</primarypricing><secondarypricing>14.50</secondarypricing><service>NEXT DAY</service></DeliveryOption>
</otheroptions>
<distance></distance>
<istopobox>False</istopobox>
<selectedtype>cost</selectedtype>
<updates><ObjectUiFormContents><_nonratingzonesdone>-196865584</_nonratingzonesdone></ObjectUiFormContents>
</updates>
</deliveryoptionresults>
</GetDeliveryOptionsResult>.

I have removed the namespaces and and now having trouble extracting data from the DeliveryOption. To be honest i am struggling with understanding xml node lists, nodes and elements. Is there any documentation (apart from Microsoft Docs) that i can read to get a better understanding of how to use these xml variables.

I appreciate the time any takes to read this and would be very grateful for any advice/assistance.

Please accept my apologies if i have incorrectly posted as this is my first time actually posting

Regards
Gurnek

AL(AS0085) Warning Message

$
0
0
Hi Experts,
I have activated the Script Analysis and found that got warning in app.json file.
68q50acvycrh.png

The warning message is:
The 'application' property must be used for expressing a dependency on the 'Base Application' or the 'System Application' instead of explicit dependencies. See https://docs.microsoft.com/dynamics365/business-central/dev-itpro/developer/devenv-application-app-file for additional information.

8npjxn8hiwkk.png

I have checked in Microsoft website and compare the sample, it is exactly the same as mine.

What should I do with this warning?

Thanks.

List of all published extensions from AL Code

$
0
0
Hi,

I need to get all published extensions from AL Code.
Ideally would be if I could extend "Extension Management" page.

Unfortunately, I cannot extend this page and I cannot use "Published Application" table for Extension Developement.

Is there any other way to get a list of all installed applications? Maybe there is some procedure that I can use to get list of this kind, which can be used for Extension Development?

Thanks in advance.

sales price discounted by an amount between level parametre

$
0
0
Hello friend, please I have a question on the unit price, once I want to create the order and (enter the item that will be programmed in a special price contract) the price of the second line of the same item is discounted by an amount set in a field in the price contract. I show you an example::
Line NO Item Delivery Date Unite Price LEVEL
10000 122222 21/02/2021 1000 1
20000 122222 21/02/2021 900 2
30000 122222 21/02/2021 800 3
40000 122222 21/02/2021 800 3
50000 122222 21/02/2021 800 3

If you can help

Post image into Business Central via API page

$
0
0
Hi
I would like to publish an API page through which an image can be transferred to a table in Business Central.
I am using Business Central 2020 Spring release wave 1
Can anyone please give me an example of how to achieve this.

Thanks
Viewing all 10032 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>