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

purchase requisition workflow in ax 2012 with multiple approval levels depending on the total amount for all PR Lines

$
0
0

Hi ,

I am trying to create a purchase requisition workflow in ax 2012 with multiple approval levels depending on the total amount for all PR Lines. My requirement is

1. if total amount is <$10,000 then only project manager's approval is needed

purchase requisition lines will not sum all lines value!


Creating a Reference ID with date and increasing it by one

$
0
0

Hello All,

I am tasked with the responsibility of creating a field that has a format like ACP/DIL/15/11/2018/100008 and the next record will be ACP/DIL/15/11/2018/100009 and the next will be ACP/DIL/15/11/2018/100010 and on and on increasing the last string by one. I could have done this with number sequence but it has to be today's date in there. I've hard coded this on the initValue() method and it works fine but there's the possibility of a duplicate record as stated here by . How else can I do this to make it work effectively?

The enumerator does not designate a valid element.

$
0
0

Hello, I've upgraded version 8.0 to 8.1. I have no custamizations.
When i try to confirm SalesOrder ot PurchOrder or post FreeTextInvoice it gives me the following error  "The enumerator does not designate a valid element".

 Somebody have some idea why.

Add extra column in view with default value

$
0
0

Hey,

Is it possible to add an extra column to a view with a default falue like 'Alternative trade'. I want that each record had the string Alternative trade in the extra column?

Thank you

Posting PO in a Batchjob

$
0
0

Hi Guys,

When I post PO from a batch job (in Ax2009), records are getting created in PurchParmTable.  As I use Late selection it generates records and shows them in the posting dialog. It holds the records after the completion of the transaction.  This gives problem during the next batch transaction if it found records in the posting dialog.   How could if remove records from this posting dialog(ParchParmTable) after the completion of the posting process?

Archiving old data

$
0
0

Dear Friends,
I have a question:
1/ The Database of AX2012 R3 is huge (>2TB). I want to archive data in the few years ago. Can I do?. How?.

If support for Dynamics AX has ended, is hosted/cloud the only option?

$
0
0

I am looking to implement an accounting/ERP system for a new company and assessing different options. One of the least desirable options is to use hosted services.

I understand that Dynamics AX 2012 R3 was the last release of AX and is now no longer being supported. I could go ahead with it nevertheless but soon I anticipate the Dynamics 365 option will be the only one left once our license expires.

However would it still be worth starting a new implementation of Dynamics AX 2012 on site? How about if we never want to use hosted/cloud options - would we end up reaching a dead-end soon using Dynamic AX 2012?

Change label of a table's field

$
0
0

Hi,

I want to change the label of  a table field. i am getting an error while executing the following code

public static void main(Args _args)
{
#Properties
#AOT
#DictField

CMAAttribPrioritySetup aps;
TreeNode treeTable1;
SysDictField df;
FieldId fieldId;
df = new SysDictField(tableNum(CMAAttribCombination),fieldNum(CMAAttribCombination,AttribStringValue1 ));
select firstonly aps
where aps.AttribFieldId == df.id();

treeTable1 = df.treeNode();

treeTable1.AOTsetProperty(#PropertyLabel, "Labelone");
str labelname = treeTable1.AOTgetProperty(#PropertyLabel);
info(labelname);
treeTable1.AOTsave();

}

the line of code marked is throwing an error.

Error is : 

Microsoft.Dynamics.Ax.Xpp.ErrorException was unhandled by user code
Message: An exception of type 'Microsoft.Dynamics.Ax.Xpp.ErrorException' occurred in aoskernel.dll but was not handled in user code
Additional information: Unable to extract node content to disk. The file '%1' is read-only.

Thanks in advance.

Anand


Add a filter/ range to a query service - AIF

$
0
0

Hi,

I have an ASPX page which fetches data from a query in AX 2012 R3. I have been referring 'this link'.

The query I have created in AX has only one table CustTable and has AccountNum in the Range node.

How could I add a where clause to a query service?

I appreciate your help!

With best regards,

Abhinay

Standard report with extension

$
0
0

Dear all,

In SSRS report we having 3 sections like

1. Business logic

2. Data sources

3. Design

As we know that if we are working with Standard report on D365FO then it's possible only through Extension.

Example 1:

If the changes is only in Business logic then we need to create a extension for respective standard classes like DP, Controller OR Contract only.

Example 2:

If the changes is only in Data sources then we need to create a extension for both Tables (DS) and SSRS report also.

Example 3:

If the changes is only in design part then we need to create a extension for SSRS report only.

Example 4:

If the changes in Business logic and design OR DS

Then it should be combination of either

Example 1,2,3 OR

Example 1, 3 OR

Example 1,2

Kindly verify. Is't correct?

Please give me more she'd on this

Data entity methods execution sequence

$
0
0

Hi,

I could find any resource which describes the call / execution sequence of data entity methods.

Can anyone provide some link or sequence?

Thanks.

QR Code with special characters

$
0
0

Hi, everyone.

I'm trying to make a QR code in AX2012 R3 and I found there is a library that can make a QR code.

However, It looks like that it doesn't support for special characters.

Please let me know how can I add special characters in QR code.

Buttons disappear and changed in ... when I zoom out the browser of chrome

$
0
0

I created a grid to show the data of table with action buttons like create, delete. But when I zoom out the browser of chrome they changed to ... like a list showed in the picture 2.

How can I fix them and let them to be showed always in that way like picture 1?

Thanks!

Export CSV file using x++ code in UTF8 format without BOM for D365O

$
0
0

Hi all,

I try to export CSV file in UTF-8 without BOM.

The exported CSV is UTF-8 with BOM but we need the format in UTF-8 without BOM.

here is my sample code:

public static void main(Args _args)
{ #FILE
TextStreamIo comma = TextStreamIo::constructForWrite(65001);
;
comma.outRecordDelimiter(#delimiterCRLF);
comma.outFieldDelimiter(",");
comma.writeExp(["COL A",
"COL B"]);

comma.writeExp(["F A","F B"]);

File::SendFileToUser(comma.getStream(), strfmt("%1.csv",'XX'));
}

Tried to search similar post but seems it is only for lower version (AX2012)

https://community.dynamics.com/ax/f/33/t/220574

Many thanks.

Is there that how to save information at once in grid?

$
0
0

Hello! :)

Thank you for your attention.

-

I am using the temp table of in memory. before show this to user, I make each information from other tables into a temp table. And then I show this on grid.

And then I would like to save the informations on grid at once when push the save button.

(I don't want to save every over record of grid when move the record)

-

I need to save these information from temp table to other regular tables again.

-

Is there that how to save information at once in grid?


Table is not updated

$
0
0
This is code form

[Control("Integer")]
    class MCROrderParameters_MCRPriceOverrideLineColor
    {
        public void lookup()
        {
            int color = ColorSelection::selectColor(this, MCROrderParameters.MCRPriceOverrideLineColor);
            // allow color to be reset for price override line
            if (color != MCROrderParameters.MCRPriceOverrideLineColor)
            {
                MCROrderParameters.MCRPriceOverrideLineColor = color;
                MCROrderParameters_ds.write();
            }
        }
    }
I have set the different color code in “MCRPriceOverrideLineColor” field but its always show the old color code .
I have checked in Table update method
void update()
    {
        MCROrderParameters   mcrOrderParameters_Orig = this.orig();
 …..
}
In ‘this’ object I always found old value but is wrong here I don’t understand.
Can anybody suggest me .

Web services issue in ax 2012 r3

$
0
0

Hi guys,

I have created a web form using visual studio 2010 and getting the customer id  in the listbox1 by using one button in the form and based on the value selected the customer name will be showed in the second list box2 by using a servicegroup from ax 2012.

Upto this this was working well and good for me.

Now now I have created my own datacontract class and tried to get the custname,Custgroupid,defaultlanguageid  in the form and updated that service group and deployed it again.

In my visual studio also i updated the service reference  and wrote the logic for the third button and looks good.

But i am getting error in the code of the second button.

private void button2_Click(object sender, EventArgs e)

{
    BkCustomAXservice.BKCustomserviceClient servclient = new BkCustomAXservice.BKCustomserviceClient();
    string[] strItem = null;

    int i = 0;

    strItem = new string[listBox1.SelectedItems.Count];

    //Get selected customer ids and prepare a string array

    foreach (Object selecteditem in listBox1.SelectedItems)

    {

        string item  = selecteditem as string;

        strItem[i++] = item;

    }

 

    //Use the string array to get the “Customer Id: Customer Name” Combo data

    string[] custIds = servclient.retrivecustomernames(new BkCustomAXservice.CallContext(), strItem);
    //string[] custIds = servclient.retrivecustomernames(new BkCustomAXservice.CallContext(), strItem);
           

    listBox2.Items.Clear();

    foreach (string custId in custIds)

        listBox2.Items.Add(custId);

}

But i am getting error in the below line,

string[] custIds = servclient.retrivecustomernames(new BkCustomAXservice.CallContext(), strItem);


Error    1    Cannot implicitly convert type 'WindowsFormsApplication1.BkCustomAXservice.BKCustomservicecontract[]' to 'string[]'    c:\users\bharathk\documents\visual studio 2010\Projects\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs    52    24    WindowsFormsApplication1


Please advise.
Regards,
AxTechie 2120

User-AOS crashing on ntdll.dll

$
0
0

Dear community members,

I'm having an annoying issue where multiple times our user AOS'ses are crashing. When I check Windows Eventviewer I see an error on ntdll.dll. In cooperation with our business partner we have managed to create an analysis dump and send it to Microsoft but they couldn't find anything. :(

This is the error:

Faulting application name: Ax32Serv.exe, version: 6.3.5000.267, time stamp: 0x58196e47

Faulting module name: ntdll.dll, version: 6.3.9600.19153, time stamp: 0x5b93ffa7

Exception code: 0xc0000374

Fault offset: 0x00000000000f1cd0

Faulting process id: 0x6a8

Faulting application start time: 0x01d47b403aa2a24b

Faulting application path: C:\Program Files\Microsoft Dynamics AX\60\Server\<AOSINSTANCE>\Bin\Ax32Serv.exe

Faulting module path: C:\Windows\SYSTEM32\ntdll.dll

Report Id: 6a75f5b0-e757-11e8-80da-f8bc1211eec1

Faulting package full name:

Faulting package-relative application ID:

The weird thing is that only our user-AOS-es seem to crash, so it looks like a user initiated action which causes the AOS service to crash.. But which one..? I've thought about clearing the user-settings, but every user has customized nearly every form to their liking so I want that to be a last resort.

In relation to the problem I've got some questions:

1) Is it possible to delete the user files from the APPDATA folder without clearing everyone's user settings? (Query's, GRID-settings etc.)

2) Can a Windows .Net 'Preview of Quality rollup' cause an AOS service to crash? http://support.microsoft.com/kb/4462502 . The support page tells that there are problems with SharePoint workflows though..

3) Any more ideas?

Our Business partner is advising to upgrade our kernel but doesn't it seems a little drastic?

On-prem deployment - Partition is below target replica or instance count

$
0
0

Hi,

I am having this issue with my local cluster. I checked the partition is not an issue I have more than 10GB available on all nodes in cluster. I am trying to deploy MS Dynamics 365FO on the local cluster according to this doc: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/deployment/setup-deploy-on-premises-pu12#plansvcacct and i am stuck on the last step where i have deploy to the local server.

Error in the SF:

_______________________________________

Error event: SourceId='System.FM', Property='State'. Partition is below target replica or instance count. fabric:/AXSF/AXService -1 1 76897cf8-fba9-4968-9517-ab9d80816b5e IB AOS_83 Up 131703551926567717 IB AOS_91 Up 131703551796481193 IB AOS_80 Up 131703551939536215 (Showing 3 out of 3 replicas. Total available replicas: 0) For more information see: http://aka.ms/sfhealth

___________________________________


Error on each node:


Unhealthy event: SourceId='System.RA', Property='ReplicaOpenStatus', HealthState='Warning', ConsiderWarningAsError=false. Replica had multiple failures during open on AOS_80. API call: IStatelessServiceInstance.Open(); Error = System.Exception (-2146233088) DB sync failed. at Microsoft.Dynamics.AXService.Database.Synchronizer.SyncDB() at Microsoft.Dynamics.AXService.Database.Synchronizer.Synchronize() at Microsoft.Dynamics.AXService.AXService.<>c__DisplayClass9_1.<.ctor>b__0() at Microsoft.PowerApps.Runtime.Common.LatencyRecorder.RecordLatencyEvent(ILogger logger, String eventName, Action action, IDictionary2 additionalProperties, IDictionary2 additionalMetrics) at Microsoft.Dynamics.AXService.AXService..ctor(StatelessServiceContext context, ILogger logger) at Microsoft.Dynamics.AXService.Program.<>c.b__0_0(StatelessServiceContext context) at Microsoft.ServiceFabric.Services.Runtime.StatelessServiceInstanceFactory.System.Fabric.IStatelessServiceFactory.CreateInstance(String serviceTypeName, Uri serviceName, Byte[] initializationData, Guid partitionId, Int64 instanceId) at System.Fabric.ServiceFactoryBroker.<>c__DisplayClass9_0.b__0(IStatelessServiceFactory factory, ServiceInitializationParameters initParams) at System.Fabric.ServiceFactoryBroker.CreateHelper[TFactory,TReturnValue](IntPtr nativeServiceType, IntPtr nativeServiceName, UInt32 initializationDataLength, IntPtr nativeInitializationData, Guid partitionId, Func3 creationFunc, Action2 initializationFunc, ServiceInitializationParameters initializationParameters) For more information see: http://aka.ms/sfhealth

_______________________________________________________

Errors in the diagnostic store for the node where its failing:

2018/05/07-15:39:21.914,Info,4524,FabricDeployer.FabricDeployer,Running deployer with UpdateInstanceId /fabricBinRoot:C:\Program Files\Microsoft Service Fabric\bin /fabricDataRoot:C:\ProgramData\SF /fabricLogRoot:C:\ProgramData\SF\Log /cm:C:\ProgramData\SF\AOS_83\Fabric\ClusterManifest.current.xml /oldClusterManifestString: /im:C:\ProgramData\SF\AOS_83\Fabric\Fabric.Data\InfrastructureManifest.xml /instanceId:131701810926192303 /targetVersion:6.1.480.9494 /nodeName:AOS_83 /nodeTypeName: /runAsType: /runAsAccountName: /runAsPassword: /serviceStartupType: /output: /currentVersion: /error:C:\ProgramData\SF\AOS_83\Fabric\work\41-3164 /bootstrapMSIPath: /machineName: /fabricPackageRoot: /jsonClusterConfigLocation: /enableCircularTraceSession: /continueIfContainersFeatureNotInstalled: /skipDeleteData:
2018/05/07-15:39:21.945,Info,4524,ImageStoreClient.ManagedFileLock,Obtained writer lock for C:\ProgramData\SF\lock
2018/05/07-15:39:21.945,Info,4524,FabricDeployer.FabricDeployer,Executing UpdateInstanceId /fabricBinRoot:C:\Program Files\Microsoft Service Fabric\bin /fabricDataRoot:C:\ProgramData\SF /fabricLogRoot:C:\ProgramData\SF\Log /cm:C:\ProgramData\SF\AOS_83\Fabric\ClusterManifest.current.xml /oldClusterManifestString: /im:C:\ProgramData\SF\AOS_83\Fabric\Fabric.Data\InfrastructureManifest.xml /instanceId:131701810926192303 /targetVersion:6.1.480.9494 /nodeName:AOS_83 /nodeTypeName: /runAsType: /runAsAccountName: /runAsPassword: /serviceStartupType: /output: /currentVersion: /error:C:\ProgramData\SF\AOS_83\Fabric\work\41-3164 /bootstrapMSIPath: /machineName: /fabricPackageRoot: /jsonClusterConfigLocation: /enableCircularTraceSession: /continueIfContainersFeatureNotInstalled: /skipDeleteData:
2018/05/07-15:39:22.117,Info,4524,FabricDeployer.FabricDeployer,Running operation System.Fabric.FabricDeployer.UpdateInstanceIdOperation
2018/05/07-15:39:22.148,Info,4524,FabricDeployer.FabricDeployer,AclClusterLevelCerts: Enter
2018/05/07-15:39:22.148,Info,4524,FabricDeployer.FabricDeployer,AclClusterLevelCerts: processing FindByThumbprint,43E5DDB7BE39DDCD37B3EF508FD597AAD709F475,My
2018/05/07-15:39:22.164,Info,4524,FabricDeployer.FabricDeployer,AclCert success: FindByThumbprint,43E5DDB7BE39DDCD37B3EF508FD597AAD709F475,My
2018/05/07-15:39:22.164,Info,4524,FabricDeployer.FabricDeployer,AclClusterLevelCerts: FindByThumbprint,43E5DDB7BE39DDCD37B3EF508FD597AAD709F475,My processed
2018/05/07-15:39:22.179,Info,4524,FabricDeployer.FabricDeployer,Skipping container network set up since we are not on Azure.
2018/05/07-15:39:22.601,Info,4524,FabricDeployer.FabricDeployer,The current machine IP addresses are: fe80::ec51:5049:948e:e189%5, 192.168.145.83, 127.0.0.1, ::1
2018/05/07-15:39:22.695,Info,4524,FabricDeployer.FabricDeployer,ServiceFabricEtlFileQueryable section was not found and is being added.
2018/05/07-15:39:22.711,Info,4524,FabricDeployer.FabricDeployer,ServiceFabricEtlFileQueryable section was not found and is being added.
2018/05/07-15:39:23.148,Info,4524,ImageStoreClient.ManagedFileLock,Obtained writer lock for C:\ProgramData\SF\AOS_83\Fabric\work\UnreliableTransportSettings.ini
2018/05/07-15:39:23.164,Info,4524,ImageStoreClient.ManagedFileLock,Released writer lock on C:\ProgramData\SF\AOS_83\Fabric\work\UnreliableTransportSettings.ini
2018/05/07-15:39:23.226,Info,4524,FabricDeployer.FabricDeployer,Generating the fabric package file at C:\ProgramData\SF\AOS_83\Fabric\Fabric.Package.current.xml
2018/05/07-15:39:23.257,Info,4524,FabricDeployer.FabricDeployer,Host Settings file generated at C:\ProgramData\SF\FabricHostSettings.xml
2018/05/07-15:39:26.711,Info,4524,FabricDeployer.FabricDeployer,Dynamic port range not specified in cluster manifest. Start port : 0. Using default dynamic port range for server.
2018/05/07-15:39:26.726,Info,4524,FabricDeployer.FabricDeployer,Executing command: logman stop FabricCounters
2018/05/07-15:39:29.143,Info,4524,FabricDeployer.FabricDeployer,Executing command: logman delete FabricCounters
2018/05/07-15:39:29.670,Info,4524,FabricDeployer.FabricDeployer,Performance counter sampling interval: 00:01:00 seconds.
2018/05/07-15:39:29.686,Info,4524,FabricDeployer.FabricDeployer,Executing command: logman create counter FabricCounters -cf C:\Windows\TEMP\tmp2BDC.tmp -f bin -si 60 -o "C:\ProgramData\SF\Log\PerformanceCountersBinary\fabric_counters_636612899696865084" -v nnnnnn -max 50 -cnf 2700
2018/05/07-15:39:30.249,Info,4524,FabricDeployer.FabricDeployer,Executing command: logman start FabricCounters
2018/05/07-15:39:31.853,Info,4524,FabricDeployer.FabricDeployer,Infra node <AOS_80> params.NodeName <AOS_83>
2018/05/07-15:39:31.853,Info,4524,FabricDeployer.FabricDeployer,Infra node <AOS_83> params.NodeName <AOS_83>
2018/05/07-15:39:31.853,Info,4524,FabricDeployer.FabricDeployer,Found node IPAddressOrFQDN <192.168.145.83>
2018/05/07-15:39:31.853,Info,4524,FabricDeployer.FabricDeployer,DockerDnsHelper current node IPAddressOrFQDN <192.168.145.83>
2018/05/07-15:39:31.869,Info,4524,FabricDeployer.FabricDeployer,Starting DockerDnsHelper.SetupAsync
2018/05/07-15:39:31.869,Info,4524,FabricDeployer.FabricDeployer,Executing DockerDnsHelper.SetupAsync, attempt 1 of 3
2018/05/07-15:39:31.884,Info,4524,FabricDeployer.FabricDeployer,Dism initializing...
2018/05/07-15:39:31.884,Info,4524,FabricDeployer.FabricDeployer,Dism initializing completed, opening online session...
2018/05/07-15:39:32.279,Info,4524,FabricDeployer.FabricDeployer,Dism opening online session completed, getting feature info...
2018/05/07-15:39:33.666,Info,4524,FabricDeployer.FabricDeployer,Dism feature Containers is in state: DismStateStaged
2018/05/07-15:39:33.666,Info,4524,FabricDeployer.FabricDeployer,Dism closing session...
2018/05/07-15:39:33.791,Info,4524,FabricDeployer.FabricDeployer,Dism closing session completed
2018/05/07-15:39:33.791,Info,4524,FabricDeployer.FabricDeployer,Dism shutting down...
2018/05/07-15:39:33.885,Info,4524,FabricDeployer.FabricDeployer,Dism shutting down completed
2018/05/07-15:39:33.902,Info,4524,FabricDeployer.FabricDeployer,Dism log file content:
2018-05-07 11:39:31, Warning DISM DISM Provider Store: PID=4108 TID=4048 Failed to Load the provider: C:\Windows\SYSTEM32\Dism\SiloedPackageProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
[4108] [0x8007007b] FIOReadFileIntoBuffer:(1250): The filename, directory name, or volume label syntax is incorrect.
[4108] [0xc142011c] UnmarshallImageHandleFromDirectory:(793)
[4108] [0xc142011c] WIMGetMountedImageHandle:(3047)
[4108] [0x8007007b] FIOReadFileIntoBuffer:(1250): The filename, directory name, or volume label syntax is incorrect.
[4108] [0xc142011c] UnmarshallImageHandleFromDirectory:(793)
[4108] [0xc142011c] WIMGetMountedImageHandle:(3047)
2018-05-07 11:39:32, Warning DISM DISM OS Provider: PID=4364 TID=2704 Unable to set the DLL search path to the servicing stack folder. C:\Windows may not point to a valid Windows folder. - CDISMOSServiceManager::Final_OnConnect
2018-05-07 11:39:32, Warning DISM DISM Provider Store: PID=4364 TID=2704 Failed to Load the provider: C:\Windows\TEMP\F578182C-D732-4F74-A6D8-1EAAEF177735\PEProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)

2018/05/07-15:39:33.947,Info,4524,FabricDeployer.FabricDeployer,Containers feature not present. Not continuing further
2018/05/07-15:39:33.947,Info,4524,FabricDeployer.FabricDeployer,Successfully completed DockerDnsHelper.SetupAsync
2018/05/07-15:39:33.947,Info,4524,FabricDeployer.FabricDeployer,Completed DockerDnsHelper.SetupAsync
2018/05/07-15:39:33.947,Info,4524,ImageStoreClient.ManagedFileLock,Released writer lock on C:\ProgramData\SF\lock

___________________________________________________

Please let me know if you need more information. I tried to deploy 3-4 times from LCS but it always fail on this step when it deploy AXSF service.

How to identify empty value in tsv file

$
0
0

Good morning all,

I am trying to import tsv file.When i am importing i am facing one issue.

1. In that sheet i have 5 columns.

2.Data is like

Example -

Accountnum      name       searchname        vendgroup       currency

10000                                                             10                    "usd"

When i am reading this file 

file = commastreamio::constructforread(strem)

file.indelimeter("\t");

while(file.status == IO_status::ok)

{

container c = file.read();

}

in this container for the first loop i am getting all 5 columns

But when in 2nd loop i am getting result in container as

10000

\t                      (here i must get 2 empty values but i am only getting 1 value "\t")

 10             

 "usd"

Experts please provide some solution on this.

Regards.

Have a great day.

Viewing all 17532 articles
Browse latest View live


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