Quantcast
Channel: Microsoft Dynamics AX
Viewing all 125409 articles
Browse latest View live

Forum Post: InventTrans has incorrect InventDimId on item when item is received on PO

$
0
0
Hello all, We have a manufacturing process that purchases items to be used in the assembly on a JIT schedule. 1) The worker in the factory receives items from on a PO. The item has a location dimension on the PO. 2) Those items are reserved to a production order BOM line that has the location dimension on it. The issue is that these JIT items are getting reserved at the warehouse level instead of location. I currently have an X++ job that updates the InventTrans record with the proper InventDimId from the BOM line. In debugging through the code, I see that InventDim.clearLocationAndBelowDim() gets called because InventDimParm has RecId = 0. I have not worked with the InventDimParm table very much so I'm not sure what it does. Could someone provide a bit of insight as to what is happening?

Forum Post: RE: Cannot delete a record in ON-hand Inventory Changes (InventSumDelta).

$
0
0
This looks to be related to statistics on the InventSumDelta table which causes SQL Server to select the wrong index, i.e. the RecId index. Here is a good article that got me on the right track to hopefully fixing this problem. axology.wordpress.com/.../locking-on-the-inventsumdelta-table And the follow-up. axology.wordpress.com/.../locking-on-the-inventsumdelta-table-additional-tweaks Here is a snip from my own SQL Server ERRORLOG from today showing the deadlock type keylock on the I_2397RECID index. 2018-07-26 09:45:54.40 spid10s (@P1 bigint)DELETE FROM INVENTSUMDELTA WHERE (((PARTITION=5637144576) AND (DATAAREAID=N'140')) AND (TTSID=@P1)) 2018-07-26 09:45:54.40 spid10s resource-list 2018-07-26 09:45:54.41 spid10s keylock hobtid=72057596231221248 dbid=7 objectname=DAX2012R2_PROD.dbo.INVENTSUMDELTA indexname=I_2397RECID id=lock654fef980 mode=X associatedObjectId=72057596231221248 2018-07-26 09:45:54.41 spid10s owner-list 2018-07-26 09:45:54.41 spid10s owner id=process4fee8a7848 mode=X 2018-07-26 09:45:54.41 spid10s waiter-list 2018-07-26 09:45:54.41 spid10s waiter id=process1e1d088 mode=U requestType=wait 2018-07-26 09:45:54.41 spid10s keylock hobtid=72057596231221248 dbid=7 objectname=DAX2012R2_PROD.dbo.INVENTSUMDELTA indexname=I_2397RECID id=lock2e8dda080 mode=X associatedObjectId=72057596231221248 2018-07-26 09:45:54.41 spid10s owner-list 2018-07-26 09:45:54.41 spid10s owner id=process1e1d088 mode=X 2018-07-26 09:45:54.41 spid10s waiter-list 2018-07-26 09:45:54.41 spid10s waiter id=process4fee8a7848 mode=U requestType=wait The more appropriate index by far for these delete_from statements it the TTSDimIdx, since the where clause specifies the PARTITION, DATAAREAID, and TTSID. It might also help to use forceliterals on those queries to eliminate a poor cached plan from causing repeated deadlocks, but I won't try that unless the specifying the index fails to resolve the issue. The class InventUpdateOnhand contains 4 methods that delete from InventSumDelta and InventSumDeltaDim, where a forced index should resolve this issue. The cleanupAggrCounter method should probably use the AggregationIdx instead given the WHERE clause. Just ideas.

Blog Post: Dynamics 365 for Operations : Connect to BYOD(Azure SQL) using x++ code:

$
0
0
With dynamics 365 for operations you can export data entities to your own Microsoft Azure SQL database. This feature is also known as bring your own database(BYOD).More information on this topic can be found here BYOD is heavily used by analytics team for different financial reports. Sometimes data on those report does not tally to AX. The purpose behind writing this code is two verify record count between AX table and table for published entity in BYOD and notify admin if there is any mismatch.You can utilize this in batch job to send alerts if you found any mismatch. If publish job fails there is no way Dynamics 365 for operations notifies you automatically unless you go and check your configured data projects. Below runnable class shows how can you connect to BYOD. It uses same connection string which you set up in Data management > configure entity export to database using System.Data.SqlClient; using System.Text; class ConnectToBYODB { /// /// Runs the class with the specified arguments. /// /// The specified arguments. public static void main(Args _args) { DMFDataSource DMFDataSource; CLRObject dmfEntityProxy; CLRObject dmfExceptionData; DMFEntity DMFEntity; SqlDataReader reader; Common Common; FieldId fieldId; Connection conn; str connectionStr; str sql; #define.serviceHelper('Microsoft.Dynamics.AX.Framework.Tools.DMF.ServiceProxy.DMFSharedTypeServiceReference.ServiceContractClient') fieldId = fieldNum(DMFDataSource, EntityStoreConnectionString); boolean RecIdEnabled; Recid MaxRecid; Select DMFDataSource where DMFDataSource.SourceName == 'AnaLyticsUAT'; common= DMFDataSource; try { if (!DMFEntityDbExporter::isEntityStoreEnabled()) throw error("EntityStore Not enabled"); if(!DMFDataSource.recid) throw error("No Valid BYODB datsource provided in setup"); if(!DMFDataSource.EntityStoreConnectionString) throw error("Connection String for BYODB is Empty"); dmfEntityProxy = new CLRObject('Microsoft.Dynamics.AX.Framework.Tools.DMF.ServiceProxy.DmfEntitySharedTypesProxy'); dmfExceptionData = new CLRObject('Microsoft.Dynamics.AX.Framework.Tools.DMF.SSISHelperService.ExceptionHandler.ExceptionData'); System.Type serviceClientType = CLRInterop::getType(#serviceHelper); str vsAssembliesPath = xInfo::directory(DirectoryType::Bin); str configFilePath = Microsoft.Dynamics.IntegrationFramework.ServiceReference::GetConfigFilePath(serviceClientType, vsAssembliesPath); CLRObject serviceContract = Microsoft.Dynamics.IntegrationFramework.ServiceReference::CreateServiceClient(serviceClientType, configFilePath); dmfEntityProxy.set_ClientProxy(serviceContract); if (common.RecId > 0 && common.orig().(fieldId) == common.(fieldId)) { SysEncryptionLog::logStringField(common, fieldId, ReadWrite::read); } connectionStr = appl.DecryptFromStringForPurpose(common.(fieldId), common.encryptionPurpose(fieldId)); if (!dmfEntityProxy.TestEntityDBConnection(connectionStr)) throw error(strFmt("Connection to BYODB %1 failed",DMFDataSource.SourceName)); conn = new Connection(); using (SqlConnection connection = new SqlConnection(connectionStr)) { connection.Open(); select firstonly DMFEntity where DMFEntity.EntityName == 'BatchJobEntity'; { sql = "SELECT count(*) from "+ DMFEntity.EntityTable ; SqlCommand command = new SqlCommand(sql, connection); reader = command.ExecuteReader(); reader.Read(); info(strfmt("Number of Records %1",reader.GetInt32(0))); reader.Close(); } } } catch(Exception::CLRError) { CLRObject ex = CLRInterop::getLastException(); if (ex.get_InnerException()) { ex = ex.get_InnerException(); } if(ex) { error(ex.get_Message() ); } } } }

Forum Post: Procrurement

$
0
0
How do I assign vendor part numbers to released products?

Forum Post: Issue with PO line matching policy

$
0
0
We have a curious issue where when some users are creating POs, the matching policy is defaulting to 2-way even though company policy is 3-way matching. I have checked the vendor, and it is set to company policy. This only seems to happen with users that have the "purchasing agent" role. Users with the "purchasing manager" role do not have this issue. Any ideas? It's creating issues in our purchasing department because they are manually having to change the matching policy back to 3-way after the PO has been created.

Forum Post: RE: Dimensions to flow into intercompany journal

$
0
0
Guys, there is a conceptual issue in the Inter-company analysis who ever did this. It's not a problem, but gap.

Forum Post: RE: Base code version in Application in Payroll tax data

$
0
0
HI Tracy, I am having the same issue for AX 2012-R2. looks like KB 4090143 is for 2012-R3,can you please point me to the KB article for our R2 version? Thank you!!

Forum Post: RE: How to bring a fixed asset into AX when it's been depreciated in another system?

$
0
0
I'm facing the same issue. Was there any solution identified for this?

Forum Post: RE: In AX2009 Item with a value but no quantity

$
0
0
We wanted to start expense according to the real consumption and by lack of knowledge I didn't renamed old service and create a new code for the item. I've done it for multiple item which have all the same problem. As you can see in the snapshots, there is only 2 transactions and both have their financial dates so they are not pending and I have closed the inventory since that moment. Where do you suggest I start my research to be able to correct the situation? While writing that reply I realized that there is a physical posting for the counting I used to take out the inventory do you think that by doing a exact reverse transaction and then redo my counting without posting physical it will solve the problem? Thank you, Benoit

Forum Post: RE: Cannot settle open invoices in foreign currencies.

$
0
0
Thank you, this helps a lot. I have tested and it works great. For the remaining open transactions I will have to reverse the payment and re-do it using this method. Thanks so much, JordanH

Blog Post: Implement Finance and Operations Retail projects

$
0
0
This should help with technical and organizational software aspects of a Retail implementation:  Implement Finance and Operations Retail project

Forum Post: RE: How to adjust Accounts Payable properly

$
0
0
Thank you so much for your help. This worked for me and seems to be flowing through everywhere it needs to just fine. Appreciate all your help. JordanH

Forum Post: RE: In AX2009 Item with a value but no quantity

$
0
0
Hi Benoit, I did miss the part that you only have two transactions for this item. If this item was set to be a service, it will be skipped by the closing. Also if you use standard cost as inventory costing value model. Can you share the settings for the item model group for this item?

Forum Post: RE: FA - There can only be one fixed asset transaction per voucher.

$
0
0
Hi Sam, We have a customer upgraded from 7.2 to 8.0 and has a similar issue in their production environment. Like suggested by Master, we did set "Allow multiple transactions within one voucher". Note that this is not future proof. Read the next blog about this topic: docs.microsoft.com/.../one-voucher We did created a support ticket for Microsoft to make them aware of this behavior and have it fixed for the future.

Forum Post: RE: Procrurement

$
0
0
Hi Chris, I'm not sure if I do understand your question as is doesn't contain that much information. If you are looking for registering the vendor's item number, then you can do this setup in the form "External item description" which can be started from the released product; menu tab Purchase.

Forum Post: All fields in the query are not displayed (extendend tables)

$
0
0
Hello, I have a second extended table from the first, and I can add all fields from both tables to a Query, but when you add this Query to a SRSSReport can add all the fields, but only get the fields values in the first table. Here i have the relation to the table A when I drag my table to my query, automatically brings fields from table A and table B Now, when i add this Query to a SRSSReport, i can add all the fields, but only the fields in table 1 have values, ¿why? how can I bring the value of all the fields? Thansk in advance

Blog Post: D365FO - How not to select Fleet Management modules in package creation

$
0
0
Want assurance that you never select/include fleet management modules in package creation or build all module together. Just rename the Descriptor folder from all these three locations and refresh models in VS first time to reflect the changes. :\AosService\PackagesLocalDirectory\FleetManagement :\AosService\PackagesLocalDirectory\FleetManagementExtension :\AosService\PackagesLocalDirectory\FleetManagementUnitTests

Forum Post: RE: Vendor invoice Invoice09 cannot be posted until the review process has been completed. Submit the vendor invoice for review or wait until the current review process is complete.

$
0
0
Hi, Can you give an example of how it should be? I mean is an example of workflow history look like. Then, how to check whether my workflow related batch job are running? Thank you

Forum Post: Vendor Invoicedid not show any lines

$
0
0
I am trying to make invoice after receive the product by push the Invoice button in Invoice Tab. But, It does not show any lines. What happaned? How to fix this? Thank you

Forum Post: Having issue in Sales Report in Account Receivable module.

$
0
0
Hi Experts, Please help me out to resolve the below problem. I am working on Sales Report(AOT Report) in Accounts Receivable module. I have to write the code to take the value of site field in Sales Table . I have two reports(AOT). If the site value is "Unit 1" Report_1 Should get executed and If the value is "Unit 2" Report_2 should get executed. please find the below code.if you need.Present code i am using to solve this error is in the Bold and red Color.But it is not a valid code.it is by default taking some other design in the report. void init() { WMSShipment wmsShipment; SalesLine sL; InventSiteId inventsiteidobj; ; super(); // breakpoint; paymentReference = element.design().sectionName('Invoice').controlName('PaymentReference'); printCopyOriginal = element.args().parmEnum(); if (element.args().parm()) { taxUnrealizedPayment = element.args().parmObject(); if (taxUnrealizedPayment) { ledgerJournalTrans = taxUnrealizedPayment.parmledgerJournalTrans(); } } if (classidget(element.args().caller()) == classnum(SalesFormLetter_Invoice)) { salesFormLetter = element.args().caller(); } if (element.args().dataset() == tablenum(WMSShipment)) { wmsShipment = element.args().record(); journalList = FormLetter::createJournalListCopy(ShipCarrierShipmentInvoice::custInvoiceJour(wmsShipment.ShipmentId)); } else { if (element.args().record()) journalList = FormLetter::createJournalListCopy(element.args().record()); else journalList = element.args().object(); } if (!journalList) throw ''; journalList.first(custInvoiceJour); if (!custInvoiceJour) throw error("@SYS26348"); custFormletterParameters = CustFormletterParameters::find(); companyInfo = CompanyInfo::find(); custFormletterDocument = CustFormletterDocument::find(); custParameters = CustParameters::find(); this.arrangeLevelNone(); this.changeDesign(); totalsFirstLastPage = custFormletterParameters.TotalsFirstLastPage; taxPrintTaxFreeBalance = custFormletterParameters.TaxPrintTaxFreeBalance; this.initPrepaidTotals(0); this.enableTotalsSections(); this.cashDiscOnInvoice(); if(cashDiscOnInvoice) { this.showCashDiscOnInvoiceControls(); } this.isCreditInvoicingReportEnabled(); this.footerEnable(giro_FIK65, false); this.footerEnable(giro_FIK762, false); this.footerEnable(giro_BBS, false); this.footerEnable(giro_CH_red, false); this.footerEnable(giro_CH_blue, false); this.footerEnable(giro_CH_orange, false); this.footerEnable(giro_Finnish, false); inventDimReport = InventDimCtrl_Rep_Sales::newFromReport(element); inventDimReport.parmDocumentStatus(DocumentStatus::Invoice); inventDimReport.parmDisableLabel(custFormletterParameters.PrePrintLevelInvoice == PrePrintLevel::PrePrinted); inventDimReport.initDimParmVisible(); inventDimReport.updateControls(); inventdimSetup = inventDimReport.dimFieldsActive(inventDimReport.parmDimParmVisible()); salesFormLetterReport = FormLetterReport::construct(PrintMgmtDocumentType::SalesOrderInvoice); salesFormLetterReport.parmReportDesign(element); salesFormLetterReport.parmPrintType(printCopyOriginal); if (salesFormLetter) { salesFormLetterReport.parmDefaultCopyPrintJobSettings(new PrintJobSettings(salesFormLetter.printerSettingsFormletter(PrintSetupOriginalCopy::Copy))); salesFormLetterReport.parmDefaultOriginalPrintJobSettings(new PrintJobSettings(salesFormLetter.printerSettingsFormletter(PrintSetupOriginalCopy::Original))); salesFormLetterReport.parmUsePrintMgmtDestinations(salesFormLetter.usePrintManagement()); } else if (printCopyOriginal == PrintCopyOriginal::OriginalPrint) { // Always use the print mgmt destinations when reprinting for the OriginalPrint case. salesFormLetterReport.parmUsePrintMgmtDestinations(true); } //mohan //ERB_Keshav breakpoint; if (salesTable::find(custInvoiceJour.SalesId).CustGroup == "EXPORT") { // element.design("Commercial"); // Started - ERB_Vignesh @ 20/7/2018 element.design("Domestic_1"); //Ended - ERB_Vignesh @ 20/7/2018 //ERB_Keshav } // element.design("Export"); //element.design("Domestic_1"); else { // element.design("Commercial"); // Started_ERB_Vignesh @ 20/7/2018 // if(InventDim::find(purch1.InventDimId).InventLocationId == "Unit I") //if(purchLine::find(InventDim.inventDimId).InventDimId == "Unit I") if(!sL) { select firstonly sL where sL.SalesId; } inventsiteidobj = InventDim::find(sL.InventDimId).InventLocationId; if(inventsiteidobj == "UNIT I") { element.design("Domestic_1"); // Ended_ERB_Vignesh @ 20/7/2018 //ERB_Keshav } else if(InventDim::find(sL.InventDimId).InventLocationId == "UNIT II") { element.design("Domestic_2"); } //mohan this.initReverseCharge(); this.arrangeLevelGlobal(); this.initUnrealizedTax(); } }
Viewing all 125409 articles
Browse latest View live