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

Sending mail via Code: EncryptionException

$
0
0

D365 PU 15

While trying to send mail in Job Class using SysEmailBatch or MessageBuilder

I have an error of decryption the password of Smtp user

Microsoft.Dynamics.Ax.Xpp.Security.EncryptionException was unhandled by user code
Message: An exception of type 'Microsoft.Dynamics.Ax.Xpp.Security.EncryptionException' occurred in Microsoft.Dynamics.AX.Framework.EncryptionEngine.dll but was not handled in user code
Additional information: Encryption error occured.

It happens here

SysEmailParameters::password() --> return appl.DecryptForPurpose(_common.(_fieldId), _common.encryptionPurpose(_fieldId));

How can I can mail?


PriceListService Prices not matching up with prices in Dynamics Ax 2012 R2

$
0
0

I am calling the AIF PriceListService to get customer prices. I am sending in the customer account number as well as a FromDate and ToDate. The problem that I have is the prices that are coming  back don't seem anywhere near the prices I get if I create a sales order for the customer.

Any pointers on why this might be happening and where to look would be much appreciated.

Here is the response from the service

Here is the sales order line in AX

What's even more confusing for me is there are no records in the PriceDiscTable for this item under the dataareaId

How to connect projects to Classes, etc in Modelelement? (Dynamics AX 2012 R2)

$
0
0

When Querying ModelElement in the model database , How do you connect classes to a project?  For the classes , methods, etc you can use the roothandle field as a where clause Criteria, but when i am looking at a project, the roothandle cannot be used to connect to the classes and other elements in a project.  I am dealing with trying to decipher what all of the various code, etc in a company's system is, and how it is all connected.  I have tried looking in the ModelElement &  Modelelementdata tables as well as the utilelements view.  Does anybody have a good solution here?  

Also, whether form the front end or the database, is there any way to generate something like a class diagram?  I am new to dealing with Dynamics, and only one division of my company is using  Dynamics AX 2012 R2. we are trying to figure out the full extent to which their environment has been customized. 

Display method calculation for Forms

$
0
0

Hi ,

I have created three new fields in formPSAcontractlineitem

Fields1  (input)

Fields2 (computation ,based on field1 input)

Fields3

i want to compute the the values based on existing values

like Fields2 = oldvalue - field1

fields3 = existingfield *Field2/100

i have created following display method on form datasource :

but now displaying correct information and errors

"public display Amount lookupPSAContractLineItems()


{   

PSAContractLineItems psaContractLineItems2 ;
    real total;
    //total= 0;
    
   // DirPartyName dirpartyname ;
    
     
    select SL_EngineeringEstimates from psaContractLineItems2
    
     where psaContractLineItems2.recid==5637146078 ;
       
    
    total = total + (psaContractLineItems.SL_EngineeringEstimates /psaContractLineItems.EA_OtherExpense) ;
    
    return total ;
    

}"

thanks

Services: Authenticating a native client app

$
0
0

I have registered an app in Azure

Below is the code and specified the configurations

Below is the code for main operation been performed

But when I am testing the connection it is giving the below error

Please suggest

Could I use Class Extension methods in Application Plateforme Model in D365 FO

$
0
0

Hi,

My Main Object is to add method to the class Global using D365 FO . As we know this Class is in the Application Plateform.

In my project, I'm working with new Model wich has as one of the referenced packages the application Plateform.

The problem that Visual Studio don't let me customize the Class Global to add my new method.

Could you please tell me if I have done mistakes or this could be done juste directely in the Application Plateform Model? Thanks.

Debug code in Application Suite

$
0
0

Is there anyway I can debug the class in the Application suite without modifying the code? 

Thank you. 

Populate Data on a form Grid only after using Advanced filter/sort. (Grid should display no Data prior to using Advanced filter/sort)

$
0
0

Hi -

   I have designed a custom form with Advanced filter/sort button (Label - Main Account Filter). Please take a look at the screen shot.

The Advanced filter/sort functionality works just fine. The Problem I'm having is that when I run the form the data is first populated on the grid and only then I can use the Advanced filter/sort button to filter the data. My question is that is there any way I can use the Advanced filter/sort before the data is populated on the form.

For example - I want the form to run and show no data on the grid. Then I can go and use Advanced filter/sort to filter and refresh the form to display the filtered data.

The reason I want to Implement this  is because there will be a very large population of records that will be a part of this form.  For speed/performance purposes, it would be good to be able to filter the population down before the query runs – rather than generating the full population of results and then filtering.

Is there a way I can implement this ?

Thank You for you help


Work space - Tile count is not working

$
0
0

Hey All,

I am facing issue in showing count on tile in workspaces.
I have followed below mentioned link for creating simple tile.
www.sonata-software.com/.../creating-simple-tile-element-dynamics-ax
In my case query is working fine and showing required data whereas count is not appearing on tile.
I also tried to create same tile by following personalizing approach for that form and it showing required count on tile.

Anyone facing this issue?

execute bat file with 2 parameters from X++

$
0
0

I would like to execute .bat file from X++.(.bat file include execute stored procedures that output file)

Can any suggest some know how.

I would like to input two parameters from AX screen (from month and to month ) and pass those two parameters to .bat and execute stored procedures based on these two parameters . 

How to Concatinate multiple Form Control values into one new Control in the same Form.

$
0
0

Hi -

  I have a form with multiple fields and display methods. I need to add a new control on the form which will display the concatenated value from other controls in the same form. Is this possible to do ?

for example

I have a Control Account, Name and Dob. The new control is empty for now.  Is it possible that I can use the values from Account Name and Dob control and concatenate them and display it in my new Control something like this ?

Thank You

Batch multi-threading

$
0
0

I have a batch job which is running perfectly fine without multi threading.

I am trying to make this batch job support multi threading.

In order to do  so the batch job form should ask user to enter no. of threads to be executed for the batch job.

Have gone through http://www.artofcreation.be/2010/10/03/batch-multithreading/comment-page-1/#comment-51120

But still cant figure out how to make this work in D365.

My understanding is  that the contract class should be providing me with number of threads parameter, controller class should have construct method for my main class (which has the business logic).

Please let me know if my understanding is wrong/correct & please share some content showing how to convert existing batch job to a multi thread batch job.

Databases for development

$
0
0

In context of the end of this post of mine: https://community.dynamics.com/365/financeandoperations/f/765/t/295208

I have three VM's for three company products. A senior of mine works on the baseline products, so he has all the data the consultants provide for testing and demo's. I don't - I either have to ask a consultant to help me with setting up some data (if I'm working in a new area) or I have to do it myself.

From some of the responses in the mentioned post I get the idea there is a way to get the baseline data onto my VM or link them somehow. If I am correct, how is this done? Or where can I find out more?

Thanks for reading

Branching in VSTS

$
0
0

So, we are trying to set up VSTS for our development team, and watching the recent tech conference videos, it suggests using branches.... A Development branch, a Main Branch (essentially your QA) and a Release Branch.  After many internal discussions we are still at a loss as to what is the best way to use Branching within our team. So my question to the community is... "How are you using Branching with VSTS within your D365 for Ops projects and why have you chosen to implement in this way?"

SSRS Report: The Loading Time is Too Long and Then It Shows an Error Lost Connection

$
0
0

Hello awesome community! :)

I'm still a newbie in AX so please bear with me explaining haha.

I've created a report that shows the expired items.

My query is :

InventTrans > InventDim > InventBatch

So, I want to check all the transaction of the items to look for expired items that is still remaining.

The data is big so it takes a long time in Loading screen and then it gives me an error saying that "connection is lost"

But If I used a filter like for example: item number, it will work fine. So my problem is when I want to get all the data.

I used a query Object in AOT with a DP Class.

Here is my prcoessReport method code:

 qr = new QueryRun(query);

    while(qr.next()){
        invTrans    = qr.get(tableNum(InventTrans));
        InvDim      = qr.get(tableNum(InventDim));
        InvBatch    = qr.get(tableNum(InventBatch));

        if(InvBatch.expDate < today() || InvBatch.expDate - InventTable::find(invTrans.ItemId).NearExpiry < today()){
                reportLine.ItemId           = invTrans.ItemId;
                reportLine.ItemName         = invTrans.itemName();
                reportLine.Qty              = invTrans.Qty;
                reportLine.inventBatchId    = InvDim.inventBatchId;
                reportLine.InventLocationId = InvDim.InventLocationId;
                reportLine.expDate          = InvBatch.expDate;
                reportLine.insert();
        }
}

Please, if you can advice it would be appreciated :)

Maybe using a select and a while select is faster and better than using a "query object"?

NOTE*: I check if the items still remaining or not in the design. If the Sum of quantity in the batch id is "0 Zero" that means no items are remaining so I will hide the records from the table. Maybe there is a better work around? since it will fetch un-needed data.

Thanks in advance!


Performance issues with AX development

$
0
0

Maybe this does not belong on this forum, but this is the only forum I am a member of and I only develop in AX. Please bare with me.

So I recently sold my soul to acquire a decent PC. I assigned my VM 40960MB RAM and 5 cores, with more than enough left on the host. Should say that is enough. The improvements are noticeable but not as great as I hoped:

1. Building a project of 10 to 15 elements still takes 3 to 6 minutes

2. Sometimes I get ahead of the text editor

3. Some AOT element designers are still laggy (for example Data Entites, Views, working with a table inheritance structure - especially on forms)

Further I noticed that the resources aren't actually used.... I took a screenshot of the task manager while building:

Like most things, I don't know much about hardware and performance. I provided the details I thought relevant.

Is there something I can do to speed up the process of building and designing? I think I've got the hardware part. Is there some settings I can play with to try and improve performance?

Thanks for reading

Populate Data on a form Grid only after using Advanced filter/sort. (Grid should display no Data prior to using Advanced filter/sort)

$
0
0

Hi -

   I have designed a custom form with Advanced filter/sort button (Label - Main Account Filter). Please take a look at the screen shot.

The Advanced filter/sort functionality works just fine. The Problem I'm having is that when I run the form the data is first populated on the grid and only then I can use the Advanced filter/sort button to filter the data. My question is that is there any way I can use the Advanced filter/sort before the data is populated on the form.

For example - I want the form to run and show no data on the grid. Then I can go and use Advanced filter/sort to filter and refresh the form to display the filtered data.

The reason I want to Implement this  is because there will be a very large population of records that will be a part of this form.  For speed/performance purposes, it would be good to be able to filter the population down before the query runs – rather than generating the full population of results and then filtering.

Is there a way I can implement this ?

Thank You for you help

Difference between Model store deployment and XPO deployment

$
0
0

Hi All,

Please explain the difference between Model store deployment and XPO deployment technically,

Regards,

Akbar

Cache clear

$
0
0

Hi Experts,

I am using this code for looping (inheritance), once the condition loops and fetch the value it should be clear the cache However its not clearing it in table 2, please check and give me an idea in how to clear the table2 cache, thanks in advance.

table  table1,table2;

select * from table1

where table1.field1== "001";
do
{
    if (table1)
   {
       info(strFmt("%1",table1.field1));
   }

   select * from table2
   where table2.field2== table1.field1;

   table1.clear();
   if (table2)
  {
     table1= table2;
  }

  } while (table1);
}

How can I combine many tables?

$
0
0

Hi

I am write a "while select" code for find many items from many different tables. How can I achieve it in fast way.

I have a task, when I enter ItemId, I can get value about "Description, UnitId, PhysicalInvent, InventLocationId, InventSerialId, InventBatchId, StorageName and Tracking Name". I found all of them from different tables and one main table "InventTable". And those tables are combine by different relation. 

I want to write a paragraph code with one while loop to join all tables. Is that possible? Can I have some link to learn it?

One more question : If two tables(A, B) are related by one table(C). Can I write a relation between A and B without C)

(Orange: the value I want to get;

Blue: relation(ex: EcoResTrackingDimensionGroup.RecId == EcoResTrackingDimensionGroupItem.TrackingDimensionGroup)

White: Tables name)

Viewing all 17532 articles
Browse latest View live


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