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

BP Error: Fields with 'LedgerDimension' in name should have relationship to the 'LedgerDimensionBase' table

$
0
0

Hello all,

I had created a data entity in D365 FO and corresponding Staging table was also generated. But when I compiled it, it gave me a Best Practice error:-

C:\AOSService\PackagesLocalDirectory\...\SomeDemoStaging.xml(0,0): BPErrorDimensionNameDAVCRelation: BP Rule: [BPErrorDimensionNameDAVCRelation]:Path [dynamics://Table/SomeDemoStaging/TableFieldInt64/LedgerDimension]:
BPErrorDimensionNameDAVCRelation: Fields with 'LedgerDimension' in name should have relationship
to the 'LedgerDimensionBase' table.

I found out that I do have a Int64 field named 'LedgerDimension' whose EDT is 'DimensionDynamicAccount'.

Now how can I resolve this BP error?

I tried searching in the community and I found this thread with an opposite problem, but has no solution.

Please suggest.


Partial deployment on test environment

$
0
0

How can I perform a partial deployment  on a test environment for last developed changes without re-deploying deployment package ?

How to execute code before command button (OK) press?

$
0
0

Hi,

how can I execute my own code using extensions before a form command button press, if the command button does not have the clicked-method overridden/available in standard code?

I need to insert a couple of records into my own table before executing the OK in form.SalesQuotationEditLines.

If I subsrcibe to the OK_OnClicked event of the button, the actual OK action is done and my records are inserted after the button's super() call if I'm not mistaken. And there's not a pre event for the button.

Refresh SANDBOX1 database from SANDBOX2

$
0
0

Hi Guys 

I have a question about refreshing  database in Dynamics AX 365 in No production environements .

Actually we have one SANDBOX for DEV and I we create another SANDBOX2 (DEV) used by another developer , the two sandox's are  Tiers1 (Add-on) linked in LCS . Now we want to refresh this sandbox  (Code and Database) .

the question is How we can do this ? :

I suppose the Code we can get it using VSTS , but the database I don't know how can we do this ? 

I tried to restore backup from SANDOX 1 to SANDBOX2 but don't work because copy/pask from ENvironnement 1 to Environnement 2 take 2 days and i had error at the end . There are another solution please to refresh different no production environnemnt ? 

Question : 

1 : How can we restore database from SanNdox1 to Sandbox2 ?

2 : When I get latest version  with VSTS ,I get just the code or also all Customization in database (New tables or new Fileds ) ?

Note: we are in implementation phase so  the production is not deployed we have just SANDBOX1 and SANDBOX2 and UAT

Thank you

Extend table.validateField() method

$
0
0

Hello,

I am working on Dynamics 365 for Operations Update 5.

I want to extend the functionality of CustTable.ValidateField() method by using extensions.

This is my code:

[DataEventHandler(tableStr(CustTable), DataEventType::ValidatedField)]
public static void CustTable_onValidatedField(Common sender, DataEventArgs e)

{

ValidateEventArgs event = e as ValidateEventArgs;
CustTable custTable = sender as CustTable;

boolean result = event.parmValidateResult();

result = result && RegNumberValidator_BG::validate(custTable.AccountNum, custTable.RegistrationNumber_BG, CustVendACType::Cust);

event.parmValidateResult(result);

}

}

Standard method in CustTable:

boolean validateField(FieldId p1)

{

...

}

The problem is that in my extension method I don`t have access to the variable FieldId p1 that is passed automatically by the framework to validate field method in the table.

Without this fieldId the code in the extension method is executed every time a field is modified no matter if it is my field or not.

I also cannot use the field.orig() method in tables to at least check the field value before the call on the validateField method.

Is there any way to get which is the modified field or its original value to be able to execute validation only on specific field not for all of them.

AX Kernels translate X++ into which SQL ANSI version?

$
0
0

Hi

I am trying to find info as to which SQL ANSI version the different AX kernels translate X++ statements to.

I am interested to find out AX kernel versions from as far back as AX 4.0 and up to Dyn365.

Is there anywhere to find for each kernel version/hotfix what SQL ANSI version it translates X++ into?


Main reason is for some older AX 2009 customers with performance issues we have been advised AX is producing ANSI-89 and can it be changed to ANSI-92 by the SQL DBA. So I am hoping there might be a later kernel update that will allow for this and so the customer can consider.

Thanks

Link type : Active and Delay

$
0
0

Dear All,

I read in blog but i not understand difference between Active and Delay

Active

Active link type update the child data sources without any delay when you select the parent table record. When you deal with more records it will be affect application performance.

Delay

Delay form data source link type is also same as active method the different is delay method won't update immediately when you select the parent record.
It will update the child data source when you select the parent table, Ax use pause statement before update the child data source.
For example, if we are dealing with lot of records so, when the user click or scroll the order, order details will update without any delay if we use active method. 

So, We can use delay method because of performance improvement.

Can you please explain why link type ACTIVE will effect application performance issue and link type DELAY is NOT?

Please give me more shed on this.

Thanks!

Arpan

Performance characteristics

$
0
0

Hi All,

May we know if Dynamics AX 2012 R3 is:

- Processor intensive

- Memory intensive

- Disk read/write intensive

- Swap memory intensive

Thanks,

Mark


SSRS Report - how to do sum of "Column wise group by value"

$
0
0

Hi, 

i am developing a report where i need to calculate the Total Consumption of Month1, Month2 ....data. report format is like below

 MONTH WISE DC IN QTY * PER PIECE CONSUMPTION
Sum of COSTAMOUNTPHYSICALFG QUANTITYPER PIECE CONSUMPTIONOCT'16 DC IN QTYCOSTAMOUNTPHYSICAL valueNOV'16 DC IN QTYCOSTAMOUNTPHYSICAL valueDEC'16 DC IN QTYCOSTAMOUNTPHYSICAL valueTOTAL CONSUMPTION Pending worksheet wise
-55632150-370.88  140-5192310-3709-556320

where Total Consumption is sum(Nov2016 CostAmoutPhysicalvalue , Dec2016CostAmoutPhysicalvalue). where Nov , Dec column is based on input date range parameter. if you select 3 months, then report will display Nov, Dec, Jan. 

now my question is how to calculate the total CostAmoutPhysicalvalue under "TotalConsumption" field?

Thansk,

Rajb

Sitewise User Security

$
0
0

Hi All,

In my Organization, we have setup sites like RAD-MFG(Radiator Manufacturing),RAD-SRV(Radiator Service) etc..The peoples under RAD-MFG can only see the Purchase Orders, Sales Orders etc under that particular Site. How can I do this?

Regards,

Work

Microsoft Dynamics AX + AXeptance

$
0
0

Hello all,

I'm trying to figure out the best ways to automate regression testing in Dynamics AX. During my research I came across a software called AXeptance which seems to be used for regression testing automation. I have found several youtube videos on it (https://www.youtube.com/watch?v=-CWETXCz6tg). It seems like a good product but I feel like there is a lack of documentation online regarding it.

Do any of you use AXeptance for your AX testing? Would you recommend it? Is it easy to set up? Any information regrading AXeptance would be very helpful.

Thank you,

Mariam

Best compile times Dynamics AX

$
0
0

Has anyone been able to achieve full compiles or full cil's in less than 30min? Even better 10min or less? I'm curious with sufficient memory and a RAMdrive if such could be achieved. If you have experimented with such a configuration please leave your feedback on the performance enhancements you've seen or struggles.

Thanks

Dynamics 365 for operations on-premise download

$
0
0

Hi All,

Dynamics 365 for operations on premise is released or not ?

If released can any body share me the link to download.

Thanks,

Krishna

Tables exists in SQL but not in the AOT

$
0
0

Hi All,

Hope you are having a great day.

AssetTransactionListing table exists in SQL Server, but i'm unable to find it in the AOT. How is it possible?

Any comments will be appreciated. thanks

Learning DIXF

$
0
0

Hi All,

I want to learn DIXF, any suggestions where to start from?

thanks

Mike


The model element has not been successfully compiled. Include it in the current project before attempting to compile again

$
0
0

Hello,

 

I'm trying to do a test code upgrade and when building a project for application suite VAR model I get the following error:

The model element has not been successfully compiled. Include it in the current project before attempting to compile again.

The problem is that the specified file is in application suite USR model and I can't move it to the current project. 

Is this a bug or am I missing something?

Best regards

EXAM number of Dynamic 365

$
0
0

HI 

Can any one advice the Exam number of " MS Dynamic 365 AX Distribution and Trade"?

Regards

Gorav Vashistha 

 

Admin provisioning tool can't stop DynamicsAXBatch service

$
0
0

Hi I have Dynamics 365 on my local VM. as soon as I try to do the AdminUser provisioning, it gives me the error "Can not stop the DynamicsAXBatch service on computer '.'".

Does anyone has an idea ?

Regards

New metadata API

$
0
0

AX 7 (“Microsoft Dynamics 365 for Operations”) offers a new API for getting metadata of AX elements such as tables, form extensions, models and so on. It’s very easy to use, therefore even if you’re very familiar with the old TreeNode API, you should definitely pay attention to this new one.

The best place to start is in the MetadataSupport class in Microsoft.Dynamics.Ax.Xpp namespace (yes, the whole API is in an external library; it’s not written in X++).

The class offers many static methods providing information about elements. Taking tables as an example, you can use:

  • TableNames() to get a list of names of all tables in Dynamics AX.
  • GetAllTables() to get details of all tables as objects.
  • GetTable() to get details of an individual table (based on its name or ID).

The MetadataSupport class also offers a few helper methods such as IsTableMapped() and ConvertAxUserTypeToBaseType().

Element details are represented by classes with names prefixed with Ax. For example, GetTable() returns an instance of AxTable class. (All these classes are defined in another assembly; the namespace is Microsoft.Dynamics.AX.Metadata.MetaModel).

These classes provide all details you may need. For tables, you can see properties, fields, indexes, methods and everything else.

AxTable members

Let me give you a full example that you can take and run in your environment. It iterates all controls in a given form and put their names to infolog.

using Microsoft.Dynamics.AX.Metadata.MetaModelclass MetadataDemo{publicstaticvoid main(Args _args){
        AxForm form = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetForm(formStr(SysUserSetup));new MetadataDemo().showControlNames(form.Design);} privatevoid showControlNames(IFormControlCollection _control){
        var controlEnumerator = _control.Controls.GetEnumerator()while(controlEnumerator.MoveNext()){
            AxFormControl control = controlEnumerator.Current;if(control is IFormControlCollection){
                this.showControlNames(control as IFormControlCollection); // Recursion}else{
                info(control.Name);}}} }

There are a few things to notice:

  • It starts with using Microsoft.Dynamics.AX.Metadata.MetaModel, so we don’t have to repeat this namespace when referring to classes such as AxFormControl.
    I didn’t bother to do the same with Microsoft.Dynamics.Ax.Xpp, because I’m referring to it just once.
  • I use IFormControlCollection interface instead of concrete classes when I need to work with something containing child controls. This also me to use the same code for the Design node as well as for container controls such as tab pages, because they all implement this interface. Such interfaces are extremely useful for writing generic code and fortunately they’re used quite a lot in this framework.
  • Notice that AX 7 allows us to use property names directly (e.g. form.Design), so we don’t have to resort to the underlying accessor methods (e.g. form.get_Design()) as in previous versions . It makes programming easier and code nicer.
  • As a side note, notice the comment pointing out the recursive call. I tend to always do that, to make the use of reflection immediately obvious.

I truly enjoy working with this new metadata API – it’s nicely designed and easy to use. The only problem might be that you need to be a bit familiar with .NET Interop (= accessing .NET objects from X++), but even if you aren’t, you’ll quickly learn those few things you need.

Design Patterns: Strategy Pattern

$
0
0

Hello all,

I'm just curious if anyone has come across a blog or article about using the strategy design pattern with X++?

Is it possible with X++?

If you have any references please write back. I'm curious to see how this would be done in X++.

Thanks in advance.

Viewing all 17532 articles
Browse latest View live


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