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

Error while running test class in Test explorer

$
0
0

Hi,

I am facing an error while running test class through test explorer for Data entities, I tried running standard classes ,they are also throwing the same error , Can you guys guide where i am missing the step.

Thanks & Regards,

M DerikIbsen


How to set up automatically the SysQueryForm by code at form start?

$
0
0

I have been asked to set up the "Advanced filter or sort" (the one in the OPTIONS section of every form, in the AOT it's called SysQueryForm) for a certain form that I have created.

(please, this is what I have been precisely asked to do, they won't accept a similar alternative)

When the user is using my form and wishes to go to OPTIONS->"Advanced filter or sort"   he/she should find the filter already set up with some fields.

 I should add a series of blank filters table-->field and the user should only select the value:

It should be something like this, but I have to manually select the tables and fields that appear for the user:

This is actually from my form, I don't know why these two fields appear here, I just noticed that they belong to one index  of the RouteVersion, is there a way to remove them and add the ones i want?

Can I create a clone of the SysQueryForm on my form of which I can control events and inputs/outputs?

$
0
0

I have to create a FILTER button on my form that opens a form like the SysQueryForm, in which the user selects some fields and conditions, but before filtering the form, I have to make another query (on only some datasources) and initialize some fields of the selected records.

I'll explain better.

I have a form, with different datasources:

       -DS 1

       -DS 2

       -DS 3

Datasource 3 is currently an EMPTYtable, that I have to populate through the Filtering procedure. (No I'm not crazy, that's what they asked me to do, I have to initialize a table during the filtering)

On the form, at the start, I filter the records with a query such as:

 SELECT Ds1.field1,ds1.field2, ds2.field1, ds3.field1

From DS1

join DS2 on...

join DS3 on....

Where DS3.field1= 0

This query gives no results since the 3rd table (DS3) is empty, so at start the query  and the form are empty.

Now, from here:

-The user will click on my "Filter" button --> that has to open a form like the SysQueryForm. (which is by default in every form in OPTIONS>Advanced Filter or Sorting).

-In this form he adds/selects some filtering condition, (for example all records with an ItemId that contains "XYZ")

-After he inputs the request I have to select the records of the previous query, excluding the DS3 parts, that respect the user's condition and initialize the respective values of the DS3, which means I have to run this query:

SELECT Ds1.field1,ds1.field2, ds2.field1

From DS1

join DS2 on...

Where ItemId contains "XYZ"

-This query is in theory not empty, and for the selected records I have to initialize the values in the DS3:

         DS3.field1=0

After which the first query will not be empty anymore.

        

 After I have initialized them, the form should now be not-empty, populated with the records from the first query.

I have to tap somehow in the SysQueryForm input/outupt  and event system, but I don't know how, so I thought maybe I can just clone it, is that even possible?

(sorry for writing such a long text)

Any suggestion is appreciated, thank you.

How to get parent Control from AXFormControl?

$
0
0

Hi,

I create method which get the parent control from fromControl

  FormControl  getParentControl(FormControl _formControl)
        {
            FormControl cntr;
            cntr=_formControl.parentControl();
            return cntr;
        }

then I call this method :

AxFormControl _axFormControl
 formControl control;
 control=getParentControl(_axFormControl as formControl);

But , I get error in this instruction : " control=getParentControl(_axFormControl as formControl);"

Alert msg if any changes made in feild

$
0
0

hello experts,

I want to get  the alert msg if any  changes made in   feild  form level 

thanks in advance.

regards,

pradeep.

Regenerate staging table D365FO on premises

$
0
0
Hi,

Does anyone know if it is possible and which dll (method) call "Regenerate staging table" that create staging table xml file. I
already created Entity with .Net, but I can not find out which dll does do this.
Thank you.

Selecting metadata for single entity instead selecting complete metadata using /data/$metadata

$
0
0

We could retrieve entire metadata for the Dynamics 365 Finance and Dynamics 365 Supply Chain Management without any issue using /data/$metadata URL. However the response size is approximately 19 MB which is very big size to process in few seconds. We are looking to retrieve the metadata for the specific entity instead for all. For example we have

Currencies
as entity in the
/data
 results and we have entity definition available in 
/data/$metadata
results for
Currency
. Is there any way to retrieve metadata for only
Currency
and processing instead loading complete metadata.  Any pointers will help. Thank you in advance.  

Filter Enum value by fields on grid

$
0
0

Hi all,

I need to filter BaseEnum value by fields in a grid as below

For ex: For the Type is Allowance and Level is Item, I want the BaseEnum ApplyAs just shows 2 value: Global Charge and Global Discount.

Please help.

Thank you.


SSRS Report + sort by expression

$
0
0

Hello

I add this expression on matrix on ssrs report:

=IIF(Parameters!BOMCalcTransDetailDS_parmOrderByCalc.Value = "TRUE", Fields!PriceCalcId,  Fields!LineNum)

I'm sure that BOMCalcTransDetailDS_parmOrderByCalc.Value returns TRUE of FALSE but report returns this error:

Sort expression used on 'MainTablix' returns a type data that is not valid. (rsInvalidExpressionDataType)

I want order by field PriceCalcId or linenum depend on parameter OrderByCalc.

Somebody can help me?

thanks

conversion of currency

$
0
0

 hello experts,

i have wriiten the below code for converting  given currency into  default currency . i am geeting wrong value, plse hlp me out.

[
SysEntryPointAttribute(false)
]

public void processReport()
{
SintoPCurrencyContractClass Contract;
Contract= this.parmDataContract();
accountNum=contract.parmAccountNum();


while select * from vendTrans

where

vendTrans.AccountNum ==accountNum


{
SintoPCuurencyTmp.AccountNum = vendTrans.AccountNum;
SintoPCuurencyTmp.Voucher = vendTrans.Voucher;
SintoPCuurencyTmp.AmountCur=vendTrans.AmountCur;
SintoPCuurencyTmp.Invoice=vendTrans.Invoice;
SintoPCuurencyTmp.CurrencyCode=vendTrans.CurrencyCode;
SintoPCuurencyTmp.IndAmountCur = any2real (Currency::amountCur2MST (vendTrans.AmountCur,"jpy"));


currencyExchangeHelper = CurrencyExchangeHelper::newExchangeDate(Ledger::current(), systemDateGet());
SintoPCuurencyTmp.IndAmountCur = currencyExchangeHelper.calculateCurrencyToCurrency('INR', vendTrans.CurrencyCode,vendTrans.AmountCur,true);


// SintoPCuurencyTmp.IndAmountCur=vendTrans.AmountMST;
// SintoPCuurencyTmp.IndCurrencyCode=vendTrans.CurrencyCode;
SintoPCuurencyTmp.VendName=vendTrans.vendTableName();


SintoPCuurencyTmp.insert();
}

}

Can I create a clone of the SysQueryForm on my form of which I can control events and inputs/outputs?

$
0
0

I have to create a FILTER button on my form that opens a form like the SysQueryForm, in which the user selects some fields and conditions, but before filtering the form, I have to make another query (on only some datasources) and initialize some fields of the selected records.

I'll explain better.

I have a form, with different datasources:

       -DS 1

       -DS 2

       -DS 3

Datasource 3 is currently an EMPTYtable, that I have to populate through the Filtering procedure. (No I'm not crazy, that's what they asked me to do, I have to initialize a table during the filtering)

On the form, at the start, I filter the records with a query such as:

 SELECT Ds1.field1,ds1.field2, ds2.field1, ds3.field1

From DS1

join DS2 on...

join DS3 on....

Where DS3.field1= 0

This query gives no results since the 3rd table (DS3) is empty, so at start the query  and the form are empty.

Now, from here:

-The user will click on my "Filter" button --> that has to open a form like the SysQueryForm. (which is by default in every form in OPTIONS>Advanced Filter or Sorting).

-In this form he adds/selects some filtering condition, (for example all records with an ItemId that contains "XYZ")

-After he inputs the request I have to select the records of the previous query, excluding the DS3 parts, that respect the user's condition and initialize the respective values of the DS3, which means I have to run this query:

SELECT Ds1.field1,ds1.field2, ds2.field1

From DS1

join DS2 on...

Where ItemId contains "XYZ"

-This query is in theory not empty, and for the selected records I have to initialize the values in the DS3:

         DS3.field1=0

After which the first query will not be empty anymore.

        

 After I have initialized them, the form should now be not-empty, populated with the records from the first query.

I have to tap somehow in the SysQueryForm input/outupt  and event system, but I don't know how, so I thought maybe I can just clone it, is that even possible?

(sorry for writing such a long text)

Any suggestion is appreciated, thank you.

Custom service take over 3 minutes and doesn't return a response

$
0
0

Hi everyone;

I have a custom service that create general ledger in D365FO with thousand lines and takes over three minutes to run. The execution ends until the last line of service operation method; however, it does not return a response to the service that invoked it (External service). If the execution take less than 3 minutes, it returns the answer correctly.

I have configured the timeout on the client 10 minutes but it does not return a response.

Thanks in advance.

Getting Error if i Try to save the form

$
0
0

Hello  Experts,

 I am getting the error if i tried to save the form  

Regards,

Pradeep.

Uploading attachment to current record in Dynamics F&O with the use of ODataUltility library c#

Import documents to attachments in dynamics f&o

$
0
0

The requirement is that documents that I send with all fields and tables must appear in attachments.

I was advised to use  Data management package REST API. but where I can get it ? Examples provided in this article looks like some post request but where is API ?

How it must be done in c# ?


SSRS report direct from SQL

$
0
0

What do you think about creating / customizing reports using SSRS with direct queries to SQL database, eg. CustAgingReport. Is this (sometimes) practiced? I’m asking because I’ve created something like this to check performance (using specific parameters value) and results are very efficient – report is ready dozens times faster than in AX

display method for date against itemid

$
0
0

Dear Experts,

I want to show Restest (same logic to manufacturing date or expiry date) against Item Number, right now we have manufacturing date and expiry date against the batch number.What will be the exact code. In above image i have given all code and datasource used for it, please check the above image. thanks in advance

Best Regards,

Shabir Ahmad

Retrieving the Custom fields and Custom entities added to Dynamics 365 Finance and Dynamics 365 Supply Chain Management in metadata using APIs

$
0
0

We tried adding custom field to the Dynamics 365 Finance and Dynamics 365 Supply Chain Management for entities we are creating. Our expectation is to have these fields part of metadata when retrieved after custom field addition. But we could not see the field in the metadata and also in the data for that particular entity. 

Below is the example for better understanding the use case we are trying.

We added new Employee (Human resources => Workers => Employees) named "Prashanth" and added new field named "Test Mobile Number". The employee object created with new field and available on UI. Here when we tried to retrieve the employee "Prashanth" using OData API using https://xxxxxxxxxx.cloudax.dynamics.com/data/Employees?$filter=FirstName eq 'Prashanth' request URL the result does not have field "Test Mobile Number" added. We also could not find this field in the metadata (/data/$metadata) results. Similarly for custom entities which are not available in metadata. 

Any pointers will help us on finding the custom fields and custom entities added using APIs instead looking into the application through instance UI. Thanks in advance.  

How to delete an object from a crashing Dynamics Ax 2009 AOT?

$
0
0

Hi,

Yesterday I had to add a simple view to a Dynamics Ax 2009 test environment and after that the AOS starting crashing without giving time to delete the view. There is a way to delete that object without the client?

Thanks

TreeNode::FindNode() - Form DataSource Methods

$
0
0

Hi,

I have to find the extended dataSource from Data Type (EDT) display method, so in Dynamics AX2012 i aleady used  the code bellow  and it works very well.

 Now, i want to put the same code in Dynamics 365 FinOps, it does not work. MemberFunction is always "NULL".

Help please!! have you any suggestion to resolve it?

thank you.

BR

Viewing all 17532 articles
Browse latest View live


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