Quantcast
Channel: Iulian Cordobin's Groups Activities
Viewing all 1084 articles
Browse latest View live

Understanding TFS with AX 2012 (II)

$
0
0

After describing how AX gets its files from TFS, let us next look a little bit at the code behind the scene and understand why some of the issues are appearing, and what can be done to fix it.


The standard classes for working with TFS are:

 SysVersionControlSynchronization

 VersionControl 

 SysVersionControlFilebasedBackEndTfs

This is a standard callstack for doing a file synchronize:

[c] \Classes\SysImportElements\import 11

[c] \Data Dictionary\Tables\SysVersionControlSynchronizeLog\Methods\processModelInBatchNum

[c] \Data Dictionary\Tables\SysVersionControlSynchronizeLog\Methods\processBatchNum 2 g

     [c] \Classes\SysVersionControlFilebasedBackEndTfs\fileSynchronize 8 d+f

[c] \Classes\SysVersionControlSystemFileBased\commandSynchronize 87b+c

[c] \Classes\VersionControl\getLatestVersion 7a

 Let us start looking into how the flow goes:

a) the command to get the object(s) is issued;

b) a decision on whether what you want to get is made; it's either a file or the entire directory;

c) if it's a file we are looking at the Force parameter and try to set it; this is what happens, but the idea is that the controllable which is of type SysTreeNode is always returning false, so:

        filename = this.fileName(_controllable);
        _syncParm.parmForce(_syncParm.parmForce() && _controllable.forceSynchronize());

 

d) this is where we actually download the file, if it's not Latest Yes;

result = tfsWorkspaceProxy.Get(_filename, _syncParameters.parmVersion(), _syncParameters.parmForce());


e) in this moment we have a result from the TFS in the form of

Number of failures: 0
Number of Warnings: 0
Have resolvable Warnings: False
Number of Operations: 0
Number of Conflicts: 0

[c] \Classes\SysVersionControlFilebasedBackEndTfs\processGetCommandResult 54

[c] \Classes\SysVersionControlFilebasedBackEndTfs\createSyncResultMap 85

and we parse the result;


f) if we have any we insert the entries in the table SysVersionControlSynchronizeLog; they will be created with the value for Processed set to false; we have not yet imported anything in AX;

g) we start to process the changes. First, the deletes are being taken care of. Then, we process the xpos we got as part of the add change: we include them in a large xpo file, that we will import;

 

        // Delete commands must be processed first, as they may be part of a rename or move to model operation.
        result = SysVersionControlSynchronizeLog::processDeletesInBatchNum(_batchNum);

        while (modelsEnum.moveNext())
        {
            modelId = modelsEnum.current();
            if (SysModelStore::modelExists(modelId))
            {
                xInfo::setCurrentModelId(modelId);
                result = SysVersionControlSynchronizeLog::processModelInBatchNum(modelId, _batchNum) && result;
            }
            else
            {
                result = checkFailed(strFmt("@SYS345063", SysModelStore::displayName(modelId)));
            }
        }
 

h) if the result of the import for each object is successful, we update the status of the Processed column to true;

The following is a typical callstack when doing a Synchronize (on a model):

[c]    \Classes\SysVersionControlFilebasedBackEndTfs\folderSetSynchronize 19 c

[c]    \Classes\SysVersionControlSystemFileBased\commandSynchronize 79b

[c]    \Classes\VersionControl\getLatestVersion 7a

[c]    \Classes\SysVersionControlSynchronization\run 28

[c]    \Classes\SysVersionControlSynchronization\main 23

So, as a conclusion: if you do a synchronize check the Processed value for the objects included in the latest update batch in the Version Control -> Synchronization log; it should be True; if not an error occurred and most likely your AX is missing the latest set of objects.


Understanding TFS with AX 2012 (IV)

$
0
0
So, at this point, you can ask yourself the question why would the Version Control Synchronize in AX fail from time to time? Because it does happen, every now and then.
The answer is that, most of the times, the developer might perform, unaware of what will be its action's outcome, some task in a manner that will leave the system inconsistent. The only exception for the scenario is when the number of changes is so great that it actually leads the system to a crawl, and possibly not getting everything in AX.

Let's take a look at some of the cases:

a) working disconnected from TFS. It can happen that the AX client will start with no TFS connection, maybe wrong setup, TFS is down, or the developer will disable source control for some task he has.
 At this point, possible actions might trigger issues in the future. These actions can be:
 - manual imports of xpo files that are containing current objects from TFS or future planned items to be added;
 - renaming or deleting objects that are in TFS;

 With these in mind let's move to the next step. This is actually where the error will appear in the Version Control Synchronize process.


 The issue: duplicate OriginId. 
 The outcome: objects not imported in AX.
 The downside: objects marked on the TFS server as Latest (TFS thinks you have the latest object), while you are actually working with old versions of the objects.

 The error messages that you will get are:

 (as a pop up window) Conflict encountered during automatic merge of changes. Please check your modifications.
 

 and

 The origin {73701EAD-8182-442B-A818-B72CA6F0A657} is not unique, it is already used by SharedProject element with name prjOne.


or

The origin {E0FD4EE4-8D32-42CA-8273-C8D9949E4F85} is not unique, it is already used by Class element with name clsOne.
. Unable to save Class
clsOne
             Serious error during import of Class clsOne

The fix: identify in your instance the objects that are holding the wrong IDs. Most likely, they are not existing as valid objects in TFS anymore (they are either deleted, or renamed). SO, you can just remove them. If by any chance this is not true, then you still need to remove the object, and recreate one with the same code, that will have a different OriginId.

b) getting versions of an item from Visual Studio.
 If you do that, you must understand what this does very clear. When you do Get version, Visual Studio will download the item in your local repository folder, but it will not import this to AX. So, it is up to you to do so. You can import an object in AX as long as it's not existing in TFS, or if the Version Control is disabled. You can use this case to recover from some synchronization incident, however, it is rather difficult to manually identify objects that are missing from AX and import them. Plus, it leads to scenario a).

c) performing Synchronize with Force.
 Well, the problem with this stands in the number of objects to sync. If this is low, it will be ok. However, on large projects, the number might become so high, that eventually this will cause the import to somewhat stop at some point and will lead eventually to an unusable instance.

Running SSRS report twice with different layouts by just one click

$
0
0

Is there a way to run an SSRS report twice with different layouts by just one click (execution) with the same data

I want to print out the WMSPickingList_OrderPick Report twice. One-time layout A and the second one I need layout B.

How can I get this done?

WMSlocation Dynamics AX Excel Add-in

$
0
0

Hi,

I am trying to import data into wmsLocation table.

I made connections, add WMSLocation table and then copy pasted an excel data. 84xx rows.

The moment I pasted the data, excel is freezing. In fact the round buffering icon is going on.

Am I missing something?

I think Excel can copy paste large amounts of data.


Thanks,

Lakshmi

Possible problem with model store.

$
0
0

I am having a problem with deleting elements in my usr layer.

As an example i have a class names PCImportAttributeDefaultValueHandler, it exists in syp and usr, though if i do a compare there are no differences.

Not if i try to delete the class, i get this error.

Error Message (14:35:01) Cannot execute a stored procedure.
The SQL database has issued an error.
Info Message (14:35:01) SQL error description: [Microsoft][SQL Server Native Client 11.0][SQL Server]The INSERT statement conflicted with the FOREIGN KEY constraint "FK_ModelElementData_HasModelId_LayerId". The conflict occurred in database "Axapta60_0R3_model", table "dbo.Model".
Info Message (14:35:01) SQL statement: { CALL [Axapta60_0R3_model].[dbo].[XU_Insert](?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) }

Any idea what is wrong?

Getting strange behavior working with CIL

$
0
0
Last days I was working with some CIL involved tasks, and I noticed some strange behavior: the code was not executing as it should be (seemed the Generate CIL) didn't work, had to perform Generate full CIL when Incremental should be enough, or when doing Generate incremental CIL the process seemed to get stuck with no apparent reason.


Decided to get the components stopped, for a machine memory cleanup (as a side note: when doing Generate CIL quite frequently during the days, take some minutes from time to time to restart the SQL and AOS, if not the entire machine - it will save you precious time later), and noticed only at that moment the second Ax32Serv.exe process that was in Suspended state.

I am not sure 100% that this was the reason for the strange behavior, but after clearing that process, Ax started to work normally.          

Cannot modify value in a field populated with an edit method

$
0
0

Hello All

I have used a edit method to display data from a field to another field in a grid. Please see screenshot

Please find a screenshot of the edit method I wrote below

I can modify the field memo, but when leaving the field Memo, it refreshing the Memo field with the Product Name field value.

I need to be able to modify the field Memo value.

Can anyone help on this issue.

Thanks

Regards

Tabrez

passing tmpTable from form to class and back

$
0
0

I want to pass a tmpTable from a form to a class, add some values and get it back to the form to show the data.

the tmpTable can be sent more than once from form to class and in the class adding a value I want to check if such record for a specific key exist and than update, not insert.

How can I reach it?


How to call a new form using a commandbutton present on actionpanetab

$
0
0

please help me How to call a new form using a commandbutton present on actionPanetab?

Thanks

Haleem

Logic of security permission.

$
0
0

Hello,

My understandings about the security roles was that if I have e.g. 3 role assigned to me which all contain 1 specific privilege (with VendTable) and if 2 of them has access level set as "view" on VendTable from "Override permission" form and 1 of it has access level set as "Edit", I should be able to edit the VendTable values.

But in Vendors form which database is VendTable I have only View access.

How is it possible?

Thanks,

Understanding TFS with AX 2012 (V)

$
0
0
One simple question a developer asks from time to time: why aren't available the rename or delete option in the contextual menu on an object?

One possible reason, connected to the fact that you are working with Version Control active, is that you are opening the contextual menu from a project that is also added to Version Control and is not in check out state.

Just try to Check Out the project and you will notice immediately that the rename and delete menu items will appear.

How to filter values from a form's datasource

$
0
0

Hello Everyone,

I have designed a form but I want to filter the data such that it excludes negative amounts so the only data that comes out on the column are positive values.

I also want the system to return all positive values from all customers except two customers, how do I do that?

How do I express this in a method.

Thanks!

To read data from AX

$
0
0

Hi All,

I'm new to AIF. can somebody help me with this scenario.

My scenario: I will pass customer account from CRM and I need to find all the records from CustTrans table and return the records from CustTrans table.

How can I achieve using Custom service? Also please share, if you have any example related to this scenario.

Regards,

Pradeep

Query service in AIF in AX 2012

$
0
0

Hi All,

I want to return data from AX, based on the arguments passed from CRM. Can I use query service for this scenario ? Would that result any security issues, if the CRM users are not part of AX users.

Thanks in advance!!

Regards,

Pradeep

AX 2012 R3 - Installation error

$
0
0

Hi Experts,

I am new to AX administration. I am in a process to install AX 2012 R3 with application on server A & Database on server B. I have all the necessary pre - requisites mentioned in the installation guide. I have also validated both the servers using the installer, there are no warnings or error. But when I start installation I get the error in the attached log & database fails, though if I see the database server, there are three databases created namely

MicrosoftDynamicsAX

MicrosoftDynamicsAXBaseline

MicrosoftDynamicsAX_model 

but there are no tables created. Please guide.

MicrosoftDynamicsAX ENDICOTT to True
2016-03-02 18: 59: 31Z Ögonblicksbildisoleringens condition was changed.
2016-03-02 18: 59: 31Z Changes the SQL tracking database MicrosoftDynamicsAX server ENDICOTT to True
2016-03-02 18: 59: 31Z SQL tracker state was changed.
2016-03-02 18: 59: 31Z === === installation MicrosoftDynamicsAXBaseline
2016-03-02 18: 59: 32Z MicrosoftDynamicsAXBaseline installation has been completed.
2016-03-02 18: 59: 35Z MicrosoftDynamicsAX_model installation has been completed.
2016-03-02 18: 59: 36Z Run AxUtil Schedule for database 'ENDICOTT \ MicrosoftDynamicsAX_model'.
2016-03-02 18: 59: 39Z ******************************************************************************************************

2016-03-02 18: 59: 39Z Could not find the schedule for the model storage location in the database MicrosoftDynamicsAX_model.

2016-03-02 18: 59: 39Z ******************************************************************************************************
2016-03-02 18: 59: 39Z Object reference not set to an instance of an object.
2016-03-02 18: 59: 39Z There was not allowed to complete the installation.
2016-03-02 18: 59: 39Z ******************************************************************************************************

2016-03-02 18: 59: 39Z The task of the component installation has been stopped because of an error.

2016-03-02 18: 59: 39Z ******************************************************************************************************
2016-03-02 18: 59: 40Z S260FinishedInfo


update LogisticsPostalAddress not showing correct address in DirPartyPostalAddressView

$
0
0

I updated the City in the LogisticsPostalAddress . It is updated in the table. However on the Customer Address where it shows the DirPartyPostalAddressView, it doesn't show the correct city. It shows old city.

Any idea what is happening?


Thank you!

Read records from AIF Service

$
0
0

Hi,

I am unable to read records of the AIF document service. Below is the schema and the code to read from AIF:

<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns:tns="schemas.microsoft.com/.../ARR_Profile" xmlns:st="schemas.microsoft.com/.../sharedtypes" elementFormDefault="qualified" targetNamespace="schemas.microsoft.com/.../ARR_Profile" xmlns:xs="www.w3.org/.../XMLSchema">
  <xs:import schemaLocation="SharedTypes.xsd" namespace="schemas.microsoft.com/.../sharedtypes" />
  <xs:element name="ARR_Profile" type="tns:AxdARR_Profile" />
  <xs:complexType name="Axd_Profile">
    <xs:sequence>
      <xs:element minOccurs="0" name="DocPurpose" nillable="true" type="st:AxdEnum_XMLDocPurpose" />
      <xs:element minOccurs="0" name="SenderId" nillable="true" type="st:AxdExtType_DataAreaId" />
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Profile" type="tns:AxdEntity_Profile" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="AxdEntity_Profile">
    <xs:sequence>
      <xs:element minOccurs="0" name="_DocumentHash" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="RecId" nillable="true" type="st:AxdExtType_RecId" />
      <xs:element minOccurs="0" name="RecVersion" nillable="true" type="st:AxdExtType_RecVersion" />
      <xs:element minOccurs="1" name="Active" type="st:AxdEnum_NoYes" />
      <xs:element minOccurs="1" name="BrokerId" type="xs:string" />
      <xs:element minOccurs="1" name="plate" type="xs:string" />
      <xs:element minOccurs="1" name="MembershipNumber" type="xs:string" />
      <xs:element minOccurs="1" name="ProfileOrigin" type="st:AxdEnum_ProfileOrigin" />
      <xs:element minOccurs="1" name="Owner" type="xs:string" />
      <xs:element minOccurs="1" name="RegistrationNumber" type="xs:string" />
      <xs:element minOccurs="1" name="Date" type="xs:date" />
    </xs:sequence>
    <xs:attribute fixed="entity" name="class" use="required" />
    <xs:attribute name="action" type="st:AxdEnum_AxdEntityAction" />
  </xs:complexType>
</xs:schema>

The C# code used to communicate with AIF is as follows:

Axd_Profile profiles;             

            EntityKey[] readKeys = new EntityKey[1];
            readKeys[0] = new EntityKey();
            readKeys[0].KeyData = new KeyField[1];
            readKeys[0].KeyData[0] = new KeyField() { Field = "MembershipNumber", Value = memberId };          

            profiles = proxy.read(context, readKeys);

            return profiles.AMA_Profile;


This approach fails and AIF complains that the "Wrong field ID in the key data container in entity key". The field exists in the table and I have an index on that field as well. Any ideas, why my "read" operation is not functioning. Let me know if you need more info.

Call Document Service read() on non-unique key

$
0
0

Hi,

I have a table that creates profiles based on a memberId. A member can have more than one profile (In case you wonder, the solution has been designed for the data to be not normalized, which is not optimal I know but I have to roll with it). Now before the requirements change occurred I created a document service that worked fine until memberId became non-unique. So my question is, is it possible to call the read() method on a non-unique key field in a table? Is it possible to change the service for fields that do not have an index (not recommended I am ware of that, I am just curious)? Or should I create a custom service instead? I appreciate your time.

Thanks,

Daniel

AOS crashing on selection of a particular table

$
0
0

Hi All,

I created a temporary table with 60 string columns and string size of 1000 each. Since then, the AOS crashes with the following error

Object Server 01:  Unexpected situation More Information: Total field length cannot exceed 64K. Please re-factor your table *<table name>

I am not able to synchronize or compile the application without crashing AOS (hence never completes).

In other environment I created a new model and added a regular table with only one field to it. Then installed that new model to the environment with issue. I referred the following link:

AOS cannot start after extending string length on EDT

Regards,

Abhinay

How to backup an Application Server (AOS) and restore it on another Server

$
0
0

Hello Members,

Please the HP Server DL 380  , I used as  Application Server for AX 2012 is having a motherboard problem which HP is trying to resolve for me.

My Question is this;

I was able to swap the hard disk on Database Server which is still working , and I was able to access the Application Server OS , Files ,e.t.c .

Please how can I backup the Application Server (AOS) and re-install it on another Server depending the time HP resolve the it.

Thanks you

Viewing all 1084 articles
Browse latest View live


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