Popular Posts
- Introduction & String Functions in AX 2012
- Convert Functions in ax 2012
- X++ code for Import data from excel using all datatypes in ax 2012
- (no title)
- Date functions in ax 2012
- X++ Code to create Lookup for DialogField in ax 2012 r3
- X++ code to Export data to Excel sheet in ax 2012
- AX Versions and Overview of Microsoft Dynamics AX build numbers
- X++ Code for Creating New Customer and also update Address of the customer
- X++ code for Modify dialog fields in ax 2012
Thursday, June 16, 2016
Invoicing Sales Order by Confirming SalesQuotation
Hi Daxer’s !!!
Scenario:Creating
SalesQuotation >>Send SalesQuotation to Customer >> here while
doing SalesQuotation confirmation i have added one Checkbox of
(SalesInvoicecheck) if i check this checkbox and confirm it,then the salesorder
status will be invoiced of particular sales Quotation in Sales Order form
How I achieved scenario
is
First I have
Created a new field in SalesQuotationTable as below
Then I have added
one check box(SalesInvoiceCheck) control in SalesQuotationEditLine Form
CommandButton:Ok>>Clicked()
void clicked() // added by shiva
{
SalesQuotationParmTable SalesQuotationParmTable1;
SalesquotationTable
salesquotationTable1;
super();
SalesQuotationParmTable1 =
SalesQuotationParmTable::find(SalesQuotationParmTable.QuotationId,SalesQuotationParmTable.ParmId,true);
salesquotationTable1=SalesquotationTable::find(SalesQuotationParmTable1.QuotationId);
if (SalesInvoiceCheck.value()==1)
{
SalesQuotationTable1.selectForUpdate(true);
ttsBegin;
SalesQuotationTable1.Sk_SalesInvoiceCheck=NoYes::Yes;
SalesQuotationTable1.update();
ttsCommit;
}
}
In above method i’m
just finding SalesQuotationTable recid based on quotation id and also updating
SalesQuotationTable with SalesInvoicecheck value as “Yes”
Now Finally based
on above condition i was gone through with the SalesQuotationLineType Class>>updateSalesQuotationTable()
as below
In updateSalesQuotationTable()
i have added my logic here
void
updateSalesQuotationTable()
{
SalesQuotationTable
salesQuotationTable;
SalesFormLetter
salesformletter;// added by shiva
salesQuotationTable = salesQuotationLine.salesQuotationTable(update);
salesQuotationTable.CovStatus =
0;
salesQuotationTable.write();
//added by shiva invoicing salesquotation through
confirmation
if(salesQuotationTable.Sk_SalesInvoiceCheck==
NoYes::Yes && salesQuotationTable.SalesIdRef)
{
salesformletter
= salesformletter::construct(DocumentStatus::Invoice);
salesformletter.update(salestable::find(salesQuotationTable.SalesIdRef));
}
// ended by shiva
}
Now goto Navigation>>Sales&Marketing
>>AllSalesOrders>>
Search the Above Salesorder(001358) status is invoiced
Tuesday, June 14, 2016
Hi Daxer’s !!!
Recently I have
gone through one customization.
Scenario:Add “Registrationnumber”
field in Other Information group of Customer form if you enter some value on registration
number it should update at taxes action pane >>tax registration >>Registration number
>>First I have
added one field in custTable like sk_Registrationnumber and also added that
field to customer form as above screen shot
Note : Based on
Customer Accountnum in custTable ,i need to update registrationnumber in TaxRegistration table so
I need to check relation between Custtable and Taxregistration
Taxregistration.dirpartylocation>>Dirpartylocation.party>>custtable.party
CustTable>>Modifiedfield()>>
case fieldNum(CustTable,sk_registrationnumber):
if (this.SK_RegistrationNumber)
{
ttsBegin;
while select forupdate taxregistration
join DirPartyLocation
where taxregistration.DirPartyLocation==DirPartyLocation.RecId
join CustTable
where DirPartyLocation.Party==CustTable.Party
if(TaxRegistration)
{
{
taxregistration.validTimeStateUpdateMode(validTimeStateupdate::Correction);
taxregistration.ValidFrom=today();
taxregistration.ValidTo=today()+20;
taxregistration.RegistrationNumber=this.SK_RegistrationNumber;
taxregistration.update();
}
}
ttsCommit;
}
---------------------------or------------------------------------
case fieldNum(CustTable,SK_RegistrationNumber):
if(this.SK_RegistrationNumber)
{
ttsBegin;
//TaxRegistration = TaxRegistration::find(DirPartyLocation::findByPartyLocation(CustTable::find(this.AccountNum)
//
TaxRegistration.DirPartyLocation=Dirpartylocation::findByPartyLocation(this.Party,true).Location;
//
TaxRegistration.TaxRegistrationTypeApplicabilityRule=5637146891;
//TaxRegistration.selectForUpdate(true);
TransDate = systemDateGet();
transDateTo = dateMax();
TaxRegistration.validTimeStateUpdateMode(ValidTimeStateUpdate::Correction);
SELECT forUpdate validTimeState(TransDate,
transDateTo) * from TaxRegistration
Join dirpartylocation
where
TaxRegistration.DirPartyLocation==dirpartylocation.RecId
join
DirPartyTable
where
dirpartylocation.Party==DirPartyTable.RecId
join CustTable
where DirPartyTable.RecId==CustTable.Party;
if(TaxRegistration)
{
TaxRegistration.RegistrationNumber=this.SK_RegistrationNumber;
TaxRegistration.update();
}
ttsCommit;
}
Exception from HRESULT: 0xC0048021 in DIXF AX 2012 R3
If you’re using Excel 2013 , the problem is caused by DMConfig XML
file.
Go to
the DMConfig.xml file in the Microsoft Dynamics
AX\60\DataImportExportFramework folder and replace the
PipelineComponentInfo_Multicast, PipelineComponentInfo_ExcelSource and
<PipelineComponentInfo_ExcelDestination> nodes by the following:
<PipelineComponentInfo_Multicast>
{33D831DE-5DCF-48F0-B431-4D327B9E785D}
< /PipelineComponentInfo_Multicast>
< PipelineComponentInfo_ExcelSource>
{9F5C585F-2F02-4622-B273-F75D52419D4A}
< /PipelineComponentInfo_ExcelSource>
< PipelineComponentInfo_ExcelDestination>
{90E2E609-1207-4CB0-A8CE-CC7B8CFE2510}
< /PipelineComponentInfo_ExcelDestination>
{33D831DE-5DCF-48F0-B431-4D327B9E785D}
< /PipelineComponentInfo_Multicast>
< PipelineComponentInfo_ExcelSource>
{9F5C585F-2F02-4622-B273-F75D52419D4A}
< /PipelineComponentInfo_ExcelSource>
< PipelineComponentInfo_ExcelDestination>
{90E2E609-1207-4CB0-A8CE-CC7B8CFE2510}
< /PipelineComponentInfo_ExcelDestination>
Sunday, June 5, 2016
Subscribe to:
Posts (Atom)
Export a copy of the standard user acceptance testing (UAT) database
Reference link: Export a copy of the standard user acceptance testing (UAT) database - Finance & Operations | Dynamics 365 | Microsoft ...

-
Dynamics AX Tutorial - X++ Containers Functionality March 08, 2015 http://www.daxerptraining.com/blog/dynamics-ax-tutorial-containers-fun...
-
Hi Daxer's !!! I'm very glad to explore my knowledge on Microsoft Dynamics Ax . -- " Gaining knowledge is the first s...
-
void clicked() { SysExcelApplication xlsApplication; SysExcelWorkBooks xlsWorkBookCollection; SysExcelWorkBook ...