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

How to expose more columns in AOT from AxDB

$
0
0

Hi,

I am just wondering if anyone knows how I can expose more columns in AOT from AxDb tables.

There are a few columns that appear in DIMENSIONATTRIBUTEVALUECOMBINATION table in SQL but I can only see a few of them in AOT.  See screenshots.

The columns I need for example are: ItemGroup, ItemGroupValue, BusinessUnit, BusinessUnitValue etc.  

Is there a reason why these fields are not shown in AOT?

Thanks.


A new row to tablecontrol by code

$
0
0

Hi all I created a table control on a form and filled it up with data. Now the user wants to add a new row on a specific position (best would be after the current active one)

How can I realize this

BR

Chris

Ax d365 license,ax version 2018, general question

$
0
0

Hi all,

Recently someone told my client that they have 2 options to upgrade from current version of ax I.e. ax 2012 FP to D365 and ax 2018.

As per my knowledge there is no any version with ax 2018. Or is it the case we call R2 or R3 as 2018?

Also, in d365 can we create new modules?will there be any restrictions or change in process?

In Ax 2012 , sometimes customer uses more licenses than whatever they buy.e.g if they buy 2 enterprise cal license they might have 5 enterprise cal users. Similarly can it be done in D365 on premise or cloud?

Thanks,

Shri

Print SSRS reports using print management setting

$
0
0

Hello everyone,

I am trying to print SSRS reports in D365 F&O using print management setting. I have followed the below steps: -

1. Installed the document routing agent.

2. Set up the printers. 

When I print any report, it shows the message that "Report Print box label was sent to printer 'printer name'". But it is not printing from the printer.

//If I export the report as PDF, and then print the report. It is printing fine. This means that there is no issue with the printer.

// I am attaching the screenshots below.

With regards,

Anurag Nagarkoti

Strange compiler error

$
0
0

I am getting this error when compiling my new model with only one test class that contains no code so far.

Assembly 'System.Xml, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' failed to load because it was not found. C:\AOSService\PackagesLocalDirectory\ApplicationPlatform\ApplicationPlatform\AxReference\Microsoft.OData.Edm.xml 0

AIF Change Tracking

$
0
0

Has anyone managed to successfully configure AIF services for change tracking?

I have enabled both change tracking at a Database-level and at a Table-level (CustTable). This was carried out directly in SQL.

When I make a change to a Customer record in the AX client, I can query the SQL change-tables directly and view the changed records.

However, when I try the execute the getChangedKeys() operation on the CustCustomerServices from a .net client, the EntityKeyPage object has a PageStatus property set to 'Failure' and a PageStatusDetails property set to 'Change Tracking Disabled'.

Is there anything else I need to do to enable change tracking, is this configurable from within the AX client somewhere?  The documentation (which seems fairly thin on the ground) seems to suggest that this only needs to be enabled on the database table.

http://msdn.microsoft.com/en-us/library/hh433529.aspx

 

Thanks,

Nick

 

 

 

Dynamic Query works based on OR condition ?

$
0
0

Hi, Everyone.

I want records based on query act like or condition. I have two queries, The case is 1st query have the records it pulls out otherwise act 2nd query and get the records. Below is my query Please review it. That's correct or not.

public void executeQuery()

{
    Date                    _date;
    ProcessLineProdLoad     pickLastDate,_processLineProdLoad;
    Query                   q = new Query();
    Query                   q2 = new Query();
    QueryBuildDataSource    qbr1,qbds2;
    QueryBuildRange         qbr,qbr2;
    QueryRun                qr,qr2;
    NoYes                   _unrackedFlag,_rackedFlag;
    boolean                     deviatedQuery;
    ;

    _unrackedFlag = NoYes::No;
    _rackedFlag   = NoYes::Yes;

    while select pickLastDate
        order by RackStartDate desc
        {
            if(pickLastDate.RackStartDate != datenull())
            {
            _date = pickLastDate.RackStartDate;
            }
        }

        qbr1 = q.addDataSource(tablenum(ProcessLineProdLoad));

       this.query().dataSourceNo(1).clearRanges();



   if(ProductionPool.valueStr()||SchedDate.dateValue()||ProcessLine.valueStr()||UnLoadedFlag.valueStr())
   {
     
   // 1st query started

    qbr =qbr1.addRange(fieldNum(ProcessLineProdLoad,ProcessLineId));
    qbr.value(ProcessLine.valueStr());

    qbr =    qbr1.addRange(fieldNum(ProcessLineProdLoad,SchedDate));
    qbr.value(sysquery::range(SchedDate.dateValue(),SchedDate.dateValue()));

    qbr =qbr1.addRange(fieldNum(ProcessLineProdLoad,ProdPoolId));
    qbr.value(ProductionPool.valueStr());

    qbr =qbr1.addRange(fieldNum(ProcessLineProdLoad,UnRackedFlag));
    qbr.value(UnLoadedFlag.valueStr());

    qbr = qbr1.addRange(fieldnum(ProcessLineProdLoad,RackedFlag));
    qbr = qbr1.addRange(fieldNum(ProcessLineProdLoad,RackStartDate));
    qbr =  qbr1.addRange(fieldNum(ProcessLineProdLoad, RackedQty));
    
    qbr = qbr1.addRange(fieldnum(ProcessLineProdLoad,Division));


    qbr.value(strfmt('(( (%1 == %2)) || ((%3 >= %4)||(%3<=%5))&& (%6 > %7) && (%8 == %9))',    

    fieldstr(ProcessLineProdLoad,RackedFlag),
    queryValue("1"),

    fieldstr(ProcessLineProdLoad,RackStartDate),
    queryValue(_date),
    queryValue(today()),

    fieldstr(ProcessLineProdLoad,RackedQty),
    queryValue("0"),    

    fieldstr(ProcesslineProdLoad,Division),
    queryValue("22")
    ));

    qbr1.addSortField(fieldnum(ProcessLineProdLoad,ProcessLineId),SortOrder::Ascending);
    qbr1.addSortField(fieldnum(ProcessLineProdLoad,SchedDate),SortOrder::Ascending);
    qbr1.addSortField(fieldnum(ProcessLineProdLoad,LoadRunOrder),SortOrder::Ascending);
    qbr1.addSortField(fieldnum(ProcessLineProdLoad,LoadNum),SortOrder::Ascending);
    qbr1.addSortField(fieldnum(ProcessLineProdLoad,ProdId),SortOrder::Ascending);

    qr = new QueryRun(q);

    while(qr.next())
    {
        _processLineProdLoad = qr.get(tablenum(ProcessLineProdLoad));

        if(_processLineProdLoad)
        {
            this.query(q);
deviatedQuery = true; } } // 1st query ended // 2nd query started if(!deviatedQuery) { qbds2 = q2.addDataSource(tablenum(ProcessLineProdLoad)); qbr2 = qbds2.addRange(fieldnum(ProcessLineProdLoad,ProcessLineId)); qbr2.value(ProcessLine.valueStr()); qbr2 = qbds2.addRange(fieldnum(ProcessLineProdLoad,UnrackedFlag)); qbr2.value(UnLoadedFlag.valueStr()); qbr2 = qbds2.addRange(fieldnum(ProcessLineProdLoad,RackedFlag)); qbr2.value("1"); qr2 = new QueryRun(q2); while(qr2.next()) { _processLineProdLoad = qr2.get(tablenum(ProcessLineProdLoad)); if(_processLineProdLoad) { this.query(q2); } } } // 2nd query ended } super(); }

Excel file accessing from Google drive

$
0
0

Dear all,

I am using VM for D365FO.

I am creating a new Table Student details with 5 columns...

In Excel Student.xlsx  I am creating same 5 columns and filled data accordingly. I put my excel in to Google drive.

I wants to import data in to Student detail table in D365FO from Google  drive with accessing the excel file Student.xksx

Please let me know how to do this.

Thanks!


Call javascript server side app from X++ class

$
0
0

Hi, I have seen lots of examples online of calling javascript from form controls, but what I am looking to call a javascript function from an X++ class. I can run the javascript app and call from X++/D365 after exposing it as HTTP API app, but I don't like the architecture (too disconnected).

I am really looking for a way to have the javascript code in D365, and call it from an X++ class without having to host the javascript app elsewhere.

Is this possible? Can anyone point me in the right direction on how I can accomplish this?

Any help is appreciated.

Logging events in Event Viewer

$
0
0

Hi,

How can I write events to events viewer ?

This code is being executed but can't find the events in event viewer ?

RetailLogger.Log.PaymentConnectorLogOperation(methodName, OperationStarting, this.Name, Platform);

Is there a setting that needs to be enabled\configured?

Thank you.

We can't call record static methods with Dynamics AX .NET Business Connector from PHP code (AX 4.0)

$
0
0

Good morning to everybody.

We have a problem and we need help from community.

We are trying to call a record static method from PHP code (PHP 7) with this code >

$fas = 'Microsoft.Dynamics.BusinessConnectorNet,Version="4.0.0.0",Culture="neutral",PublicKeyToken="31BF3856AD364E35"';
$fcn = 'Microsoft.Dynamics.BusinessConnectorNet.Axapta';
$axp = new DOTNET($fas,$fcn);
$company = '';
$language = '';
$objectServer = '';
$configuration = '';
echo $axp->Logon($company,$language,$objectServer,$configuration);
$Class = 'DOTNET';
$Method = 'areyouthere';
$Parm1 = '';
$Parm2 = '';
$Parm3 = '';
$r = $axp->CallStaticClassMethod($Class,$Method,$Parm1,$Parm2,'');
$axp->Logoff();

... and the error message is >

com_exception: Source: Microsoft.Dynamics.BusinessConnectorNet
Description: Error al ejecutar c�digo: Se ha llamado al m�todo con un n�mero no v�lido de par�metros. Seguimiento de pila (C)\Classes\DOTNET\areyouthere in C:\inetpub\InfoWeb\LogisticInfo\com.php:34 Stack trace: #0 C:\inetpub\InfoWeb\LogisticInfo\com.php(34): dotnet->CallStaticClassMethod('DOTNET', 'areyouthere', '', '', '') #1 {main}

Translation of Description Message > "Error to execute code: invalid number or parameters in call method".

We think that the main problem could be in PHP kernel or similar.

Any idea? Had someone tried call AX class static methods o record static methods from PHP?

Thanks in advance. We are hurry about that.

Error 'Table does not have method' after renaming the method

$
0
0

Hi

I have a temptable in which i added a  display method namely chequedesc.

Then I renamed that method from chequedesc to chequeDesc.

After that i can see that my business logic is working as per my code , however i get below error message for my old method which is not present anywhere in code as i renamed it from chequedesc to chequeDesc.

1>"Error executing code: ChequeTmp table does not have method 'chequedesc'.""and

2> "unable to get value for chequedesc in table ChequeTmp" 

I have done the following.

a. Deleted the extension class & created new extension class for adding display method to my temptable.

b. Done full model rebuild with db synch.

I have tried debugging the issue, it does show me the error in local window & call stack details.

However I m unable to determine how to go to source of this error so that I can understand & fix it.

Pls refer to snip below & suggest.

 

Export Report to CSV

$
0
0

Hello everybody, 

I have a requirement where I need to export a report in CSV, but I want the fields to be separated by semicolon(;). 

I have done this up to now:

str csvName;

csvName = strfmt("test");

controller.parmReportContract().parmReportExecutionInfo(new SrsPrintMngmtExecutionInfo());

controller.parmReportContract().parmPrintSettings().printMediumType(SRSPrintMediumType::File);

controller.parmReportContract().parmPrintSettings().fileFormat(SRSFileFormat::CSV);

controller.parmReportContract().parmPrintSettings().overwriteFile(true);

controller.parmReportContract().parmPrintSettings().fileName();

controller.parmReportContract().parmPrintSettings().fileName(csvFileName);

controller.startOperation();

It saves the report in CSV, but the fields are separeted with comma. Istead i need the fields to be separated with semicolon(;).

Thanks in advance!

How to add my own business logic in DP Class in Process Report method in Standard report in D365FO

$
0
0

Dear all,

Can you please let me know if I wants to add my own business  logic in DP Class in Process Report method in Standard report then how I will do ?

Is't possible through COC OR Event handlers?

Please give me more she'd on this

Thanks!

How to get vendor contact info

$
0
0

Good morning,

I am trying to import vendor contact info (it might be primary or non primary)

if vendor contact info is already there(whether it is primary or non primary) then update with new data or insert.

i want that record to update old contact info with new contact info

// For primary i can use this

logisticsElectronicAddress = LogisticsElectronicAddress::findRecId(DirPartyTable::findRec(vendtable.Party).PrimaryContactPhone,true);

so with this i can get primary contact.

If that existing  contact is not primary  instead i have non primary contact i am able to get this in this way 

LogisticsElectronicAddress    lla ;
select forUpdate firstOnly lla
where lla.Location == DirPartyLocation::findOrCreate(vendtable.Party, 0).Location
          && lla.Type == LogisticsElectronicAddressMethodType::Phone;


I want to know am i doing correct or are there any methods ?

please provide any alternate solution.

Regards.

Have a great day.


upgrade cost - upgrade from AX2012 R2 to AX 365

$
0
0

how to estimate the cost of upgrade from ax 2012 R2 to 365

Why Pre OR Post Event handlers are created on ONLY HOOKABLE Methods in D365FO

$
0
0

Dear all,

Can you please let me know why Pre OR Post Event handlers are created on ONLY HOOKABLE Methods?

Here the word "Hookable " means what? Please give me an example.

Please tell me the exact reason?

Please give me more she'd on this

Thanks!

Function ProjBudgetTransactionLine_Virtual::construct has been incorrectly called.

$
0
0

got the following error while trying to create a P.O  

" Function ProjBudgetTransactionLine_Virtual::construct has been incorrectly called." 

* the function in question 

public static ProjBudgetTransactionLine construct(
ProjTransType _transType,
TransDate _transDate,
ProjTransIdBase _transId,
ProjId _projId,
ProjCategoryId _categoryId,
Qty _quantity,
CurrencyCode _costAmountCurrencyCode,
CostAmount _costAmount,
CurrencyCode _salesAmountCurrencyCode,
SalesAmount _salesAmount,
RefRecId _sourceDocumentLine,
ProjActivityNumber _projActivityNumber = '',
ProjLinePropertyId _projLinePropertyId = ''
)
{
ProjBudgetTransactionLine_Virtual projBudgetTransactionLine_Virtual = new ProjBudgetTransactionLine_Virtual();

if (!_transDate ||
!_projId ||
!_categoryId ||
(_transType != ProjTransType::Revenue && !_costAmountCurrencyCode) ||
!_salesAmountCurrencyCode ||
!_sourceDocumentLine)
{
throw error(strFmt("@SYS22828", funcName()));
}

projBudgetTransactionLine_Virtual.parmTransType(_transType);
projBudgetTransactionLine_Virtual.parmTransDate(_transDate);
projBudgetTransactionLine_Virtual.parmTransId(_transId);
projBudgetTransactionLine_Virtual.parmProjId(_projId);
projBudgetTransactionLine_Virtual.parmCategoryId(_categoryId);
projBudgetTransactionLine_Virtual.parmCostAmountCurrencyCode(_costAmountCurrencyCode);
projBudgetTransactionLine_Virtual.parmSalesAmountCurrencyCode(_salesAmountCurrencyCode);

projBudgetTransactionLine_Virtual.parmQty(_quantity);
projBudgetTransactionLine_Virtual.parmCostAmount(_costAmount);
projBudgetTransactionLine_Virtual.parmSalesAmount(_salesAmount);
projBudgetTransactionLine_Virtual.parmTransIdRef('');
projBudgetTransactionLine_Virtual.parmProjActivityNumber(_projActivityNumber);
projBudgetTransactionLine_Virtual.parmSourceDocumentLine(_sourceDocumentLine);
projBudgetTransactionLine_Virtual.parmLinePropertyId(_projLinePropertyId);
return projBudgetTransactionLine_Virtual;
}

DataProvider Set not Initilized

$
0
0

Hi, am doing a report that shows the records selected.

void clicked()
{
    //Mi Tabla
    PurchTable  purchTableLocal;
    //donde guardo el dato
    Args args       = new Args();

    //Almacenar registros seleccionados

    MultiSelectionHelper selectionHelper = MultiSelectionHelper::construct();// crea una instancia de la clase
    Set setSeleccion = new Set(Types::String);
    selectionHelper.parmDatasource(purchaseTable_ds); //data source del formulario PurchTableListPage
    purchTableLocal = selectionHelper.getFirst();

    while(purchTableLocal.RecId != 0)
    {
        info(purchTableLocal.PurchId);
        setSeleccion.add(purchTableLocal.PurchId);
        args.parm(purchTableLocal.PurchId);
        purchTableLocal = selectionHelper.getNext();
    }
        if(setSeleccion.elements() <= 0) //si no hay elementos, error
    {
        error("No hay parámetro de entrada, por favor, seleccione al menos un registro");
    }
        args.parmObject(setSeleccion);
        new MenuFunction(menuitemActionStr(VSSReportPedidos), MenuItemType::Action).run(args);

    super();
}

protected void preRunModifyContract()
{
    VSSPedidosContractClass contract = this.parmReportContract().parmRdpContract();
    contract.parmPurchId(args.parm());
    contract.parmPurchIdList(args.parmObject());

    super();
}

[
AifCollectionTypeAttribute("listaPurch", Types::String)
]
public Set parmPurchIdList(Set _listaPurch = listaPurch)
{
    listaPurch = _listaPurch;

    return listaPurch;
}

public void processReport()
{
    PurchId              purchId;
    Query                query;
    PurchTable           purchTable;
    PurchLine            purchLine;
    Set                  listId = new Set(Types::String);
    SetEnumerator        se; //permite recorrer la litsa
    VSSPedidosContractClass     dataContract;//coge la query del runtime usando una query dinámica

    //Para debug

    //pedidosTemp.setConnection(this.parmUserConnection());
    ///////////////////////////////////////////////////////////////

    //Este método base lee la query especificada en el SSRS RepotrQueryAttribute attribute.
    query = this.parmQuery();// coge los parámetros pasados de runtime

    //el método base lee el SRSReportParameterAttribute attribute.
    dataContract = this.parmDataContract();//as VSSPedidosContractClass;

    purchId      = dataContract.parmPurchId();
    listId       = dataContract.parmPurchIdList();


    if(!listId.empty())
    {
        se = listId.getEnumerator(); //de esta manera podremos recorrer la lista
        while(se.moveNext())
        {

        select purchTable
            where purchTable.PurchId == se.current();//purchId;

        pedidosTemp.DeliveryDate = purchTable.DeliveryDate;
        pedidosTemp.OrderAccount = purchTable.orderAccount;
        pedidosTemp.PurchaseType = purchTable.purchaseType;
        pedidosTemp.PurchIdPedido= purchTable.purchId;
        pedidosTemp.PurchStatus  = purchTable.purchStatus;
        pedidosTemp.CurrencyCode = purchTable.CurrencyCode;


        while select LineAmount, LineNumber, Name, purchId, PurchPrice, PurchQty, CurrencyCode from purchLine
            where purchLine.PurchId == se.current()//purchId
        {

            pedidosTemp.LineAmount     = purchLine.LineAmount;
            pedidosTemp.LineNumber     = purchLine.LineNumber;
            pedidosTemp.Name           = purchLine.Name;
            pedidosTemp.PurchIdLinea   = purchLine.PurchId;
            pedidosTemp.PurchPrice     = purchLine.PurchPrice;
            pedidosTemp.PurchQty       = purchLine.PurchQty;
            pedidosTemp.CurrencyCode   = purchLine.CurrencyCode;

    pedidosTemp.insert();
            }
        }
    }
}


My prblem is when the report is generated by data privider class, it shows an error Set object not initilized, I checked the list is with the correct info in preRunModifyContract() and parmPurchIdList. I suspect that i not refering the correct DataMemberAtributte, or something similar. 

Any ideas??

Thanks

Odata Filter query On ENUM column

$
0
0

Hello Folks,

I am building microsoft flow template. I have entity InventLocation

 

Odata Filter query for string column is working fine.

InventLocationId eq 'WH01' is working fine.

But i need to filter on column InventLocationType of type ENUM.

How can i do this.?

Viewing all 17532 articles
Browse latest View live


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