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

System configuration to run d365 VM & how to download the vm for personal use.

$
0
0

I am in process of getting system for installing the d365 VM available on LCS.

As you know that Ax is Memory hungry :-), so I have to go with 32 GB RAM.

Now when you go with 32 GB ram the cost really goes high, only way to control is to go to AMD.

I just learnt that AMD 7 ryzen 1700 will  support Hyper v ,however will not support below features.

1. Nested virtual machines & 

2. SHielded virtual machines.

I am not sure if these are features required for d365 VM available at LCS .

Seek your help to let me know if i can run d365 VM on LCS on a AMD Ryzen 1700.

Also please let me know any other cheap configuration you may have build to run d365 VM, always happy to bring down cost with no reduction in performance.

Additionally please provide a solution on how can one download the vm for personal user , i dont want to use my organizations email instead want to use my personal email.

Thanks

Mav


Passing RunBaseBatch parm setter

$
0
0

Hi all

 

Running AX 2012 R3 CU9.

 

Having a small issue with an SSRS print-to-file report I'm running in batch.In the following example, TEE_Register_SubmitToLangdons class extends RunBaseBatch.

 

TEE_Register_SubmitToLangdons.parmJournal() is a getter/setter method I've created in that class in order to filter the output to only the variable journal ID.

 

I've confirmed if I manually call parmJournal() in the run() method

of the class, it will filter as expected. However I need to be able to do it at runtime when the job is run, which would involve calling it on the job.

 

For some reason even though I call it (as shown bold below) the value passed seems to be a blank string.

 

static void TEE_Register_SubmitToLangdonsJob(Args _args, str _journal)

{

    BatchHeader batHeader;

    BatchInfo batInfo;

    TEE_Register_SubmitToLangdons rbbTask;

    str sParmCaption = "Submit to Langdon's " +

        date2str(today(),321,DateDay::Digits2,DateSeparator::Slash,DateMonth::Digits2,DateSeparator::Slash,DateYear::Digits4);

    ;

    rbbTask = new TEE_Register_SubmitToLangdons();

    _journal = "EXP-00009";

    rbbTask.parmJournal(_journal);

    info(rbbTask.parmJournal());

    batInfo = rbbTask .batchInfo();

    batInfo .parmCaption(sParmCaption);

    batInfo .parmGroupId(""); // The "Empty batch group".

    batHeader = BatchHeader ::construct();

    batHeader .addTask(rbbTask);

    batHeader .save();

    info(strFmt("'%1' batch has been scheduled.", sParmCaption));

}

 

How do I get this to pass correctly?

Any help would be much appreciated, thanks very much in advance.

Cheers

Luke

 

To display only the modified field in SysDatabaseLog from

$
0
0

Hi All,

i have requirement to show only the modified field in "Database log(SysDataBaseLog  form)" History tab. By default, Database log show all the fields in Grid with data in value , previous value field.

My client want to see only the fields that are modified and hide/Remove rest of the fields.

Refer below screen shot: 

in buildContents form method(SysDataBaseLog form) i am getting the current value, previous value and field id for the modified fields. But am not able to identify the location where all the fields are dynamically fetch and show on the form. 

Please some one help me with this requirement.

Thanks in advance!!!

Epson TM-T88IV Arabic font not printing in same line

$
0
0

When I try to print Arabic font and device font(FontA11) in same line the output from printer

Was different like Arabic below, English above.

If i Try to print in same line device font devide the Arabic font( like half Arabic above half below.device font clear perfect.but Arabic font not in a same line)

Note:c# and ms word

Printing dynamic parameters (AX 2012 / SSRS)

$
0
0

Hi Friends

I have try to apply this script http://dev.goshoom.net/en/2014/09/showing-dynamic-parameters/

to my LedgerJournalPostControlDP

but I am getting this Error  MyQueryUtils is not a class. when complying this class  public void processReport()

and the only line I have added  

//Added by Jamil Alshaibani in 26/3/2019

 tmpSysQuery = MyQueryUtils::rangesToTable(this.parmQuery());

// END

How to make the MyQueryUtils as not a class and what I have to write in it.

Best Regards

Jamil Alshaibani

building queries

$
0
0

hi,

please am trying to build a query using the code below

static void Job2(Args _args)
{
 Query custTransQuery = new Query();
    QueryBuildDataSource custDataSource;
    QueryBuildDataSource transDataSource;
    QueryBuildDataSource businesstransDataSource;
    QueryBuildDataSource reversalTransDataSource;

    custDataSource = custTransQuery.addDataSource(tableNum(CustTable));
    custDataSource.addOrderByField(fieldNum(CustTable, DataAreaId));
    

    transDataSource = custDataSource.addDataSource(tableNum(CustTrans));

    transDataSource.addLink(fieldNum(CustTable, AccountNum), fieldNum(CustTrans, AccountNum));
    // use outer join because customers without transactions are included
    transDataSource.joinMode(JoinMode::OuterJoin);
    
    transDataSource.addRange(fieldNum(CustTrans, TransType)).value(strFmt('((%1 != %2) && (%1 != %3))',
                                                                            fieldStr(CustTrans, TransType),
                                                                            any2int(LedgerTransType::ExchAdjustment),
                                                                            any2int(LedgerTransType::Settlement)));
    transDataSource.addOrderByField(fieldNum(CustTrans, DataAreaId));
    transDataSource.addOrderByField(fieldNum(CustTrans, TransDate));
    transDataSource.addOrderByField(fieldNum(CustTrans, Voucher));
     businesstransDataSource = transDataSource.addDataSource(tableNum(DefaultDimensionView1));
    businesstransDataSource.joinMode(JoinMode::InnerJoin);
    businesstransDataSource.addLink(fieldNum(CustTrans, defaultdimension), fieldNum(DefaultDimensionView1, defaultdimension));
       reversalTransDataSource = transDataSource.addDataSource(tableNum(TransactionReversalTrans));
        reversalTransDataSource.joinMode(JoinMode::NoExistsJoin);
        reversalTransDataSource.addLink(fieldNum(CustTrans, TableId), fieldNum(TransactionReversalTrans, RefTableId));
        reversalTransDataSource.addLink(fieldNum(CustTrans, RecId), fieldNum(TransactionReversalTrans, RefRecId));
        reversalTransDataSource.addRange(fieldNum(TransactionReversalTrans, Reversed)).value(enum2str(NoYes::Yes));

    info(custTransQuery.dataSourceNo(1).toString());
}

but the results does not include the defaultdimensionview1 table .

i would be grateful if anybody can help me thanks

Custom RDP: CustDueDetailReportDP

$
0
0

Hello master, I have a problem. I got request to add Customer name and invoices description to Detailed Due Day Report. You can access the report in AX with this steps: AR (Account Receiveable) > Report > Status

I checked and i found that report use CustDueDetailReportDP as the RDP. But i'm stuck about how to relate tables inside that RDP with another table that contains customer name and invoice description. I think i have to relate it to CustInvoiceJour or CustInvoiceTrans.

I already create 2 more columns to the temporary table for the report with "String" as the type but dunno how to relate the tables inside the RDP.

Can you show me how to relates the tables? You don't have to write the column name exactly like mine, you can use random name and i'll rename it according to my needs. Any help will be appreciated :)

FormPart methods on event handler

$
0
0

Hi,

I want to know how to access methods defined on form called from form part in an event handler class. I am trying to access a form method on customer account modified event as below but it is saying access violation and object reference set to an instance of an object. Please help.

 FormContainerControl     MultiLine            = formRun.design(0).controlName('OIFormProductLineMultiselectFormPart');
 FormRun                 formRun1 = formRun.design(0).control(formRun.controlId('OIFormProductLineMultiselectFormPart')).formRun();

   if(formHasMethod (formRun1,identifierStr(test)))
            {
                formRun1.test();
            }

Thanks.


How can I disable DeleteAction on query?

$
0
0

I want to delete about 40 000 records from table with 200 000 records. This table has DeleteAction with properties = Cascade.
I made query (not select!!!, not delete_from !!!) but it is strange becouse time for deleting each 1000 rows increasing !!!

new QueryRun(query);
while(queryRun.next())
{
MyTable= queryRun.get(tableNum(MyTable));
MyTable.doDelete();
}

Diff: 18,03 seconds (Sum: 18,03 seconds) : DeleteMethod BEFORE
Diff: 1,74 seconds (Sum: 19,77 seconds) : DeleteMethod row=1
Diff: 5,36 seconds (Sum: 25,13 seconds) : DeleteMethod row=1000
Diff: 7,55 seconds (Sum: 32,67 seconds) : DeleteMethod row=2000
Diff: 9,86 seconds (Sum: 42,53 seconds) : DeleteMethod row=3000
Diff: 12,03 seconds (Sum: 54,56 seconds) : DeleteMethod row=4000
Diff: 14,39 seconds (Sum: 68,95 seconds) : DeleteMethod row=5000
Diff: 18,05 seconds (Sum: 87,00 seconds) : DeleteMethod row=6000
Diff: 21,22 seconds (Sum: 108,22 seconds) : DeleteMethod row=7000
Diff: 24,78 seconds (Sum: 133,00 seconds) : DeleteMethod row=8000
..
Diff: 67,08 seconds (Sum: 741,38 seconds) : DeleteMethod row=20000
..
Diff: 96,05 seconds (Sum: 2 151,22 seconds) : DeleteMethod row=37000
Diff: 96,70 seconds (Sum: 2 247,92 seconds) : DeleteMethod row=38000
Diff: 97,23 seconds (Sum: 2 345,16 seconds) : DeleteMethod row=39000

Why time for deleting first 1000 rows is about 5 second but time for deleting rows 38001-39000 is about 100 seconds???


When I changed DeleteAction from Cascade to None all Diff is normal, about 0.6 seconds / 1000 rows. How can I disable DeleteAction on query (something like skipDeleteAction) ?

CustDueReportDetail RDP

$
0
0

Dear Master,

I have problem to join CustInvoiceJour and CustInvoiceTrans into CustDueReportDetailDP. Can you show me how to do this?

Regards,

Willy

Adding callback method for .net event in x++

$
0
0

So the System.Net.ServicePointManager has the function, to add a callback method for the ServerCertificateValidationCallback method/event

I want to add my own callback method to this in x++.

The background is the following post, where this is appearently done in AX2012:

https://community.dynamics.com/ax/b/dynamicsax_wpfandnetinnovations/archive/2012/11/25/making-calls-to-secure-web-services

In AX 2012 it can be done the following way:

System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate(object sender,
                         System.Security.Cryptography.X509Certificates.X509Certificate certificate,
                         System.Security.Cryptography.X509Certificates.X509Chain chain,
                         System.Net.Security.SslPolicyErrors sslPolicyErrors) { return true; };
This is not possible to do the same way in D365FO/AX7.
The += operator is only allowed with the eventhandler(...) pattern, not with delegate(...)
I have tried several takes, including trying to create a new System.Net.Security.RemoteCertificateValidationCallback object, but can't find a way to make it even compile.
Does anyone have experience with this?
I would prefer to keep the code in x++, and not having to make it in c#, but if that's the only option I may have to go for the red pill

Kind Regards

Tommy Axelgaard

Pre event in initFromSalesLine on table CustInvoiceTrans

$
0
0

Hi All,

I saw below code in 'CustInvoiceTrans"

class CustInvoiceTransEvents
{
    /// <summary>
    ///
    /// </summary>
    /// <param name="args"></param>
    [PreHandlerFor(tableStr(CustInvoiceTrans), tableMethodStr(CustInvoiceTrans, initFromSalesLine))]
    public static void CustInvoiceTrans_Pre_initFromSalesLine(XppPrePostArgs args)
    {
        SalesLine   salesLine = args.getArg("salesLine");
        CustInvoiceTrans    custInvoiceTrans = args.getThis();
        SalesLine_IN    salesLine_IN = SalesLine_IN::findBySalesLine(salesLine.RecId);
        ;
 
        custInvoiceTrans.AcxMaximumRetailPrice_IN = salesLine_IN.MaximumRetailPrice;
    }
 
}
 
Here what i understand , we going to update value in custInvoiceTrans.AcxMaximumRetailPrice_IN when initFromSalesLine is called.
 
My question is after update the value in custInvoiceTrans.AcxMaximumRetailPrice_IN then it's exceute the standard code in initfromSalesLine?
 
Please give me more shed on this.
 
Thanks!

TempDb multiselect Lookup

$
0
0

Hi,

I am using multiselect lookup on tempdb. While setting queryRun.setCursor(OITmpTable) it gives error object reference set to an instance of an object. please help and have a look at my code. Please note temptable has data in it .

OITmpTable insertTmp(Map _unitUsageInfoItems = null)
    {
        Query       query;
        QueryRun    queryRun;
        oiInventProductLine oiInventProductLine;
        queryRun  = new QueryRun(this.productLineQuery());
        while (queryRun.next())
        {
        
            oiInventProductLine = queryRun.get(tableNum(oiInventProductLine));
            if  (_unitUsageInfoItems == null ||
                (_unitUsageInfoItems.exists(oiInventProductLine.InventProductLineId) &&
                _unitUsageInfoItems.lookup(oiInventProductLine.InventProductLineId) > 0))
            {
            
                OITmpTable.clear();
                OITmpTable.initValue();
                OITmpTable.InventProductLineId = oiInventProductLine.InventProductLineId;
                OITmpTable.insert();
            
            }
        }
       
        select OITmpTable;
        return OITmpTable;
        
    }

  void addCtrl(Map _unitUsageInfoItem = null)
        {
            query    query;
            QueryRun queryRun;
            QueryBuildDataSource  qbds;
            OITmpTable.setTmpData(this.insertTmp(_unitUsageInfoItem));
            
            query = new query();
     
            qbds = query.addDataSource(TableNum(OITmpTable));
            qbds.addSelectionField(fieldNum(OITmpTable, InventProductLineId));
            
            queryRun.setCursor(OITmpTable);
            //queryRun.setRecord(OITmpTable);
            MultiselectCtrl.set(conNull());
            MultiselectCtrl.refreshQuery(query);
            MultiselectCtrl.refreshQueryRun(queryRun);
           
            
        }


Posting invoice via web service

$
0
0

We have integrated our shipping application with Dynamics AX 2012 R3. Customer invoices are made in our shipping application and posted

to dynamics  AX after making a sales order via web service. We need to call the web  service 3 times to post a invoice in AX ie create, confirm and post.

Any possibility to call web service once and do a posting in single web service call. Please help.

rgds

Wilson John

Accessing Data Entity behind AX DataTable, and capturing certain fields from it

$
0
0

Dear fellow coders, 

I'm currently a few weeks into my Chatbot Integration with Dynamics AX. I've managed to get a few functionalities working already, but now different questions are rising up.

Before, my main concern was getting everything connected (1 C# .NET Bot, 1 C# .NET app for authenticating and passing requests to and from AX, and finally a custom Dynamics FO project with some custom Services defined). 

However now a next step would be to get all the BOM-lines for a certain production Order. I have found the table where I can access these, but I'm still to write a single query on them.. I'm certainly open to exploring options using OData, however then the question becomes in wich Data Entities are these stored? 

I'm sorry if my question is to vaguely formulated, and please let me know if there's anything I can do to provide more clarity. In the below image you can see a screenshot of the in-browser Table Browser for ProdBom. The data I wish to capture and show is stored in here. For a first step, I'd like to be able to export all rows filtering on ProdID & BomID. 

Thanks in Advance, 

Adil 


Architecture diagram debug

$
0
0

Hello, 

please help me to breakdown this diagram (explanation), point wise

Data Source for SSRS

$
0
0

Hi,

I am very new for Dynamics 365. This might be very basic question for most of you. I have been reading about Dynamics 365 FO for last 2 days. As per my understanding looks like Dynamics 365 is available only in Cloud and transaction database is not accessible to anyone and for reporting purpose we need to entity store & power Bi embedded. Incase if i want to use SSRS for reporting what would be data source for SSRS reports?

Below are the understanding/assumptions/questions - Can you correct me if i am incorrect

1. 365FO transacational DB is not accessible for anyone?

2. We can only use Power BI embedded for reporting?

3. If i want to use SSRS what would be data souce for SSRS reports?

4. Can i have On premises data warehouse for 365FO

Thanks in advance. 

SA

While uploading xml file into ax, vendor code is 0100 but it is reading as 100. How to resolve?

$
0
0

While uploading xml file into ax, vendor code is 0100 but it is reading as 100. How to resolve?

How to send email in D365 ax

$
0
0

Hello Expertise  ,

I have written a batch job for getting some record and added this batch job in Batch job form.

Now i need to send these record in mail , what is the next steps i need to follow after added this batch job in form.

Please suggest .

Thanks

Can i use Event handlers (Pre OR Post ) instead of CoC ?

$
0
0

Hi All,

Can you please let me know the CoC is behave like Event handlers (Pre OR Post ) ? Means can i use Event handlers (Pre OR Post ) instead of CoC ?

Please give me more shed on this.

Thanks!

Viewing all 17532 articles
Browse latest View live


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