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

Incremental CIL takes too long time in AX 2012 R2 CU7

$
0
0

Hi All,

I have one doubt regarding Incremental CIL.
In my application i run the Incremental CIL and it is taking more than 15 hrs and still going.

My doubt is can i close that application in the middle from where i run the Incremental CIL

I opened another instance there all inbound ports are deactivated state bcoz Incremental CIL is in progress.

in that instance i again tried to generate Incremental CIL  it is throwing a error message Another instance of CIL generation is already in progress. Please wait for the operation to complete before retrying.

Please advise me Can i close that application in the middle where i run the incremental CIL?

if i closees the AX application will work or not?

Thanks,

Krishna


When to use event handler in AX?

$
0
0

Hi Experts,

What is the basic use of event handlers? What are the advantages of them over writing code directly to methods? (except upgrade advantages)

I have gone through few blogs but, They were more about How to use event handlers not when or why to use them.

Thanks in Advance:).

cannot see parameters on batch job task when added manually - sysoperation batch job

$
0
0

Dear all,

I have created few of the batch jobs with the sysoperation framework in AX 2012.

when I run these jobs from the menu items in a batch and then go the batch job form and look for the parameters, I could see the parameters.

But if I try to add these jobs manually, as in when I create a new batch job and select the class and then try to look for the parameters I could not see it. I could not find out the reason behind this. If anyone have any idea, please share.

Thanks.

x++ List of all Methods on a table.

$
0
0

Hi.

I need to retrive a list of all methods on a table.

I tried the following

SysDictTable dTable = new SysDictTable(tableName2Id('CustInvoiceJour'));
et dictMethodSet = dTable.methods(true, true, true);

SetEnumerator iter = dictMethodSet.getEnumerator();

while (iter.moveNext())
{
dMethod = iter.current();

info(dMethod.name());
}

 I Also tried.

Microsoft.Dynamics.AX.Metadata.MetaModel.AxTable table = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetTable("CustInvoiceJour");

Microsoft.Dynamics.AX.Metadata.Core.Collections.IKeyedObjectCollection sen =  table.Methods;

for (int i = 0; sen != null && i < sen.Count; i++)

{
Microsoft.Dynamics.AX.Metadata.MetaModel.AxMethod method = sen.getObject(i);
info (method.Name);
}

Both methods have the same Issue, they do not include extension Methods.

public static class OTDTableMethod_Extension
{

public static str otdFullName(CustInvoiceJour _custInvoiceJour)
{
return 'test';
}

}

Is there anyway to get all methods for a table or anyway to get all extension methods ?

where clause in DP class dataset (SRSReportDataSetAttribute)

$
0
0

Hi,

I am developing an RDP report where I am using regular tables to show my data. I want to do something like this in my getTableBuffer method:
select * from xyzTable where createdby == "curUserId";

It's not working. Can someone please sugges how to do it?

AIF Services, User is not authorized for this port.

$
0
0

Hello, 

I am trying to access AIF service using claims user from a remote location and its giving me following 2 execptions:
1)The submitting user '' is not a valid Microsoft Dynamics AX user.

2)User is not authorized for this port.

 

Please suggest something

 

AIF: Add Services reference dynamically , is there any way ?

$
0
0

 Hi Guys ,

Kindly help me out , I want to add services reference(WSDL services) in AX , but that should be dynamically or runtime , I have one field at form level which will have url ... I know we can add reference in .net via creating C# project but what if same thing I want to do dynamically , In short "Add Services reference" should be done by code or complex parameter link class should be able to pass via web URL ....

any good link or code, job would be Appreciated....

Thanks

how to find menu item type

$
0
0

i want to find out a report which has datatype output and i want to find this datatype from ax dynamics kindly help me  out??


How to sort data in report data provider

$
0
0

i have a source code as this below :

public void processReport()
{

    QueryRun            qr;
    PurchReqTable       purchReqTable;
    PurchReqLine        purchReqLine;
    PurchLine           purchLine,lastPurchLine;
    InventTrans         inventTrans;
    InventTransOrigin   inventTransOrigin;
    
    /*SourceDocumentHeader                sourceDocumentHeader;
    WorkflowTrackingStatusTable         workflowTrackingStatusTable;
    WorkflowTrackingTable               workflowTrackingTable;
    UserInfo                            userInfo;
    WorkflowElementTable                workflowElementTable;
    WorkflowStepTable                   workflowStepTable;*/

    MK_PurchReqReportContract   contract = this.parmDataContract() as MK_PurchReqReportContract;
    utcDateTime         fromDate = DateTimeUtil::newDateTime(contract.parmFromDate(),0,DateTimeUtil::getCompanyTimeZone());
    utcDateTime         toDate = DateTimeUtil::newDateTime(contract.parmToDate(),DateTimeUtil::time(DateTimeUtil::maxValue()),DateTimeUtil::getCompanyTimeZone());

    qr = new QueryRun(this.parmQuery());
    qr.query().dataSourceTable(tableNum(PurchReqTable)).addRange(fieldNum(PurchReqTable,CreatedDateTime))
    .value(SysQuery::range(fromDate,toDate));

    while (qr.next())
    {
        purchReqTable = qr.get(tableNum(PurchReqTable));
        
        while select purchReqLine
               where purchReqLine.PurchReqTable == purchReqTable.RecId
        {
            purchLine = purchReqLine.purchLine();
            
            //tmpPurchReqReport.PurchReqDate              = DateTimeUtil::date(purchReqTable.cre);
            tmpPurchReqReport.PurchReqId                = purchReqTable.PurchReqId;
            tmpPurchReqReport.PurchReqName              = purchReqTable.PurchReqName;
            tmpPurchReqReport.PurchReqDate              = DateTimeUtil::date(purchReqTable.SubmittedDateTime);
            tmpPurchReqReport.Requester                 = purchReqLine.requisitionerName();
            tmpPurchReqReport.Preparer                  = purchReqTable.originatorName();
            tmpPurchReqReport.ItemDescription           = purchReqLine.MK_Description;
            tmpPurchReqReport.ItemId                    = purchReqLine.ItemId;
            tmpPurchReqReport.ItemName                  = purchReqLine.itemName();
            tmpPurchReqReport.PurchId                   = purchReqLine.PurchId;
            tmpPurchReqReport.PurchQty                  = purchReqLine.PurchQty;
            tmpPurchReqReport.PurchUnit                 = purchReqLine.unitOfMeasureSymbolById();
            tmpPurchReqReport.PurchPrice                = purchReqLine.PurchPrice;
            tmpPurchReqReport.CurrencyCode              = purchReqLine.CurrencyCode;
            tmpPurchReqReport.LineAmount                = purchReqLine.LineAmount;
            tmpPurchReqReport.VendAccount               = purchReqLine.VendAccount;
            tmpPurchReqReport.VendName                  = purchReqLine.vendName();
            tmpPurchReqReport.LeadTimeStd               = purchReqLine.inventTable().MK_LeadTime;

            tmpPurchReqReport.CostCenter                = MK_DimensionClass::getValueFromDefaultDimension(purchReqLine.DefaultDimension,"CostCenter");
            tmpPurchReqReport.Department                = MK_DimensionClass::getValueFromDefaultDimension(purchReqLine.DefaultDimension,"Department");
            tmpPurchReqReport.Purpose                   = MK_DimensionClass::getValueFromDefaultDimension(purchReqLine.DefaultDimension,"Purpose");
            tmpPurchReqReport.Spec                      = MK_DimensionClass::getValueFromDefaultDimension(purchReqLine.DefaultDimension,"Spec");
            tmpPurchReqReport.Spec1                     = MK_DimensionClass::getValueFromDefaultDimension(purchReqLine.DefaultDimension,"Spec1");

            this.setFieldManager(purchReqTable);
            this.setFieldSeniorManager(purchReqTable);
            this.setFieldRFQ(purchReqTable);
            this.setFieldDirector(purchReqTable);

            if(purchLine.RecId)
            {
                tmpPurchReqReport.PurchaseDate              = PurchTable::find(purchReqLine.PurchId).createDate();

                select firstOnly lastPurchLine order by RecId desc
                           where lastPurchLine.ItemId == purchLine.ItemId
                              && lastPurchLine.RecId <= purchLine.RecId
                              && lastPurchLine.PurchId != purchLine.PurchId;
                this.setFieldLastPurch(lastPurchLine);

                //first packing slip
                select firstOnly inventTrans order by RecId asc
                            join inventTransOrigin
                           where inventTransOrigin.InventTransId == purchLine.InventTransId
                              && inventTransOrigin.ReferenceId   == purchLine.PurchId
                              && inventTrans.InventTransOrigin   == inventTransOrigin.RecId
                              && inventTrans.VoucherPhysical     != "";
                this.setFieldFirstPackingSlip(inventTrans);

                tmpPurchReqReport.QtyRemain                 = purchLine.RemainPurchPhysical;
                tmpPurchReqReport.TotalQtyReceive           = purchLine.receivedInTotal();
                tmpPurchReqReport.CloseStatus               = (purchLine.RemainPurchPhysical > 0) ? "@SYS80095" : "@SYS14403";

                tmpPurchReqReport.ActualTimeProcessNeeded   = (tmpPurchReqReport.RFQAcceptDate && tmpPurchReqReport && tmpPurchReqReport.FirstReceiveDate && tmpPurchReqReport.PurchaseDate) ?
                                                               tmpPurchReqReport.RFQAcceptDate - tmpPurchReqReport.ApprovalManagerDate  + (tmpPurchReqReport.FirstReceiveDate - tmpPurchReqReport.PurchaseDate) :0;

           //    tmpPurchReqReport.ActualTimeProcessNeeded   = (tmpPurchReqReport.RFQAcceptDate && tmpPurchReqReport.ApprovalManagerDate) ?
          //                                                    tmpPurchReqReport.RFQAcceptDate - tmpPurchReqReport.ApprovalManagerDate :0;

                tmpPurchReqReport.LeadTime   = (tmpPurchReqReport.FirstReceiveDate && tmpPurchReqReport.PurchaseDate) ?  (tmpPurchReqReport.FirstReceiveDate - tmpPurchReqReport.PurchaseDate) :0;

         //       tmpPurchReqReport.LeadTimeStatus            = (tmpPurchReqReport.ActualTimeProcessNeeded <= 0) ? MK_NoneOK::None : (tmpPurchReqReport.ActualTimeProcessNeeded > tmpPurchReqReport.LeadTime) ? MK_NoneOK::NotOK : MK_NoneOK::OK;

                tmpPurchReqReport.LeadTimeStatus            = (tmpPurchReqReport.LeadTime <= 0) ? MK_NoneOK::OK : (tmpPurchReqReport.LeadTime > tmpPurchReqReport.LeadTimeStd) ? MK_NoneOK::NotOK : MK_NoneOK::OK;

                tmpPurchReqReport.PrepaymentDate            = (select firstOnly VendTrans
                                                                          where VendTrans.AccountNum  == purchLine.VendAccount
                                                                             && VendTrans.DocumentNum == purchLine.PurchId).TransDate;
                tmpPurchReqReport.PaymentDate               = PurchTable::find(purchLine.PurchId).paidDate();
            }
            else
            {
                select firstOnly lastPurchLine order by RecId desc
                           where lastPurchLine.ItemId == purchReqLine.ItemId;
                this.setFieldLastPurch(lastPurchLine);

                inventTrans.clear();
                this.setFieldFirstPackingSlip(inventTrans);

                tmpPurchReqReport.QtyRemain                 = purchReqLine.PurchQty;
                tmpPurchReqReport.TotalQtyReceive           = 0;
                tmpPurchReqReport.CloseStatus               = "@SYS80095";
                tmpPurchReqReport.LeadTimeStatus            = MK_NoneOK::OK;
                tmpPurchReqReport.PrepaymentDate            = dateNull();
                tmpPurchReqReport.PaymentDate               = dateNull();
            }
            
            
            //queryBuildDataSource.addSortField(fieldNum(custTable,AccountNum),SortOrder::Descending)
            tmpPurchReqReport.insert();
            


        }

    }


}

how to insert but order by tmpPurchReqReport.PurchReqId?

because in my program PurchReqId not list..

Printing portions of same report to multiple printers (call back function to Rich UI while rendering)

$
0
0

Scenario (an example)

I have a 10 page SSRS Report (which has DP, Controller, etc.) that i would like to print to multiple printers. First 3 page goes to Printer A, Next 3 goes to Printer B, and so on.

Also, it is ideal, after printing the first 3 pages, if user gets a dialog asking to which printer (among the list of printers) the next 3 pages should print and so on.

In my research, i could not find a code segment that i could use to check this (example check what page number is going to print now or something like that)after report has already been rendered to Printer. I'm not looking for something before rendering or after rendering. I'm looking for a call back mechanism to Rich Client / Form UI while report is actively being rendered to printer.

Any suggestions / tips would be highly appreciated.

Compile and Compile forward

$
0
0

Hi All,

What is the difference between Compile & Compile Forward ? When we used Compile Forward.

Can you please give more shed on this.

Thanks!

Regards,

-Arpan Sen

Access denied to method getRolesForUser in class SysUserManagement for a nonadmin user

$
0
0
I was using the following piece of code to fetch all the Roles a user possesses which include both its own roles and also the roles from its AD Groups.
UserId userId = curuserId();
List roles = new SysUserManagement().getRolesForUser(userId);
The above code works fine for a System admin user. But if AX is opened using the credential of an AD User who is not registered in AX but belongs to one of the AD Groups already registered in AX, (this user is created in UserInfo with a '$' sign), in that case executing the code gives this error:-
Access denied to method getRolesForUser in class SysUserManagement.
How to get rid of this error?
I need to get the Roles of each user once he logins to AX. I will check some privileges accordingly.
Thanks & Regards.
Sagnik.

Owner of files generated by aif outbound ports

$
0
0

Hello everyone,

I want to know who is the one who creates files when we launch an outbound port service (with File system adapter). Is it the aos or the user? I mean if for example the user who calls the service doesn't have access to folder specified but the aos does, will file be created ?

I tried to debug the process but I can't figured out where the access is verified? Any ideas?

The purpose is to create a folder where these outbound files can be created but only aos and special user (not necessary the ones who launch service) can access to it.

Thx in advance.

Import of Fee Journal Via Excel

$
0
0

Hi,

I am trying to import Fee Journal data using Excel Add-in and getting following error

The value in field VoucherNumberSequenceTable is invalid.

Please Advise.

Thanks

Pallavi


                       

What technique's can I apply to make a Display Method selectable in the grid?

$
0
0

Often users are referencing display methods and the need to have them filterable in the grid. In most cases an advance filter can work around this. I have one case where this doesn't work at all.

In the form WHSReleaseToWarehouse there is a field named displayQtyLeftToReleaseDelta which is a display method.

It relies on the datasource WHSInventTransSumDimSO which is a view named WHSInventTransSumDim

The view WHSInventTransSumDim is based on InventTrans table.

The method displayQtyLeftToReleaseDelta returns the quantity from a static method named WHSTmpReleaseToWarehouse::calcQtyLeftToReleaseDelta

The WHSTmpReleaseToWarehouse temp table is always empty when I open it in the table browser. This is where it seems AX populates it in memory only.

So that is a very basic break down of the display method without drilling any further to what is going on beyond calcQtyLeftToReleaseDelta.

I know a new data source will need to be added to the WHSReleaseToWarehouse form but the way I've been going about it is producing incorrect quantity values.

What is the best way to take the data returned from that display method to be filterable in the grid?

Any feedback is appreciated.


Panel for selecting user groups

$
0
0

Hi All , 

I have Tab control . Please Find the below Pasted Screen Shots.

(1) User :   TabPage  

(2) UserGroups:  TabPage 

Please note that In [ User ] Tab Page .  I have selected a User [ADMIN]  and similarly

have assigned a group to the User [ADMIN] .

But My Requirement is when I select any another user  then in [USER GROUP]  under selected groups panel it should be empty so that I can assign any other group .

Please provide me code for this.

for your reference I am using the below code : 

void init()
{
#ResAppl

sysListPanel = SysListPanelRelationTableCallback::newForm(element,
element.controlId(formControlStr(Z_UserGroupForm, Usergroups)),
'@NIT139', '@SYS57280', #ImageUsergroups,
tablenum(UserGroupList),
fieldnum(UserGroupList, UserId),
fieldnum(UserGroupList, GroupId),
tablenum(UserGroupInfo),
fieldnum(UserGroupInfo, Id),
[fieldnum(UserGroupInfo, Id), fieldnum(UserGroupInfo, Name)],
0, '',
identifierstr(Validate), '', '');

super();

sysListPanel.init();
}

Regards ,

Nishath Salman 

Error when trying to add an azure connector

$
0
0

Hello,

In order to try out AX, I created a project under lcs and wanted to link my MSDN azure subscription.

Under Project Settings -> Azure Connector I clicked the (+) sign and inserted my Azure subscription ID.

In the next step I am supposed to download the certificate for the connection.

when I click the "Download Certificate" button I get a 401 access denied error from the server.

Any help will be appreciated.

Best Regards

George

Changes lost after checking-in menu items

$
0
0

Hi all,

  Recently, I am experiencing very strange behaviour with menu items and TFS.

  More specifically, I made changes on several menu items and checked them in all at once.  Unfortunately, the changes on half the menu items were lost.  If I go on the menu items where I have lost the changes and view the history, the latest changeset is not listed.  This leads me to believe that these menu items were NOT even checked in while the rest were for some reason or another.  However, I did not receive any errors or warnings during the check-in.

  Furthermore, if I check-out one of the menu items where I have lost the changes, do the changes again and check-in, sometimes it works.

  Has anyone encountered this behaviour before?  Why is this happening?  I have only noticed this happening on menu items till now only.

Purchases ledger

$
0
0

Please assist as to what could be the problem / what to do 

I'm getting an error when selecting an item "object not initialized"

setup issue in number sequence

$
0
0

Hi all,

         While Some sort of failure is occurring and NO items are being created. The Loc8 interface is being executed, but no XML is sent and no item is added to ecoresproduct or inventtable. I have figured out it may be due to setup issue in numbersequence but how to solve this ???

Thanks&Regards

  Adam

Viewing all 17532 articles
Browse latest View live