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

RDP exception when i added field

$
0
0

Hi All,

until I worked on add field to exist report on the system to add a field with the name (CurrencyCode) I got the below exception, could anyone support me to solve this case ......

Code..

insert_recordset vendProvisionalBalanceTmpProcessing
(AccountNum, PostingProfile,CurrencyCode, VendAccountName, MainAccountId, MainAccountName)
select AccountNum from vendTable
group by vendTable.AccountNum, vendTrans.PostingProfile,vendTrans.CurrencyCode
join PostingProfile,CurrencyCode from vendTrans
where vendTrans.AccountNum == vendTable.AccountNum
join maxOf(Name) from dirPartyTable
where dirPartyTable.RecId == vendTable.Party
join vendLedgerAccounts
where ((vendLedgerAccounts.AccountCode == TableGroupAll::Table && vendLedgerAccounts.Num == vendTrans.AccountNum)
|| (vendLedgerAccounts.AccountCode == TableGroupAll::GroupId && vendLedgerAccounts.Num == vendTable.VendGroup)
|| (vendLedgerAccounts.AccountCode == TableGroupAll::All))
&& ((vendTrans.PostingProfile != "" && vendLedgerAccounts.PostingProfile == vendTrans.PostingProfile)
|| (vendTrans.PostingProfile == "" && vendLedgerAccounts.PostingProfile == defaultPostingProfile))
join dimensionAttributeValueCombination
where dimensionAttributeValueCombination.RecId == vendLedgerAccounts.SummaryLedgerDimension
join maxOf(MainAccountId), maxOf(Name) from mainAccount
where mainAccount.RecId == dimensionAttributeValueCombination.MainAccount;

Exception....................................

Cannot execute a data definition language command on Suppliers (VendProvisionalBalanceTmpProcessing).
The record already exists.
INSERT INTO tempdb."DBO".t102589_7C94D52689AC46EDA4076E437812B9A7 (ACCOUNTNUM,POSTINGPROFILE,CURRENCYCODE,VENDACCOUNTNAME,MAINACCOUNTID,MAINACCOUNTNAME,RECVERSION,PARTITION) SELECT T1.ACCOUNTNUM AS f1,T2.POSTINGPROFILE AS f2,T2.CURRENCYCODE AS f3,MAX(T3.NAME) AS f4,MAX(T6.MAINACCOUNTID) AS f5,MAX(T6.NAME) AS f6,1 AS RECVERSION,5637144576 AS PARTITION FROM VENDTABLE T1 CROSS JOIN VENDTRANS T2 CROSS JOIN DIRPARTYTABLE T3 CROSS JOIN VENDLEDGERACCOUNTS T4 CROSS JOIN DIMENSIONATTRIBUTEVALUECOMBINATION T5 CROSS JOIN MAINACCOUNT T6 WHERE ((T1.PARTITION=5637144576) AND (T1.DATAAREAID=N'rmlp')) AND (((T2.PARTITION=5637144576) AND (T2.DATAAREAID=N'rmlp')) AND (T2.ACCOUNTNUM=T1.ACCOUNTNUM)) AND ((T3.PARTITION=5637144576) AND (T3.RECID=T1.PARTY)) AND (((T4.PARTITION=5637144576) AND (T4.DATAAREAID=N'rmlp')) AND (((((T4.ACCOUNTCODE=0) AND (T4.NUM=T2.ACCOUNTNUM)) OR ((T4.ACCOUNTCODE=1) AND (T4.NUM=T1.VENDGROUP))) OR (T4.ACCOUNTCODE=2)) AND (((T2.POSTINGPROFILE<>'') AND (T4.POSTINGPROFILE=T2.POSTINGPROFILE)) OR ((T2.POSTINGPROFILE='') AND (T4.POSTINGPROFILE=N'General'))))) AND ((T5.PARTITION=5637144576) AND (T5.RECID=T4.SUMMARYLEDGERDIMENSION)) AND ((T6.PARTITION=5637144576) AND (T6.RECID=T5.MAINACCOUNT)) GROUP BY T1.ACCOUNTNUM,T2.POSTINGPROFILE,T2.CURRENCYCODE ORDER BY T1.ACCOUNTNUM,T2.POSTINGPROFILE,T2.CURRENCYCODE
(S)\Classes\xInfo\add
(S)\Classes\Info\add - line 94
(S)\Classes\VendProvisionalBalanceDP\processReport - line 56
(S)\Classes\SrsReportProviderQueryBuilder\initialize - line 59
(S)\Jobs\

Best Regards.


CheckbyDateAndVendAccount

$
0
0

how  can i check by VendAccount and put all condition in select ? if there is VendAccount for this itemId then show error mesage...

public boolean checkValuesByDate()
{
AgreementLine agreementLine;

boolean check = true;

while select * from agreementLine where agreementLine.ItemId == aLine.ItemId &&
agreementLine.Agreement != PurchAgreementHeader.RecId

if(PurchAgreementHeader.VendAccount == PurchAgreementHeader::find(aLine.Agreement).VendAccount)
{
if ( (aLine.EffectiveDate < agreementLine.EffectiveDate && aLine.ExpirationDate < agreementLine.EffectiveDate) ||
(aLine.EffectiveDate > agreementLine.ExpirationDate && aLine.ExpirationDate > agreementLine.ExpirationDate) )
{
check = true;
break;
}
else
{
error("This contract already exists in this period with the vend account " + purchAgreementHeader.VendAccount);
check = false;
break;
}
}

return check;
}

AOS Crashes & WCF Refresh Issue

$
0
0

Hi,

I have restored live database in Test server.

In test server already have one instance for test.

Now i installed separate SQL instance and restored live database and installed another AOS instance.

Client crashes while doing Synchronu=ization, .NET CIL.

Below is the event Log:

The description for Event ID 180 from source Microsoft Dynamics AX cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Microsoft Dynamics AX Business Connector Session 3.


RPC exception 1726 occurred in session 3 process is Ax32.exe thread is 6484(User: sathishc, ClientType: GUI)


Faulting application name: Ax32Serv.exe, version: 6.2.1000.1437, time stamp: 0x51c9b1c8
Faulting module name: mscorlib.ni.dll, version: 4.6.81.0, time stamp: 0x5584e5c2
Exception code: 0xc0000005
Fault offset: 0x000000000122d478
Faulting process id: 0x2f0c
Faulting application start time: 0x01d297f3c7f46414
Faulting application path: C:\Program Files\Microsoft Dynamics AX\60\Server\MSDynamicsAXTest\Bin\Ax32Serv.exe
Faulting module path: C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\70690ed034c632a010f791ea65e40064\mscorlib.ni.dll
Report Id: 2c393c83-03e7-11e7-b7e3-00155d141001

How do I customize an existing form in a new project under version control?

$
0
0

In AX2012, customizing a form automatically produced a modified version in a new layer.

I've trying to customize the CustFreeInvoice form, but can't work out how to get it added to my project so that I can modify it. The tutorials I've checked don't provide guidance because, as far as I've found, they work from completely new forms.

What I've tried so far is:

  • Right click on the CustFreeInvoice form and click Add to New Project - this creates a project in model (SYS) [Application Suite] - if I make changes I can't save them as I'm not authorised to change the SYS model.
  • Right click on the CustFreeInvoice form and click Duplicate in Project - this just gives an error:
  • Create a new project in my own module (USR) [POCInvoiceTotalCheck] then Right click on the CustFreeInvoice form and click Customize gives error:

  • Try to open form in designer, make a change and save, get error: 

  • If I then try to save in my projects folder I get:


    I
    .e. the same as adding to a new project.

Since customizing a form is such a basic thing that people might want to do, I feel I'm missing something blindingly obvious.

Can someone either give me step by step instructions to set this up or point me at an article which does this?

Thanks.

Importing credit card transactions into AX7 / New AX

$
0
0

Hi

I will like to import credit card transactions into AX7 into travel and expense module. Previously in AX 2012 it was possible to do it will the help of AIF but cannot figure out how to map and import the file in the newest version.

Does anyone have experience with this?


Thanks

BR

Naweed from Scales group

Replacement of AXd services

$
0
0

As AXd services are depreciated in AX 7  and replaced by Dataentity .

However I am not able to find the corresponding Dataentity for AXD service classes like AXDSalesInvoice,etc....

Can someone  please help me to identify few of these .....

Thanks,

Gaurav Pandey

AIF web service Config file

$
0
0

Whats the location of web.config file of AIF inbound service.

Configuration manager


How to close a form opened in code by MenuFunction.run() in

$
0
0

I have a requirement to open a form in a script however I would like to close it for each iteration of course otherwise memory requirement will increase continuously. I am using the MenuFunction class wit this code. 

How can I close the form that opens from this?

MenuFunction mf;

mf = new MenuFunction(menuItemDisplayStr(AccountingDistributionsDocumentView), MenuItemType::Display);
mf.run(args);

displaying multiple fields from multiple table in the form

$
0
0

hi,

 consider this scenario if i m having 5 tables ..and m adding all these as datasource to a form.

selecting one field from each table under the design/grid in the form

in the grid properties there will be datasource property ...here we can select only one table among 5

how can i include all the 5 in that..

bcz each fields are taken from each field 

how to resolve this

Attempt by method 'DynamicClass.TrueFalseHelper::TrueFalse(System.Object)' to access type xyz failed

$
0
0

Has anyone allready encountered the following error?

When I navigate through D365 i get this message on some forms. 

Attempt by method 'DynamicClass.TrueFalseHelper::TrueFalse(System.Object)' to access type 'Dynamics.AX.Application.Forms.CaseDetail+FormDataSource.CaseAssociation' failed.


Print Report to file and stream via AIF

$
0
0

Hey,

Iam having trouble with printing a report via AIF (http).

We use the following code (simple example):

        args = new Args(reportStr(SalesInvoice));
        args.record(custInvoiceJour);
        args.parmEnum(PrintCopyOriginal::Original);
        // need to say ReportRun not to change PrintJobSettings in fetch-method
        args.parm(settings);

        reportRun = new ReportRun(args);
        reportRun.report().interactive(false);
        reportRun.query().interactive(false);

        printJobSettings = new PrintJobSettings();
        printJobSettings.format(PrintFormat::PDF_EMBED_FONTS);
        printJobSettings.setTarget(PrintMedium::File);
        printJobSettings.warnIfFileExists(false);
        printJobSettings.suppressScalingMessage(true);
        printJobSettings.preferredFileFormat(PrintFormat::PDF_EMBED_FONTS);
        fileName = strfmt('\\\\Test-Server\\Transfer\\Test2.pdf');
        printJobSettings.fileName(fileName);

        reportRun.printJobSettings(printJobSettings.packPrintJobSettings());
        reportRun.init();
        reportRun.run();

        // send created PDF as byte stream
        // Grant clrinterop permission.
        new InteropPermission(InteropKind::ClrInterop).assert();
        //Load the file
        fi_pdfDoc = new System.IO.FileInfo(fileName);
        //Initiallize the byte array by setting the length of the file
        pdfDocBuffer= new System.Byte[int642int(fi_pdfDoc.get_Length())]();
        // Stream the file
        fs= new System.IO.FileStream(fi_pdfDoc.get_FullName(), System.IO.FileMode::Open, System.IO.FileAccess::Read);
        fs.Read(pdfDocBuffer, 0, pdfDocBuffer.get_Length());
        // Convert the file into a base64 string
        content = System.Convert::ToBase64String(pdfDocBuffer, 0, pdfDocBuffer.get_Length());
        //Revert the access
        CodeAccessPermission::revertAssert();
        return content;

We want to print old reports - this code works pretty well on AX 2009 - with old reports.

If Iam trying to print a SSRS-Report everything is fine. For some reson the old reposts wont work on 2012.

The following error is shoing up:

SoapFault exception: [s:Client] ClassFactory Objekt ist nicht initialisiert.

Stack-Trace

(S)\Classes\LedgerCache\getValue - line 3
(S)\Data Dictionary\Tables\Ledger\Methods\current - line 13
(S)\Data Dictionary\Tables\Currency\Methods\mstAmount - line 13
(S)\Classes\TaxInvoiceSpec\taxSpec - line 399
(S)\Reports\VendInvoiceSpec\Methods\fetch - line 33
(S)\Classes\ReportRun\Run
(S)\Jobs\

Are there any ideas? I tried different reports - I dont think the probem is the report itself.

If I run the code serverside (not via AIF) the report is printed without any problems.

Thank you very much.

Debugging extended form

$
0
0

Dear all, 

In D365 , I have extended a salesform.  Now i want to debug the form right from the beginning. I want to see the flow of the form while in debug mode and step over every line of code.

 Is there a way to debug the Microsoft standard code while extending a form. 

I have check in Overlaying and it is working. But i am looking for in extension . 

Please help 

Thanks 

Post Json String to URL

$
0
0

Hi,

I have a Logic App endpoint, and I would like to post a JSON format string to this URL.

The schema is as below:

{"properties":{"name":{"value":"","type":"string"
      },"event":{"value":"","type":"string"
      },"participants":{"value":"","type":"integer"
      }
   },"type":"object"
}

Is this can be done in AX 7?

Thanks,

AifInfoLog null problem

$
0
0

Hi!

Could you help me with understanding what is wrong in my sourcecode ??

Problem is that it dont build a exceptionMessage... aifInfoLog is empty ... infoLogEnum=0 ;/

I dont know why it doesnt work ;/

static void Test6(Args _args)
{
    AifInfoLog                          aifInfoLog = new AifInfoLog();
    SysInfoLogEnumerator                infoLogEnum;
    SysInfologMessageStruct             infoMessageStruct;
    str                                 exceptionMessage;
    SysExceptionTable                   excep;

    try
    {
        throw Exception::Error;
    }
    catch
    {

        infoLogEnum = SysInfoLogEnumerator::newData(aifInfoLog.getInfoLogData());
        while(infoLogEnum.moveNext())
        {
            infoMessageStruct = SysInfologMessageStruct::construct(infoLogEnum.currentMessage());
            exceptionMessage +="\n" + infoMessageStruct.message();
        }
        excep.Exception = Exception::Error;
        excep.Description = exceptionMessage;
        excep.Module = "Test class";
        excep.insert();
    }
}



Should I connect to TFS Inpremise or VSTS

$
0
0

Hi,

I am using AX 2012 R2.

What should I use for connecting to TFS, TFS inpremise or VSTS.

Thanks,

Tauseef.

Import customer addresses

$
0
0

Hi,

If I would like to import customer addresses, which data entity I should use in AX 7?

Thanks,

Building Dynamics AX7 project using MSBuild from command line

$
0
0

I am attempting to build my AX7 Solution using MSBuild.  I am using Jenkins to build it.

I am using the MSBuild.exe from "C:\Windows\Microsoft.NET\Framework\v4.0.30319".

I am using the following command line arguments: /t:Build /p:Configuration="Release" /v:n

I am getting the following errors (In a Solution that builds normally in Visual Studio).  Any ideas?  Are there any command line arguments or environment variables I need to set?  Am I using the wrong MSBuild?  Should I be using the Framework64 version?

13:38:49  Building solution configuration "Release|Any CPU".
13:38:49 Project "C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\PrecisionForms.AX7.sln" (1) is building "C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\ApplicationSuite.BT_DPA\ApplicationSuite.BT_DPA.rnrproj.metaproj" (2) on node 1 (default targets).
13:38:49 Project "C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\ApplicationSuite.BT_DPA\ApplicationSuite.BT_DPA.rnrproj.metaproj" (2) is building "C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\ApplicationFoundation.BT_DPA\ApplicationFoundation.BT_DPA.rnrproj" (3) on node 1 (default targets).
13:38:49 Project file contains ToolsVersion="12.0". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="4.0". For more information, please see http://go.microsoft.com/fwlink/?LinkId=291333.
13:38:49 PrepareForBuild:
13:38:49  Creating directory "Bin\".
13:38:49  Creating directory "obj\Debug\".
13:38:49 C:\Program Files (x86)\MSBuild\Microsoft\Dynamics\AX\Microsoft.Dynamics.Framework.Tools.BuildTasks.targets(55,5): error MSB4062: The "CopyReferencesTask" task could not be loaded from the assembly Microsoft.Dynamics.Framework.Tools.BuildTasks, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Could not load file or assembly 'Microsoft.Dynamics.Framework.Tools.BuildTasks, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. [C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\ApplicationFoundation.BT_DPA\ApplicationFoundation.BT_DPA.rnrproj] 13:38:49 Done Building Project "C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\ApplicationFoundation.BT_DPA\ApplicationFoundation.BT_DPA.rnrproj" (default targets) -- FAILED.
13:38:49 Done Building Project "C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\ApplicationSuite.BT_DPA\ApplicationSuite.BT_DPA.rnrproj.metaproj" (default targets) -- FAILED.
13:38:49 Done Building Project "C:\Program Files (x86)\Jenkins\workspace\AX Connector for New Dynamics AX\Projects\UpgradedSolution\PrecisionForms.AX7.sln" (Build target(s)) -- FAILED.
13:38:49
13:38:49 Build FAILED.

Logging of service calls

$
0
0

Hi

Are calls to services logged in D365 for operations like they are in 2012?

Thanks,
Joe

dynamics 365 for operations can not sync database after upgrade from 1611 to platform update 4

$
0
0

hi All,

followed the upgrade instruction from WIKI to upgrade our dev server from 1611 to platform update 4

https://ax.help.dynamics.com/en/wiki/upgrade-latest-platform-update/

to unzip, create runbook and install the platform update.

but its failed in DBSync steps.

I try to run DBSync powerscript manually but no luck.

the error message shown "Failed to open SQL connection" in dbsync.log

checked axdbadmin account, it has full rights to access AXDB.

then I skipped the dbsync. all other steps were processed successfully without error.

below is the log I captured from log and event viewer

03/07/2017 19:37:13: Setup mode is "servicesync".
03/07/2017 19:37:13: 2017-03-07T19:37:13.9056959+08:00 Beginning sync step: InitialSchema.
03/07/2017 19:37:18: 2017-03-07T19:37:18.3191471+08:00 InitialSchema finished. Time elapsed: 00:04:413.
03/07/2017 19:37:18: 2017-03-07T19:37:18.3211469+08:00 Beginning sync step: FullIds.
03/07/2017 19:37:18: Using legacy ids where possible.
03/07/2017 19:37:29: 2017-03-07T19:37:29.4842725+08:00 FullIds finished. Time elapsed: 00:11:162.
03/07/2017 19:37:29: 2017-03-07T19:37:29.4872753+08:00 Beginning sync step: PreTableViewSyncActions.
03/07/2017 19:37:29: 2017-03-07T19:37:29.4872753+08:00 Beginning sync step: pre-sync custom action: '<RunFullSync>b__15_0'.
03/07/2017 19:37:59: 2017-03-07T19:37:59.8118618+08:00 pre-sync custom action: '<RunFullSync>b__15_0' finished. Time elapsed: 00:30:324.
03/07/2017 19:37:59: 2017-03-07T19:37:59.8118618+08:00 PreTableViewSyncActions finished. Time elapsed: 00:30:324.
03/07/2017 19:37:59: Failed to open SQL connection
03/07/2017 19:37:59: The operation failed.
03/07/2017 19:48:09: Bindir: J:\AosService\PackagesLocalDirectory
MetadataDir: J:\AosService\PackagesLocalDirectory
Sql scripts:

exceptionDetails:

Microsoft.Dynamics.AX.InitializationException: Failed to open SQL connection at Microsoft.Dynamics.AX.AOS.StartupInternal(String[] Arguments) at Microsoft.Dynamics.AX.AOS.Startup() at Microsoft.Dynamics.AX.AosConfig.?A0x0d73e1d0.GetAosConfig() at Microsoft.Dynamics.AX.AosConfig.Config.InitInternal(Boolean isOfflineMode) at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.StartAosCode(SyncOptions syncOptions, String sqlConnectionString) at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.ExecuteWithinAOS(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider, Func`1 func, Action`1 errorHandler) at Microsoft.Dynamics.AX.Framework.Database.Tools.LegacyCodepath.RunFullTableSync(SyncOptions syncOptions, String sqlConnectionString, IMetadataProvider metadataProvider) at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullTableViewSync() at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.FullSync() at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.RunSync(SyncOptions options) at Microsoft.Dynamics.AX.Framework.Database.Tools.SyncEngine.Run(String metadataDirectory, String sqlConnectionString, SyncOptions options)
  Message:

Failed to open SQL connection

best regards,

Ken

Viewing all 17532 articles
Browse latest View live