FormDataSource salesLine_ds = this.formRun().dataSource(formDataSourceStr(SalesTable, salesLine));
SalesLine salesLine = salesLine_ds.cursor();
This blog is for Dynamics AX (AXAPTA) Developers,this will help you for your development issues. This site contains some Microsoft Dynamics AX X++ Codes for use in your day to day use.
FormDataSource salesLine_ds = this.formRun().dataSource(formDataSourceStr(SalesTable, salesLine));
SalesLine salesLine = salesLine_ds.cursor();
LogisticsPostalAddress deliveryPostalAddress = LogisticsPostalAddress::findRecId(salesTable.DeliveryPostalAddress);
deliveryPostalAddress.City;
deliveryPostalAddress.State;
public EcoResProductDisplayProductNumber getProductVariants(SalesLine _saleLine)
{
InventDimCombination inventDimCombination = InventDimCombination::findVariantId(_saleLine.RetailVariantId);
InventDim inventDim;
InventDistinctProductExpanded inventDistinctProductExpanded;
select inventDistinctProductExpanded
where inventDistinctProductExpanded.ItemId == _saleLine.ItemId
&& inventDistinctProductExpanded.InventDimId == inventDimCombination.InventDimId;
return inventDistinctProductExpanded.DisplayProductNumber;
}
class TestClass
{
public static void main(Args args)
{
PurchTable purchTable;
System.Exception ex;
//Counter cnt = 1;
while select purchTable
{
try
{
//doing updation on the purchatable.
}
catch(ex)
{
System.String messageEx = ex.Message;
warning(strFmt("There is an error%1",messageEx));
}
}
}
}
public static void TRGvalidateHours(FormControl sender, int controlName)
{
FormRealControl control = sender as FormRealControl;
FormRun formRun = sender.formRun();
FormStringControl projIdControl = formRun.design().controlName(formControlStr(TSTimesheetEntry,ProjId));
FormDataSource TSTimeSheetLineWeek_ds = formRun.dataSource(formDataSourceStr(TSTimesheetEntry,TSTimesheetLineWeek)) as FormDataSource;
TSTimesheetLineWeek timesheetLineWeek = TSTimeSheetLineWeek_ds.cursor();
TSTimesheetTable timeSheetTable = TSTimesheetTable::find(timesheetLineWeek.TimesheetNbr);
ProjTable projTable = ProjTable::find(projIdControl.text());
}
System.Exception ex;
try
{
// total logic
}
catch(ex)
{
System.String messageEx = ex.Message;
info(strFmt("Exception: %1",messageEx));
}
catch (Exception::CLRError)
{
ex = CLRInterop::getLastException().GetBaseException();
error(ex.get_Message());
}
[DataContractAttribute] class ABCUserProfilesBulkDeleteContract { UserId userId; [DataMemberAttribute('UserId')] pu...