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

Sending email with attachment using SMTP in D365

$
0
0

I am trying to send the file on Email with the help of SMTP Code.

Here is my code- 
it is not working in pdf, word format but it is working in text format

Please suggest me!


D365 or AX 2012 - Push Notifications

$
0
0

If there are any features in AX which allow for push notifications (workflow)?

Import data from external tool

$
0
0

Hi all,

I need to periodically import production data such as quantities and times from an external tool via ascii file into D365. Is it possible to do that even without manual intervention (batch job)? currently we are still working with an on-Prem implementation... An example in D365 would be great ...

Hopefull

Christian

Fetching user temp folder

$
0
0

Hi All,

I am working on AX 2012, I am trying to fetch the temp folder path using System.IO.Path::GetTempPath(). when I use this in a job, I fetch the temp folder of logged in user but when I use this in controller class, I fetch the temp folder of AOS user. My developer options "execute business operations in CIl" is turned off. Is there a way that I can get the logged in user temp folder in Controller classes?

Object reference not set to an instance of an object

$
0
0

Hi All, 

In D365 F&O, we are doing extension based development. I am getting the error 'Object reference not set to an instance of an object' while opening the form. There is no compilation errors. I have done full build also. But, still no luck.

Errors are coming for some of the forms and some of the forms are working fine.

Please share your ideas regarding this issue.

Thanks,

Temporary table as form datasource - Form Extension

$
0
0

Hi,

I have added a temp table in form extension. When I fill data through event handler or form extension class, Only a single record (first record alone) is displayed in grid. 

Form init() -In Form extension class 

void init()

{

next init();

TempTable.linkphysicaltableinstance(MyClass::populateData());

}

Please help.

Change method signature

$
0
0

I need to change a method signature (add more parameters). In 2012 it's easy but in 365 I'm struggling a little bit. 

By what I've read in the forum you can't change method signature even in extension, and also reading the documentation hasn't helped.

In my case in a few words I need to add 3 parameters to this existing method. This is the method where I need to pass my extra parameters:

  

Staying up to date with Microsoft changes as a developer

$
0
0

I noticed some changes, which I will mention shortly. I was wondering where or how I, as a developer, can stay up to date with changes that Microsoft make that affect my work. I mean I am sure there are many more that I am not aware of and that worries me a bit.

The changes I noticed:

  • Enums. For a brief moment the Enum Value property for new enums I create in VS was gone. And then an enum without an element with Enum Value = 0 can now be left open on the front end. Which I am reasonably sure was not the case a few months ago. Can someone explain or comment on the implications of this? Any page to read?
  • Something about notifications to users. I had a working event handler method - its purpose was to simply display a warning message under certain circumstances. And then somewhere the message just stopped to appear. I debugged it to make sure - the line 
    warning('@XYZ:SomeWarning');
    get's fired, but it never displays on the front end. Any page to read on when notifications from code gets suppressed or best practices for where to put notifications? This specific case I fixed with 
    ...
    ValidateFieldEventArgs validateFieldEventArgs = e as ValidateFieldEventArgs;
    ...
    validateFieldEventArgs.parmValidateResult(checkFailed("@XYZ:SomeWarning"));
    ...
    
    I only recently discovered checkFailed...

Please note that I have three questions.

Please let me know if I am unclear.

Thanks for reading


How to override a customization on a table when inserting records to the table using Data Entity

$
0
0

I am using contact entity to copy data in to legal entity in the Data Management. I have some customized code on insert into that table, How can I override the customization when I insert records using data entity?

 

Thanks

Ann

Best alternate of Window Service for Ax 2012 integration scheduling

$
0
0

Hi Experts,

Right now we have some window services to sync outside application data (Sales order, transfer order, SO packing slip, TO shipment and SO invoice almost all the transaction related to stock transfer and sales order shipment... etc) to the dynamics ax 2012, But after 3 years here transaction has increase 10 times and these window service is not performing well and we are even not able to sync last day transaction till morning today, so we are not able to collect reporting on the time, Now I am planning to switch to new integration engine which should be very effecting and perform well , So I request you to please guide me if any best solution available in the market which can selected data from outside application DB and can able to call the web service, able to handle responses from the service call and I can schedule it, the first thing come in my mind is SSIS.

Waiting for your suggestions

cannot compare two enum in extension class

$
0
0

Hi all,

Actually on D365 8.1.3 PU23 we cannot compare enums on extension class. 

Have you any idea how to compare two enums ? 

Thanks

Declarint and overwriting varibles with different type

$
0
0

Have two table.

One standart Ax table, other one is dublicate (Test, CopyOfTest);

Declaring variables

Test test;

CopyOfTest cTest;

Do something like this will work?

test = cTest; ???

AX2012 VS FinOps BP Checks

$
0
0

AX 2012 raises a flag for several BP deviations such as

  • Missing alternate index
  • Primary key fields that are editable
  • Primary key fields that are not mandatory

FinOps BP Checks did not identify these. I checked all the items listed under BP settings in Dynamics 365 Options. What am I missing. How do I get it to perform those checks? Here are the monikers for BP Checks I am looking for.

#define.BPErrorTableOneIndexNotCluster(385)         // Tables with only one index must have it defined as a cluster index. Set the ClusterIndex property for the %1 table.
#define.BPErrorTableNoRecordIdIndexButUsed(405)     // The table %1 has no record ID index but uses it %2 times.
#define.BPErrorTableUniqueIndexError(406)           // Unique Index Error. Upgrade script required.
#define.BPErrorTableUniqueIndexByKernel(410)        // Kernel will construct a unique index for the table
#define.BPErrorTableOverlappingIndex(411)           // Index '%1' is overlapped by index %2
#define.BPErrorTableIndexWithoutFields(412)         // Index '%1' has no fields
#define.BPErrorTablePrimaryIndexNotUnique(413)      // Primary index '%1' allows dublicates.
#define.BPErrorTableTitleField1NotDeclared(415)     // Title field 1 not declared
#define.BPErrorTableSysDeleteFieldIndex(416)        // Unique index %2 contains field %3 with SysDelete configuration config key.
#define.BPErrorTableReplacementKeyNotSpecified(417) // Table having multiple Alternate Key must specify Replacement Key
#define.BPErrorTableTitleField2NotDeclared(420)     // Title field 2 not declared
#define.BPErrorTableTitleFieldDeprecated(421)       // Do not use a deprecated field as title field. Please select another title field.
#define.BPErrorTableIndexFieldDeprecated(422)       // Do not use deprecated field %1 in non-deprecated index %2. Please remove the field or deprecate the index.
#define.BPErrorTableTableFieldGroupDeprecated(423)  // Do not use deprecated field %1 in field group %2. Please remove the field from the field group.
#define.BPErrorTableCollectionRelation(425)         // Relation to table '%1' (using '%2') which is not in this table collection
#define.BPErrorTableCollectionSharedComp(430)       // Relation to table '%1' (using '%2') which is not in this table collection or Global
#define.BPErrorTableFieldNotInFieldGroup(435)       // Field is not a member of a FieldGroup
#define.BPErrorTableIndexDelConfigKeyConflict(437)  // Index %1 with DEL_ prefix has configuration %2 instead of SysDelete
#define.BPErrorTableFieldNotDefinedUsingType(440)   // Field must be defined using a type
#define.BPErrorTableDelConfigKeyConflict(441)       // Table %1 with DEL_ prefix has configuration %2 instead of SysDeletedObjects
#define.BPErrorTableDelPrefixConflict(442)          // Table %1 with SysDeletedObjects configuration key (%2) has no DEL_ prefix
#define.BPErrorTableFieldDelConfigKeyConflict(443)  // Field %1 with DEL_ prefix has configuration %2 instead of SysDelete
#define.BPErrorTableFieldDelPrefixConflict(444)     // Field %1 with SysDeletedObjects configuration key (%2) has no DEL_ prefix
#define.BPErrorTableFieldEnumIsMandatory(445)       // Enum field is Mandatory

Information About System Environment and Database

$
0
0

Hi, 

can anyone give me information about the the Systemintegration/Environment of D365FO ? Such as:

- Kind of Architecture 

- Kind of operating system 
- Eventually 3 tier design 

- Used DB 

- Registration and authentification via active directory 

Getting environment URL in d365

$
0
0

Using this
System.Uri host = SessionContext::Get_Current().Get_RequestUrl();


I get the full url such as enviromentname.com/?mi=SysClassRunner&prt=initial&debug=vs&cls=myclass&activityid=0eb3ea5c-bb0b-0002-bf0a-b40e0bbbd401&cmp=mycompany


Is there any way i can just get "enviromentname.com"


SysDictIndex is not Initialized - Error when migrating from Staging to target

$
0
0

Hi,

I am trying to migrate data from a custom entity (staging to target). but the system has thrown an error

SysDictIndex object not initialized.

Stack trace

(C)\Classes\DMFEntityWriter\write - line 142
(S)\Classes\DMFEntityWriter\runOnServerWriter - line 47
(C)\Classes\DMFEntityWriter\run - line 112
(C)\Classes\DMFEntityWriter\main - line 24
(C)\Classes\xMenuFunction\run
(C)\Classes\MenuFunction\run - line 85
(C)\Forms\DMFWriteData\Designs\DesignList\DMFEntityWriterBatch\Methods\Clicked - line 23

My target table has primary index still the code is not able to pick the index.

what is causing the issue?

Thanks,

Lakshmi

How to convert amount in figures to words in ax7 using x++?

$
0
0

Dear all,

Anybody know how to convert amount in figures to words?

I tried using 

tmptable.amountinwords = Global::numeralsToTxt(_ledgerJournalTrans.AmountCurDebit); but it is going to give like below.

ex: USD 23525.75  *** Twenty Three Thousand Five Hundred Twenty Five and 75/100. but i need like

Twenty Three Thousand Five Hundred Twenty Five and seventy five cents only

Find out Derived Table for a Parent(Abstract) table in AX 2012 R3

$
0
0

Hi all,

Just a small question, how do I find out the derived tables for a given Abstract(parent) table in AOT, means how many tables are inheriting the abstract table.

Also that after deploying the AX Project to AOT, does my project object still be showing in bold, means all the tables, classes edited/created by me will be shown in bold?

Any idea please.

select statement filter based on the values in List Object

$
0
0

Hi,

I have SSRS paramter (Multivalue) which is being passed in DP class as a List Object. Now in the DP class, I want to filter a transaction table based on the values  of List Object.

List Object is a Customer Account Number.  

How do i effectively write the select statement  to get the result based on above requirement? I want to avoid iteration from List. Is it possible?

Has anyone faced this before?

Restarting issue on ax2012 service

$
0
0

To whom it may concern,

Hello, I am from Korea and using ax2012.
I am having some issue about it, and that's what I'd like to ask here.

About 30 minutes ago, ax service suddenly restarted without any issue and problems. I checked the server log to get to know any clue about restarting, but there was none.

Would you let me know any log or way to figure out this 'restarting issue on ax 2012'?

Viewing all 17532 articles
Browse latest View live


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