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

String appearance in AX 2012 R3

$
0
0

Is there a chance to change the string appearance in AX 2012 R3 forms?
E.g. a eight-digit item id  in database like "10404023" should be displayed with a space after the fourth digit like "1040 4023". The requirement is the readability of the item id. I'm looking for a central setting, not customizing every AX form.

Regards, Dirk


AIF Inbound XML cause Error: The value cannot be null: Parameter Name: document

$
0
0

Hello together,

I want implement an AIF Inbound service for exchange data. For that I have created a table and query. With the wizard I have created the nessary private Project. Furthermore I have Setup the Inbound port and the Service object.

For testing I have created a sample XML which you can find below. If I try to Import this XML I receive the error message "The value cannot be null: Parameter Name: document".

Have someone an idea why this error occur?

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="schemas.microsoft.com/.../Message">
 <Header>
  <Action>schemas.microsoft.com/.../create&lt;/Action>
 </Header>
 <Body>
  <MessageParts xmlns="schemas.microsoft.com/.../Message">
   <AxdObiZEKOM_DEB_HIST xmlns="schemas.microsoft.com/.../ObiZEKOM_DEB_HIST">
    <AxdEntity_ObiZECOM_DEB_HIST_1 class="entity" action="create">
     <DATEI>/PDIS/OBI/TNP/6069/100152-RSSBELEGDATEN-20130326-1431.xml</DATEI>
     <DATID>127</DATID>
     <ERDAT>26.03.2013</ERDAT>
     <LFDID>11</LFDID>
     <MAHNS>0</MAHNS>
     <MANDANTID>100152</MANDANTID>
     <MANDT>242</MANDT>
     <MSERDAT>27.03.2013</MSERDAT>
     <MSERZET>110017</MSERZET>
     <TNP_BETRAG>134,89</TNP_BETRAG>
     <TNP_JE_NO>10012356</TNP_JE_NO>
     <TNP_JEDAT>26.03.2013</TNP_JEDAT>
     <TNP_JETYP>10</TNP_JETYP>
     <TNP_KUNNR>1000200456</TNP_KUNNR>
     <VBELN_VA>2000596685</VBELN_VA>
     <WAERS>EUR</WAERS>
    </AxdEntity_ObiZECOM_DEB_HIST_1>
   </AxdObiZEKOM_DEB_HIST>
  </MessageParts>
 </Body>
</Envelope>

How to find out the checked Out objects by the users on a date wise?

$
0
0

Hi All,

I want to know the AX objcets checked out on to day, whats the way to finf it out?

 

I can get the checked Out objects through source control pending objects but i wanted to know the date on which the object is checked Out.

 

Can any one please let me know how to achieve the same?

 

Regards,

Aravind Reddy.

How can I open specific form and specific record from C#application

$
0
0
 Hi.
I develop at AX 2012 R3 + C#.
How can I open specific form and specific record from C# application.
I want to open specific form and specific record that was set parameters from C# application.
I wonder it might possible use .NET proxy.

 

I use this code in X++.(Classes\Batch1)

static void main(Args _args = null)
{
    MenuFunction menuFunction;
    CustTable _custTable;
    _args = new Args();

    _custTable = CustTable::find("DAT-000001");
    menuFunction = new MenuFunction(menuitemDisplayStr(CustTable), MenuItemType::Display);

    _args.record(_custTable);
    menuFunction.run();
}


And I use this code in C#.

using (Session session = new Session())
{
     session.Logon("DAT", null, null, null);
     Batch1 tmpBatch = new Batch1();
     Batch1.main();
 }

Try this code, it seems done successfully, but not open custform. Is it impossible?

I refer to this URL too: community.dynamics.com/.../152359

InitFrom

$
0
0
Guys, good morning .

I have a method that provides a field for InventTable form another table , however, I can not put the filter in this field because it is a method.
So I tried to use the InitFrom but , although no error in the method, the data is not brought to the table InventTable .
Does anyone had something like that?
Thanks.

server void  initFromCustVendExternalItem(CustVendExternalItem table, ModuleInventCustVend _moduleInventCustVend, CustVendAC _custVendAccount)
{
CustVendExternalItem                custVendExternalItem;
    ModuleInventPurchSalesVendCustGroup moduleInventPurchSalesVendCustGroup;
    CustVendItemGroupId                 custVendItemGroupId;
    
    if (_custVendAccount)
    {
        if (_moduleInventCustVend == ModuleInventCustVend::Cust)
        {
            moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::Cust;
        }
        else
        {
            moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::Vend;
        }

        custVendExternalItem    = CustVendExternalItem::find(moduleInventPurchSalesVendCustGroup, this.ItemId, InventDim::inventDimIdBlank(), _custVendAccount);

        if (!custVendExternalItem)
        {
            if (_moduleInventCustVend == ModuleInventCustVend::Cust)
            {
                moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::CustGroup;
                custVendItemGroupId                 = CustTable::find(_custVendAccount).CustItemGroupId;
            }
            else
            {
                moduleInventPurchSalesVendCustGroup = ModuleInventPurchSalesVendCustGroup::VendGroup;
                custVendItemGroupId                 = VendTable::find(_custVendAccount).VendItemGroupId;
            }

            custVendExternalItem    = CustVendExternalItem::find(moduleInventPurchSalesVendCustGroup, this.ItemId, InventDim::inventDimIdBlank(), custVendItemGroupId);
        }
    }

this.ItemId = table.ItemId;
this.externalItemId = table.ExternalItemId;
}

save pdf to printarchive with extended information

$
0
0

Hi

I want to "print" a report into the print archive. in Addition I want to extend the archive to hold some information

Is this realizable?

compilation question

$
0
0

Hi Friends,

We have a couple AOS servers running, when we do full compilation, does it matter which AOS server it connects?

 

We have third party software installed, which integrates with AX and installed on one of AOS server. For those related classes, we need to compile them while connecting to the AOS server, but, we just found out, it's not the case.

 

It's AX 2009. Anybody has similar experience?

 

Thanks,

River

What is this + symbol in Ax 2012 forms?

$
0
0

What is this + symbol in Ax 2012 forms? Whenever we click it from plus to it becomes - and shows more details. How to design it?


X++ How to add a tab to a form that exists through X++ Code

$
0
0

Hello,

Is there a way to add tabs to a form through X++ code?

I have a form that contains 1 tab per Name that I manually create

I have a table, with 3 columns
Name       Specific Name     RecID
Name A    SpecificNameA   RecID
Name B    SpecificNameB   RecID

Right now, if I want to add Name C, I have to go into my form and manually create a new tab and set up everything that way. How I would like to have it, is where I just perform code on a class through a button, and it generates a new Tab. I have another form where I create new Names.

 

I am sorry about the small size of the picture, it basically explains what I said above, 1 button to look up 1 table to generate a new tab for each line on the table using the table's names.
I am aware of Form = New Form(); code, but how does it work if the form already exists?

Thanks!

 

Opening up AX Code from Infolog (AX 2012)

$
0
0

When I double-click on the text in the Infolog a pop-up window with X++ code appears in German. My language settings are en-au and AUS. What has caused this and can it be fixed?

InventInventoryOnHand via AIF service

$
0
0

Hello, I am new to Ax,

I am working on exposing inventory amounts via AIF. After going through this walk-through (http://technet.microsoft.com/en-us/library/hh352231.aspx) I want to use the sample code to test retrieving inventory amounts. After editing the code to connect to my InventInventoryOnHand service I will receive this message at run-time, "Exception: Wrong number of elements in key data container in entity key".

The best explanation for this error is that AIF expects exactly the same key fields where are on the destination table (which should be InventSum which has Keys of ItemId and InventDimId?). But I'm not sure how the code should be changed to allow multiple keys. I think the code below is correct but I'm not sure.

Do I need to add another instance of .keydata where field is 'ItemId' (see code below //instantiate and set the second key) ? Are there more keys to add? The edited code below will still generate the "wrong number of elements" error at run-time.

Any help is appreciated ;)

-Russ

Edited sample code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ENC_TCP_CLient
{
    class Program
    {
        static void Main(string[] args)
        {
            // Create the inventory objects
            // Service client
            ENC_InvServiceInventSum.InventoryOnHandServiceClient cl = new ENC_InvServiceInventSum.InventoryOnHandServiceClient();
            // Inventory Object to receive response
            ENC_TCP_CLient.ENC_InvServiceInventSum.AxdInventoryOnhand resp;

            // Create the entity key list for the request
            ENC_InvServiceInventSum.EntityKey[] readRespKeys = new ENC_InvServiceInventSum.EntityKey[2];

            //instantiate the first key and set type
            readRespKeys[0] = new ENC_InvServiceInventSum.EntityKey();
            readRespKeys[0].KeyData = new ENC_InvServiceInventSum.KeyField[1];
            readRespKeys[0].KeyData[0] = new ENC_InvServiceInventSum.KeyField();
            readRespKeys[0].KeyData[0].Field = "InventDimId";

            //instantiate and set the second key?
            readRespKeys[1] = new ENC_InvServiceInventSum.EntityKey();
            readRespKeys[1].KeyData = new ENC_InvServiceInventSum.KeyField[1];
            readRespKeys[1].KeyData[0] = new ENC_InvServiceInventSum.KeyField();
            readRespKeys[1].KeyData[0].Field = "ItemId";

            // Ask the user for an item dimension
            Console.WriteLine("Enter the Item Dimension ID:");
            // Add the result to the entity key value
            readRespKeys[0].KeyData[0].Value = Console.ReadLine();

            // Ask the user for an item id
            Console.WriteLine("Enter the Item ID:");
            // Add the result to the entity key value
            readRespKeys[1].KeyData[0].Value = Console.ReadLine();

            try
            {
                // Try to read the inventory amounts
                resp = cl.read(null, readRespKeys);
             
                // Display the information from the inventory query
                Console.WriteLine("For item: " + resp.InventSum);
                Console.WriteLine("The physical inventory is: " + resp.InventSum);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception: " + e.Message);
                cl.Abort();
            }
            cl.Close();
        }
    }
}

[AX 2012 R3] Database deadlock during wave processing

$
0
0

Hi Guys,

we experienced strange database locks during wave processing (Task 3) recently. We are using R3 CU8.

The lock occurres very rarely (the second time this year) but if it happens it's repeatable. It happens when WHSWorkCreate (createTempLine Line 139-149) trys to insert a WHSTmpWorkLine. Here is a screenshot.

The first condition is the standard case. If i force the debugger into the second condition the insert is executed successfully, so i suspect the independant transaction has a high potential to cause a lock.

Down below is the SQL statement which is blocked. We currently trying to find out which SQL statement causes the block.

(@P1 int,@P2 nvarchar(20),@P3 nvarchar(21),@P4 nvarchar(21),@P5 numeric(32,16),@P6 nvarchar(21),@P7 numeric(32,16),@P8 nvarchar(11),@P9 int,@P10 nvarchar(21),@P11 int,@P12 nvarchar(21),@P13 nvarchar(21),@P14 nvarchar(21),@P15 int,@P16 bigint,@P17 numeric(32,16),@P18 nvarchar(11),@P19 nvarchar(26),@P20 int,@P21 nvarchar(11),@P22 nvarchar(11),@P23 nvarchar(11),@P24 nvarchar(11),@P25 nvarchar(21),@P26 nvarchar(21),@P27 int,@P28 bigint,@P29 nvarchar(21),@P30 nvarchar(21),@P31 nvarchar(21),@P32 numeric(32,16),@P33 nvarchar(21),@P34 numeric(32,16),@P35 nvarchar(21),@P36 nvarchar(11),@P37 int,@P38 nvarchar(20),@P39 nvarchar(21),@P40 nvarchar(26),@P41 numeric(32,16),@P42 nvarchar(61),@P43 nvarchar(21),@P44 int,@P45 nvarchar(26),@P46 numeric(32,16),@P47 nvarchar(21),@P48 nvarchar(21),@P49 nvarchar(21),@P50 nvarchar(21),@P51 nvarchar(26),@P52 nvarchar(21),@P53 int,@P54 nvarchar(20),@P55 int,@P56 nvarchar(21),@P57 int,@P58 nvarchar(11),@P59 nvarchar(11),@P60 nvarchar(5),@P61 int,@P62 bigint,@P63 bigint)INSERT INTO WHSTMPWORKLINE (WORKTYPE,WMSLOCATIONID,INVENTTRANSID,ITEMID,INVENTQTY,WORKTEMPLATECODE,DIRECTIVEQTY,DIRECTIVEUOM,ORIGINTYPE,ORIGINREFID,WORKTRANSTYPE,WORKCREATEID,INVENTDIMID,INVENTLOCATIONID,REFTABLEID,REFRECID,HIGHESTQTY,HIGHESTUNITID,LICENSEPLATEID,WORKCREATED,WAVEATTRIBUTECODE,WAVEATTRIBUTECODE2_,WAVEATTRIBUTECODE3_,WAVEATTRIBUTECODE4_,INVENTBATCHID,INVENTSERIALID,WORKBREAK,LOADLINEREFRECID,WAVEID,LOADID,SHIPMENTID,PACKINGQTY,ORDERNUM,LINENUM,WORKID,REQUESTEDTYPEID,PACKQTYCOMPARE,STARTLOCATIONID,ZONEID,CONTAINERID,INVENTUNITIZEQTY,TRANSTXT,RELEASETOWAREHOUSEID,CONTAINERLEVEL,HIGHESTCONTAINERID,AVAILPHYSICAL,CARRIERCODE,CARRIERSERVICECODE,CUSTVENDAC,FEFOBATCHID,LOCATEDLPID,MODECODE,REPLENDEMAND,REPLENLOCATIONID,SORTCODE,TOWAREHOUSE,PRODBOMOPRNUM,WHSFILTERNUM,ECORESSIZENAME,DATAAREAID,RECVERSION,PARTITION,RECID) VALUES (@P1,@P2,@P3,@P4,@P5,@P6,@P7,@P8,@P9,@P10,@P11,@P12,@P13,@P14,@P15,@P16,@P17,@P18,@P19,@P20,@P21,@P22,@P23,@P24,@P25,@P26,@P27,@P28,@P29,@P30,@P31,@P32,@P33,@P34,@P35,@P36,@P37,@P38,@P39,@P40,@P41,@P42,@P43,@P44,@P45,@P46,@P47,@P48,@P49,@P50,@P51,@P52,@P53,@P54,@P55,@P56,@P57,@P58,@P59,@P60,@P61,@P62,@P63)

Restarting the AOS didn't help. Deleting the WHSTmpWorkLine before processing a wave sometimes helped for a while but not reliable

Did anybody experienced this behavior?

Regards

Nils

AX slowness

$
0
0

Hello guys, 

My users have been complaining a lot about an overall slowness on the system. After investigation, I have found that this slowness mainly occurs when they run reports, and not necessarily heavy ones, or when they use the excel add-in. I think that the problem occurs mainly on features that rely on WCF. 

So far, everything in my system is configured according to best practice, and we have configured AOS load balancing. CPU & memory loads rarely exceed 60% on the AOS servers. Our users have the local client installed on their machines but their machines are quite old, the standard configuration being a core i3 2100, with 4GB RAM, but still higher than minimum requirements for AX. 

On the dedicated SQL server, memory load is quite high, but from what I've read this is normal as SQL tries to be in a "comfort zone" memory-wise. Network-wise we have a dedicated  300mbps/<1ms latency connection to our clients and intra-server connection is GbE. We never use more than 50% of the client > server bandwidth.

 

My question is, will network load balancing improve the user experience when using reports ? Follow-up question would be, how tricky would it be to implement it on an already configured system ? 

Posted Journals should not allow users to delete the record based on Security role

$
0
0

Hi

I have some posted journals. If i press on delete button that record should not get deleted. For this i need to approach using security role.

How can i achieve the desired.

Thanks in advance.

Entity action cannot be specified.

$
0
0

Hi,


I try to create a customer in AX2012 through WEB service

I use inbound port with HTTP adapter, data policies is enabled all elements.

SOAPaction: localhost/.../create

I retrieve the error:

Customer.createList    Line=1, Pos=172, Xpath=/Customer/CustTable[1]    Entity action cannot be specified.

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:SOAP-ENV="schemas.xmlsoap.org/.../envelope" xmlns:dat="schemas.microsoft.com/.../datacontracts">
    <SOAP-ENV:Header>
        <dat:CallContext>
            <dat:Company>DAT</dat:Company>
        </dat:CallContext>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <tns:CustomerServiceCreateRequest xmlns:tns="schemas.microsoft.com/.../services" xmlns:ns="schemas.microsoft.com/.../EntityKey" xmlns:tnsA="schemas.microsoft.com/.../EntityKeyList" xmlns:nsA="schemas.microsoft.com/.../sharedtypes" xmlns:tnsB="schemas.microsoft.com/.../Customer" xmlns="schemas.microsoft.com/.../QueryCriteria"  xmlns:xsi="www.w3.org/.../XMLSchema-instance">
            <tnsB:Customer>
                <tnsB:DocPurpose>Original</tnsB:DocPurpose>
                <tnsB:SenderId>DAT</tnsB:SenderId>
                <tnsB:CustTable class="entity" action="create">
                    <tnsB:CustGroup>Test</tnsB:CustGroup>
                    <tnsB:DefaultDimension>
                        <nsA:Values>
                            <nsA:Value>
                                <nsA:Name>Customer</nsA:Name>
                                <nsA:Value>0001</nsA:Value>
                            </nsA:Value>
                        </nsA:Values>
                    </tnsB:DefaultDimension>
                    <tnsB:DirParty class="entity" action="create">
                        <tnsB:Name>Simple Name</tnsB:Name>                        
                    </tnsB:DirParty>
                </tnsB:CustTable>
            </tnsB:Customer>
        </tns:CustomerServiceCreateRequest>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

What I do incorrect?

Problem is in XML or in configuration?

Find and Read requests work fine, have problem only with update and create.

Any idea?

I will be glad to any answer )


Table Relation

$
0
0

Dear AX Community,

I'm new here in Dynamics AX.

If I look at InventDimCombination,

It has a relation like this.

InventDimCombination.ItemId = InventTable.ItemId,

If InventTable property is this...

InventTable.SaveDataPerCompany = True,

InventTable.SaveDataPerPartition = True,

and InventDimCombination property is this

InventDimCombination.SaveDataPerCompany = True, (does this have effect in our discussion?)

InventTable.SaveDataPerPartition = True (does this have effect in our discussion?)

So this is my question:

Will internally SQL Server do something like this? 

select InventDimCombination.* from InventDimCombinationinner join InventTable on

(InventTable.Partition = InventDimCombination.Partition) and

(InventTable.DataAreaId = InventDimCombination.DataAreaId) and

(InventTable.ItemId = InventDimCombination.ItemId)

Thank you very much.

X++ Generated Tabs not returning values

$
0
0
Hello,

I am trying to add a new tabpage on my form for each field I have on a table I created. So far I have 2 records on the table, and I generate 2 tabs. However, I have another class that fills the tabs with data. When I manually create these tabs, the form works. I also have a query on the CIM_Status datasource that should make tab 1 show different records than tab 2 even though they are from the same source.

The reason I wish to do this, is so that if I want to update this form, the only code I need to update is the class that generates the values.

I can get this form to work fine if I manually do everything, but would like it to generate values in the fields I created.

Here is my code:


void clicked() { FormTabPageControl tp; FormGridControl fgc; FormStringControl fsc; str s; str c; //int id1 = fieldName2id(tableName2id("CIM_Status"), "Message"); //int id2 = fieldName2id(tableName2id("CIM_Status"), "UtilityID"); CIM_Utilities cu; super(); while select * From cu { s = cu.JobName; c = cu.Name; tp = Tab.addControl(FormControlType::TabPage,s); tp.autoDeclaration(True); tp.helpText(s); tp.widthMode(1); tp.heightMode(1); tp.caption(c); tp.hideIfEmpty(false); fgc = tp.addControl(FormControlType::Grid,s); fgc.autoDeclaration(true); fgc.widthMode(1); fgc.heightmode(1); fgc.dataSource(tableNum(CIM_Status)); //fgc.dataSource(CIM_Status); fsc = fgc.addControl(FormControlType::String,"CIM_TMP_Message"); fsc.autoDeclaration(True); fsc.WidthMode(1); fsc.label("Message"); //fsc.dataSource(CIM_Status); //fsc.dataField(id1); fsc.dataSource(tableNum(CIM_Status)); fsc.dataField(fieldNum(CIM_Status, Message)); fsc = fgc.addControl(FormControlType::Int64,"CIM_TMP_UtilityID");
        fsc.autoDeclaration(True); fsc.WidthMode(1); fsc.label("Utility ID"); //fsc.dataSource(CIM_Status); //fsc.dataField(id2); fsc.dataSource(tableNum(CIM_Status)); fsc.dataField(fieldNum(CIM_Status, UtilityID)); } }


Batch parameters

$
0
0

Good morning,

I was curious where batch job parameter values are kept in the AX system. I assume they're in the table structure somewhere. For instance, if I were to schedule the Open sales by line report as a batch, where does AX hold the Print destination parameter for the report output? I'm looking for a way to modify the value through code. 

Thank you in advance. 

convert select statement to query

$
0
0

Hi,

I need to convert this select statement into query object to use it in my report, but i've got no idea how to do it. Can someone help my with it?

while select CustInvoiceJour

  join sum(SettleAmountMST), OffsetTransVoucher, AccountNum from CustSettlement

  group by CustInvoiceJour.InvoiceId,  CustSettlement.AccountNum 

    where (CustSettlement.OffsetTransferVoucher == CustInvoiceJour.LedgerVoucher)

&& (CustSettlement.TransDate >= fromDate)

&& (CustSettlement.TransDate <= toDate)

Version controle force sync error

$
0
0

Hello,

When I first time got latest version of objects from VS TFS and then tried to do Version Control Sync with 'Force' (current model) I got errors that "Access to the path " " is denied"

Does it mean that I don't have some permission on server? What can I check?

Thanks.

Viewing all 17532 articles
Browse latest View live


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