Quantcast
Channel: Martin Dráb's Activities
Viewing all 17532 articles
Browse latest View live

use of as keyword

$
0
0

Dear All,

i read in blogs but not understand the purpose of use "as" keyword.

In standard code in SSRS reports i saw keyword "as".

Can you please let me know when and why we use "As" keyword.

What is does practically?

Please give me more shed on this.

Thanks!

Arpan


FormBuildIntControl limit Value

$
0
0

Hi all, looking for restricting field value for a dynamically added int control on dialog. could not find documentation around FormBuildIntControl.limitTextValue , is this something that can be utilized? I am prepopulating a value in dialog control just want to not allow the field to be edited to higher number and give a infolog if edited number is higher that what is already pre populated in control.

MultiSelectionHelper Class not available in Dynamics 365.

$
0
0

I've been working on 2012 where i used MultiSelectionHelper Class for selecting records and then using only the selected records for any other work like adding those records in another table. However this MultiSelectionHelper Class is not available in Dynamics 365.
Any suggestion?

Creating Sales order using Business Connector C# (C Sharp)

$
0
0

As the title says, I have to create the Sales order using Business connector and C#. I am able to connect AX using business connector but unable to find any help that how can I create a sales order.  I don't know which of the tables will be used and what are the fields which should be taken care of. I am using MS Dynamics AX 2012.

If any body can help?

Thanks in advance,

Compilation error on method in another model

$
0
0

Hi,
I am performing an upgrade from AX2012R3 to D365. I am getting this error in Application Suite Payroll model:
"Table HcmWorkerBankAccount does not contain the method 'xx'. I checked HcmWorkerBankAccount table and it contained method 'xx' (customized), but the table is in a different model (personnel management payroll).

How can I access this method from the application suite payroll model? in general, how can I access elements that are in different models than the model I am using? I have read about creating delegates, but things are not very clear to me.
Thanks in advance.

How to disable removing the query ranges in sys operations

$
0
0

Hi,

Once after adding the customized query in sys operations as a parameter, the UI will display the query with the  ranges whatever been added in the query\datasource\ranges. So, is there any way to disable the user to remove those ranges in the UI interface by clicking on the select button.

Thanks!

How to change the label of the query in sys operation

$
0
0

Hi,

Assume that SalesTable is used as a query datasource. When the same is been added as a parameter in sys operations contract class, the UI interface will display the query label as 'Sales orders'. Is there any possibility so that I can change the label to a customized one.

Thanks!

Can't use BusinessConnector in ASP.Net app

$
0
0

Hello, I have an ASP.Net web app. I use there self written library that references Microsoft.Dynamics.BusinessConnectorNet.dll version x64. When I try to start my app I always get this error page with an exception: 

Server Error in '/' Application.


Не удалось загрузить файл или сборку "Microsoft.Dynamics.BusinessConnectorNet" либо одну из их зависимостей. Была сделана попытка загрузить программу, имеющую неверный формат.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.BadImageFormatException: Не удалось загрузить файл или сборку "Microsoft.Dynamics.BusinessConnectorNet" либо одну из их зависимостей. Была сделана попытка загрузить программу, имеющую неверный формат.

 

It's mostly in russian, but basically it says that file or assemly can't be loaded and there was attempt to load program of wrong format.

It happens only in web app, in console app, for example, BC works just fine.

I've tried switching references differently, I created new project for that, but it's always the same...

How can I fix this? I can show you config files and cone if needed.


Data Replication from Dynamics AX to MONGO DB

$
0
0

we are attempting a solution to replicate data(transactional as well as reference) from microsoft dynamics AX to MongoDB

after reading a lot of blogs and doing brainstorming among my team, i have arrived at following three solutions

1. Creating Document Services over any transfer protocol

 poll through it and obtain the changes that have been done with regards to tables that document service is looking on

Fetch changed keys and subsequently obtain the row records based on changed keys

Pros:

since it is using AX document service, writing custom query or service with data source having multiple tables will make the process easier

Cons: 

each call to document service at an interval of 30 to 60 seconds for 40 services will burden the system and impact performance

2. Enable CreatedDateTime and ModifiedDateTime system columns on tables inside AOT, write custom stored procedures which will run at certain intervals and retrieve rows which have changed or newly created after last retrieval. 

Pros:

simpler approach and removes the dependency on dynamics ax

Cons:

we are unable to handle deleted records taking place in db with this approach

3. Turn on CDC on microsoft SQL Server residing behind Dynamics AX and monitor the change logs to replicate changes in mongo DB via message queues

Cons:

Enabling change tracking will slow down the performance of SQL Server and make it less responsive

is there any method through which we could get real time data push of table changes that a certain business flow has made?

could you suggest on best practices that are employed for replication using microsoft dynamics ax? also are there are any other approaches which we have not considered

Error while executing sysoperation in batch process

$
0
0

Hi,

I have created a sys operation framework functionality. The process works fine when the class is executed in UI through menu item. But when the same is executed as a batch job I am getting the below error in the execution log.

Error executing code: Wrong argument types for comparison.

But still the process is getting completed successfully. I have tried with full CIL generation and clearing the user data as well, but the error persist. Could anyone please provide a suggestion on this.

Thanks!

Any official documentation on Microsoft.Dynamics.Ax.Xpp.MetadataSupport?

$
0
0

With AX7 there has been a switch to use Microsoft.Dynamics.Ax.Xpp.MetadataSupport when getting any sort of metadata, and there are a number of posts/articles about how to use it.

But is there any documentation on what methods are available on this class? (something like MSDN has for almost every other AX class)

Intellisense in Visual Studio doesn't provide any methods at all and you can't F12 to see the code behind it.

The issue I am running into is that the GetDataEntityViewNames() call is not returning Composite or Aggregate Data Entities (it returns normal data entities just fine) and I wanted to see if there is a different call to get these.

Slash '\' appears when using con2str()

$
0
0

Dear experts,

I have a form that shows data of GeneralJournalEntry table data, and a button Print. When the button is clicked, the selected records's JournalNumber in grid will be sent to query LedgerTransPerJournal as range. I created a container that stores the selected records's journalNumber, when I set the container data as range in query, there are some '\' appear after each journalNumber. I don't how why it happened, the method i used is con2str().

This is my code of Print button:

void clicked()
{
    GeneralJournalEntry     locGeneralJournalEntry;
    Query                   q;
    QueryRun                qrun;
    container               conJournalNum;

    locGeneralJournalEntry      = GeneralJournalEntry_ds.getFirst(true);
    q                           = new Query(queryStr(LedgerTransPerJournal));
    q.dataSourceTable(tableNum(GeneralJournalEntry)).clearRanges();

    if (!locGeneralJournalEntry)
    {
        warning('Voucher lines must be selected');
        return;
    }
    else
    {
        while (locGeneralJournalEntry)
        {
            //info(strFmt('%1', locGeneralJournalEntry.SubledgerVoucher ));
            //q.dataSourceTable(tableNum(GeneralJournalEntry)).addRange(fieldnum(GeneralJournalEntry, JournalNumber)).value(SysQuery::value(locGeneralJournalEntry.JournalNumber));
            conJournalNum += [queryValue(locGeneralJournalEntry.JournalNumber)];
            locGeneralJournalEntry = GeneralJournalEntry_ds.getNext();
        }
        q.dataSourceTable(tableNum(GeneralJournalEntry)).addRange(fieldnum(GeneralJournalEntry, JournalNumber)).value(SysQuery::value(con2Str(conJournalNum)));
        qrun    = new QueryRun(q);
        qrun.prompt();
    }
}

This is the screen of QueryForm:

Issue with grouping the queries in sys operation framework

$
0
0

Hi,

I am facing issue with grouping multiple queries in the UI interface using sys operation framework. I have tried to add the query in dialogformgroup to a particular group in UI builder class, but the queries are not moving to the appropriate group. Is there any suggestion to group the query.

Thanks!

Unable to read the file name in SFTP server

$
0
0

Hi All,

I need to read all the files from a folder that is available in SFTP server. I am using  Renci.SshNet.dll file.

I can able to get the number of files (total count) available in that location by using below code but unable to retrieve the name of the each file present in that location.  

SftpClient                      sftpClient;  

SftpFile                         file;    

str                                 host                = "example.com";

str                                 username       = "example";

str                                 password        = "******";       

 str remoteDirectory     = @"path\files";

sftpClient                      = new SftpClient(host, 22, username, password);

sftpClient.Connect();

 

sftpClient.ChangeDirectory('..');

str name1 = sftpClient.WorkingDirectory;

sftpClient.ChangeDirectory(remoteDirectory);

str name = sftpClient.WorkingDirectory;

 

var files = sftpClient.ListDirectory(name,null);

Please suggest on how to read the file name. 

 Thanks in advance.

Form Personalisation Ax7

$
0
0

Hi Friends,

              I need to know how to see table name and table field name in form personalization in Ax7 D365 ,

because i can see only form's field name in it.

thanks & regards,

padmapriya


Consume SOAP/Rest Odata endpoint from logic apps

$
0
0

I am trying to call a SOAP or REST endpoint for my demo environment. According to some msdn demonstrative documents, this should be possible. 

I am using the default HTTP connector with the following parameters: 

Method: POST

Uri: https://[aos].cloudax.dynamics.com/api/services/UserSessionService/AifUserSessionService/GetUserSessionInfo

Authentication: AD OAuth

Authority: https://login.windows.net/

Tenant: [tenant guid]

Audience: https://management.core.windows.net/

Client Id: [client id guid]

Secret: [secret guid]

The error I receive is as shown below: 

{
"statusCode": 401,
"headers": {
"ms-dyn-fqhn": "demo-0-a16326fa-42f8-4ee4-b19b-a6fc657b0a1c",
"ms-dyn-namespace": "DynAXProd",
"ms-dyn-tenant": "default-lcs-a16326fa-42f8-4ee4-b19b-a6fc657b0a1c",
"ms-dyn-role": "demo",
"ms-dyn-aid": "9f1561ee-0ab3-0007-96cb-159fb30ad301",
"X-Content-Type-Options": "nosniff",
"X-Frame-Options": "SAMEORIGIN",
"Date": "Tue, 08 Aug 2017 18:43:53 GMT",
"P3P": "CP=\"No P3P policy defined. Read the Microsoft privacy statement at go.microsoft.com/fwlink\"",
"Server": "Microsoft-IIS/8.5",
"WWW-Authenticate": "authorization_uri=\"login.windows.net/.../authorize\"",
"X-Powered-By": "ASP.NET",
"Content-Length": "0"
}
}

App registrations and api permissions have been setup correctly. Is there anything I might be missing?

BP Label Error AX 7

$
0
0

Can someone guide me to why does this error popup

I have a model SLD_HRApplicationFoundation, which has a SLD_HRP label file. When I check for best practices, I get the following error

BP Rule: [BPErrorUnknownLabel]:Path: [dynamics://EdInt/SLD_HRRetirementAge]:Unknown label'@SLD_HRP:Param0014'. Legacy labels (such as label id @SYS12345) are case insensitive and
modern labels (such as 'MyLabelId' in @MyLabelFile:MyLabelId) are case sensitive. Use upper
casing when referring to legacy labels and exact casing for modern labels.

Where as my SLD_HR.en-US.label.txt file has the following entry

Label ID: Param0014
Label: Default retirement age
Description: Help text for retirement age years

and the properties set for SLD_HRRetirementAge EDT as

Label: @SLD_HRP:Param0013
Help text: @SLD_HRP:Param0014

I am currently running AX7 update 8 and SLD_HRApplicationFoundation model has been build to latest changes and database is synchronized as well.

Use Computed Column

$
0
0

Hi All

i'm new in using Computed Column, i try to use Computed Column to Convert my display method to Computed Column but nothing show in the run of menuitem the Purpose is to get the StaticticsGroup of the CustAccount to make this Computed Column range in Query

how can i achieve this ??

public static server str SalesmanGroup()
{
    PendingOrdersView       PendingOrderview;
    return SysComputedColumn::returnLiteral(custtable::find(PendingOrderview.CustAccount).StatisticsGroup);
}

Regards.

Query in computed column

$
0
0

Hi All

I Read about Computed Column and understood that it's used to do a calculation and have the calculation result as a field in the view.

However, i need to perform a query and return a result as a field in the view. the query that want perform can not be placed as a join in my view.

Can this be achieved using Computed Column ??

Regards.

Lookup in Ax7

$
0
0

Hi Friends,

How to give lookup for customised field using extension form in D365 Ax7.

Viewing all 17532 articles
Browse latest View live


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