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

Extend standard object in C/AL doesn't work in AL

$
0
0
Hi all,

In NAV we could extend standard object and add publisher to standard function to cover some situation, that our functionality need. Now, when we convert that functionality to AL we are not able to do that.

Does any of you had some similar situation, and what are our option for situation like this?

Regards

C/AL, NAV2016, HttpWebRequest, processing fault response

$
0
0
How you do get the fault response InStream (or for that sake, file) from the HttpWebRequest, without modifying C1297?

NAV is posting to a webservice that returns status 422, which means that there are errors in the data supplied. I'm trying to find a way to get this information for further processing. Right now I just get the status "422 Unprocessable Entity", but not the response body.

It seems that SetTraceLogEnabled actually does this, but I'm unable to get the file name, and I'd prefer a stream anyhow.

Consuming NAV web service through NAV - error 401

$
0
0
I've created a simple NAV 2009 web service (SPNEGO authentication) and can access it with Webservice Studio when logged in at the NAV server. I've also some C/AL code to access the same web service, but when run in the classic client at the server, I get the "Http Error 401: Unauthorized" error.
The user running Webservice Studio and the classic client are the same, it is in fact the same session on the server. I can even access the web service from a different PC with a different user with Webservice Studio.

Relevant code (stolen from the download section):

IF ISCLEAR(XmlDoc) THEN
CREATE(XmlDoc);
IF ISCLEAR(XmlHttp) THEN
CREATE(XmlHttp);
XmlHttp.open('POST','http://996rzdb3:7047/MicrosoftDynamicsNAVServer/WS/'+OtherCompany+'/Codeunit/RunObject',0);
XmlHttp.setRequestHeader('Content-Type', 'text/xml; charset=utf-8');
XmlHttp.setRequestHeader('SOAPAction','RunObject');

XmlHttp.setTimeouts(10000,10000,10000,100000);  

XmlHttp.send('<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' +
'<soap:Body><RunObject xmlns="urn:microsoft-dynamics-schemas/codeunit/RunObject">' +
'<objectType>'+ObjectType+'</objectType><objectID>'+FORMAT(ObjectID)+'</objectID>'+
'</RunObject></soap:Body></soap:Envelope>');

IF XmlHttp.status <> 200 THEN
  MESSAGE('Http Error ' + ' ' + FORMAT(XmlHttp.status) + ': ' + XmlHttp.statusText);

As far as I understand, when running the code in classic client, it will log on to the web service as the user who is logged into the client, right? And this also happens when using WebService Studio. The user should be the same in both cases, but it works only in the latter.

Has someone an idea what might be wrong?

Sending the content of an HTML in a mail

$
0
0
Hi everyone,

I need to send the content of an URL into the body of an email. In the marketing setup window, I am using CU397

I've added an URL. I need to send the content located into that URL. Is this possible?

For example:
olMailItem.HTMLBody := '<a href="http://xxxxx.com/boletin/boletin.html"/a>';       //If we want to send in HTML format
olMailItem.BodyFormat := 2;
olMailItem.Display(ShowNewMailDialogOnSend);    //If we want to display outlook  dialog window
olMailItem.Send;

Of course this is not working, but, could be an approach? Or it's impossible to do this?

Thank you very much

Excel Buffer Expand

$
0
0
Hello Guys

I will slowly despair... I have a problem. I need to expand the "Excel Buffer" with a function with 2 parameters. First parameter "From Cell" second Parameter "To Cell". Then i need somehow to Delete all Rows between this 2 Parameters. Somehow i have tried with multiple DotNet's but nothing works!! It should be connected with the Worksheet .net used in the Excel Buffer.
It can't be that hard :neutral:

can you guys help me?

best regards
CroRaptor

Set init value from Install Codeunit in AL

$
0
0
Does anyone know how to set init values to custom fields on standard table (existing records) throw install codeunit?

List of predefined user groups, permission sets etc in NAV2018

$
0
0
In NAV 2018 there are som predefined:

- User Groups
- Permission sets
- Profiles
- Rolecenters

Are there some list and descriptions of the predefined subjects from above?

NAV 2.0 Download

$
0
0
Hello NAV experts! Any ideas where can I download NAV 2.0 financials from? Thanks

ODataV4 WS giving me: An item with the same key has already been added

$
0
0
When I open any ODataV4 WS link in the browser I'm getting this error:

016x406rn8aj.jpg

Every time I refresh the browser (Chrome, Firefox, Edge...) with each browser it gives the same error.

Inspecting Windows Server logs, every time I refresh in the browser, it appears an error log saying: "An item with the same key has already been added". I only get this error with ODataV4. SOAP and OData work fine and give correct results in the browser.

Curiously, ODataV4 WS worked fine last week, besides, I had a backup NAV instance from 28th January and ODataV4 works. This error only happens in the production instance with especifically ODataV4.

I have already tried removing and re-adding the WS but it keeps giving the error. I don't understand why it's giving that error because I'm not trying to insert to the DB, I'm trying to read data. Right now I don't have the full stack trace but tomorrow I can post it.

Thank you guys

asp.net core 2.1 add web service for NAV

How to add, Advance filters in Business Central (NAV 2019)

$
0
0
Hi Experts,

I need to add more field filters to the 'Suggest Vendor Payments" in Payment Journal.

sgcjtbtkncdc.jpg

Exactly like advanced filters in NAV 2018 etc.

Do you guys know a way to to this?

TIA. :)

UpdatePropagation confusion

$
0
0
I have created a card-type main page with a list-type subpage (page part).
On the sourcetable of main page I have a flowfield. The CalcFormula table for this flowfield is the same as the sourcetable in the subpage. This field is visible on the main page.
I have set the UpdatePropagation to "Both" on the subpage.
I have added the statement CurrPage.UPDATE() in the OnValidate trigger of the relevant field in the subpage.
If I change the value of the relevant field in the subpage the flowfield doesn't change.
If I click the Refresh button, the flowfield is updated as I want.

Any idea what I might be doing wrong?

Report on Visual Basic-empty lines on table

$
0
0
I Create a report on visual basic and I have a table on the report with values from a table.
I have several empty lines before the the data .
How can I filter to skip the empty lines on the table that is used on the report?

Payment Services options in NAV 2018

$
0
0
I note that there is a payment services option in NAV 22018 for PayPal. Has anyone created a payment service option which would integrate NAV to payment processor (such as Converge, We have a need for a solution where we are using ChargeLogic for bringing orders into NAV from a webstore, but cannot use ChargeLogic for payments.

What other options exist to bring in payments that are transacted on the webstore of this customer with payments remaining separate, and not stored?

AL - Closing Page does not save customization changes in page.

$
0
0
Hi All,

when you open - for example Customer Card- and change Page Size or collapse/expand some groups, the next time you open the same page, these settings are saved and you continue where you left off...

When i open a card that i have created using AL, these settings are not saved, the groups are always collapsed and i have to do the same changes every time.
Does anyone else have this problem or even better a solution ?

Focus on page (AL)

$
0
0
Hi. I want to set focus on specific fields on page.
I use AL and Business Central
I tried to search but I did not find.

Do you have any suguestions?

Delete Purchase Line Quotes using webservice and xml

$
0
0
I have a codeunit published as webservice which has two functions. One that imports purchase quotes using an xml and another that edits those same purchase quotes using another xml.
This is the structure of my lines:
Node Name NodeType Source Type Data Source
Lines Element Table <Purchase Line> (Purchase Line)
Type Element Text <Type>
CodProd Element Text <CodProd>
Desc Element Text <Desc>
Variant Element Text <Variant>
Qtd Element Text <Qtd>
PrecVend Element Text <PrecVend>
LineNo Element Text <LineNo>
Vasilham Element Text <Vasilhame>

This is my xml code Import:
<Purchase Line> - Import::OnAfterInitRecord()
"<Purchase Line>"."Document Type":="Purchase Header"."Document Type";
"<Purchase Line>"."Document No.":="Purchase Header"."No.";
//line+=10000;
"<Purchase Line>"."Line No.":=line;
"<Purchase Line>".Type:=Type;

CASE Type OF 
  2:
  BEGIN
   "<Purchase Line>".Type:="<Purchase Line>".Type::Item;
  END;
  5:
  BEGIN
   "<Purchase Line>".Type:="<Purchase Line>".Type::"Charge (Item)";
  END;
  0:
  BEGIN
    "<Purchase Line>".Type:="<Purchase Line>".Type::" ";
  END;

END;

"<Purchase Line>"."No.":=CodProd;
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>".Quantity:=Quantidade
ELSE
"<Purchase Line>".Quantity:=0;
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>"."Direct Unit Cost":=Preco;
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>".Description:=Desc
ELSE "<Purchase Line>".Description:='';
"<Purchase Line>"."Variant Code":=Variante;

<Purchase Line> - Import::OnBeforeInsertRecord()
"<Purchase Line>"."Document Type":="Purchase Header"."Document Type";
"<Purchase Line>"."Document No.":="Purchase Header"."No.";
line+=10000;
"<Purchase Line>"."Line No.":=line;
"<Purchase Line>".Type:=Type;
CASE Type OF 
  2:
  BEGIN
   "<Purchase Line>".Type:="<Purchase Line>".Type::Item;
  END;
  5:
  BEGIN
   "<Purchase Line>".Type:="<Purchase Line>".Type::"Charge (Item)";
  END;
  0:
  BEGIN
    "<Purchase Line>".Type:="<Purchase Line>".Type::" ";
  END;
END;

"<Purchase Line>"."No.":=CodProd;
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>".VALIDATE("No.");
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>".Quantity:=Quantidade
ELSE
"<Purchase Line>".Quantity:=0;
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>"."Direct Unit Cost":=Preco
ELSE
"<Purchase Line>"."Direct Unit Cost":=0;
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>"."Unit Cost":=Preco
ELSE
"<Purchase Line>"."Unit Cost":=0;
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>"."Unit Cost (LCY)":=Preco
ELSE
"<Purchase Line>"."Unit Cost (LCY)":=0;

IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>".Description:=Desc
ELSE "<Purchase Line>".Description:='';
"<Purchase Line>"."Variant Code":=Variante;


//"<Purchase Line>".VALIDATE(Amount);
IF "<Purchase Line>".Type<>"<Purchase Line>".Type::" "THEN
"<Purchase Line>".UpdateAmounts;

<Purchase Line> - Import::OnAfterInsertRecord()
IF Vas = TRUE THEN BEGIN
  line+=10000;
"<Purchase Line>".vsCreateContainerLine;
 END;

<Purchase Line> - Import::OnBeforeModifyRecord()

<Purchase Line> - Import::OnAfterModifyRecord()

<Purchase Line> - Export::OnPreXMLItem()

<Purchase Line> - Export::OnAfterGetRecord()
//line+=10000;
IF Vas = TRUE THEN BEGIN
  line+=10000;
"<Purchase Line>".vsCreateContainerLine;
 END;

It works fine for insertion. My goal here is to use the other xml to edit the quotes already inserted. But I don't know how?
I was trying to make a "fake import", first delete the lines and then insert only the lines that were remaining?

Can someone give me some tips?

Sending emails by Nav Using Codeunit 400

$
0
0
Hello Guys,

Is there any way to send mail through the NAV using Codeunit 400 without saving the emails sent in Outlook Sent Items?

Best Regards

Inventory Storewise in Nav 2016

$
0
0
Hi,
By using the inventory field of Item table, one can get the inventory of all the stores.

I have to somehow show the user, inventory of his/her Store ONLY.

Actually my idea is to create a location field in user setup, and by assigning a Location to the user and then the inventory must be filtered as per that location field of User table.

Thanks in Advance

Limited number of users in partner license

$
0
0
Hi Community,
We are facing with license problem. Customer has above 20 users in his license. If I upload our licencse (I mean partner license) error: "Your program license does not permit more users to work simultaneously..." shows up. It's because of that the partner license has only 20 users. Is it possible to increase number of users in partner license? Anyway, why this kind of restriction exists in partner license at all?
Regards
Malintus
Viewing all 10032 articles
Browse latest View live


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