If you want to have feature for locating the customer/vendor addresses on Google map , than please have a look below ,
On Address form i have added a button Google Map , if clicked it will open Google Map inside AX!
For Having fun , select any record and change the address information and click on Google Map
or copy xpo File
Exportfile for AOT version 1.0 or later
Formatversion: 1
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #DEV_FileViewer
PROPERTIES
Name #DEV_FileViewer
ENDPROPERTIES
METHODS
Version: 3
SOURCE #classDeclaration
#public class FormRun extends ObjectRun
#{
#}
ENDSOURCE
SOURCE #init
#public void init()
#{
# super();
#
# // CtrlactiveX is name of ActiveX Control of type Microsoft WEB Browser
# CtrlactiveX.Navigate(element.args().parm());
# CtrlactiveX.allowEdit(false);
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
ENDOBJECTBANK
JOINS
ENDJOINS
DESIGN
PROPERTIES
Width #Column width
Height #Column height
Caption #File Viewer
ENDPROPERTIES
CONTAINER
CONTROL ACTIVEX
PROPERTIES
Name #CtrlActiveX
Width #Column width
Height #Column height
Caption #Microsoft Web Browser
ClassName #{8856F961-340A-11D0-A96B-00C04FD705A2}
ENDPROPERTIES
BINARY 0
ENDBINARY
BINARY 1
00
ENDBINARY
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: FRM
; Microsoft Dynamics AX Forms unloaded
; --------------------------------------------------------------------------------
FRMVERSION 5
FORM #Address
PROPERTIES
Name #Address
ENDPROPERTIES
METHODS
Version: 3
SOURCE #ClassDeclaration
#final class FormRun extends ObjectRun
#{
# DirPartyTable dirPartyTable;
# SalesTable salesTable;
# SalesLine salesLine;
# PurchTable purchTable;
# PurchLine purchLine;
# SalesCreateReleaseOrderLineTmp releaseOrderLine;
# TmpPurchLine tmpPurchLine;
# CompanyInfo companyInfo;
#
# QueryBuildRange adrTableid;
# QueryBuildRange adrRecid;
#
# RecId primaryAddressRecId;
# RecId origPrimaryAddressRecId;
# boolean isPrimaryAddress;
#
# SalesQuotationTable salesQuotationTable;
# EmplTable emplTable;
#
# #define.NotFound(-1)
#}
ENDSOURCE
SOURCE #run
#public void run()
#{
# ;
#
# SysListPageHelper::handleRunPreSuper(element, tab, 2, 1);
# super();
# SysListPageHelper::handleRunPostSuper(element, tab);
#}
ENDSOURCE
SOURCE #updateCallerForm
#/// <summary>
#/// Researches address information in an calling form if the form contains
#/// a datasource related to the address table.
#/// </summary>
#/// <remarks>
#/// The updateCallerForm method looks for and executes a method named updateAddress in the
#/// calling form when a record is created, updated or deleted.
#/// </remarks>
#void updateCallerForm()
#{
# if (element.args() && element.args().caller() && formHasMethod(element.args().caller(), identifierstr(updateAddress)))
# {
# element.args().caller().updateAddress();
# }
#}
ENDSOURCE
SOURCE #moveAddressToCustTable
#void moveAddressToCustTable()
#{
# CustTable custTable;
# ;
#
# if (salesTable)
# {
# custTable = CustTable::find(salesTable.CustAccount);
#
# address.AddrTableId = custTable.TableId;
# address.AddrRecId = custTable.RecId;
# address.update();
#
# address_ds.reread();
# address_ds.refresh();
# }
#}
ENDSOURCE
SOURCE #Init
#void init()
#{
# boolean isAddressTable = false;
# ;
#
# if (element.args().dataset() == tablenum(Address))
# {
# //
# // Only call the list page helper if the data source is Address
# // otherwise the helper class will clear the passed record set before
# // the link active code is executed.
# //
# SysListPageHelper::handleInitPreSuper(element);
# isAddressTable = true;
# }
#
# super();
#
# if (!element.args() ||
# !element.args().record() ||
# element.args().record().TableId != tablenum(SalesTable))
# {
# tableRelationName.visible(false);
# buttonMoveToCustomer.visible(false);
# }
#
# if (element.args() && element.args().record())
# {
# switch (element.args().record().TableId)
# {
# case tablenum(CustTable) :
# case tablenum(SalesTable) :
# case tablenum(SalesLine) :
# deliveryGroupCtrl.visible(true);
# shipCarrierInfo.visible(true);
# break;
#
# case tablenum(smmLeadTable) :
# case tablenum(smmOpportunityTable) :
# case tablenum(smmQuotationCompetitorGroup) :
# element.design().caption("@SYS7566"); //Addresses
# deliveryGroupCtrl.visible(false);
# shipCarrierInfo.visible(false);
# break;
#
# default :
# deliveryGroupCtrl.visible(false);
# shipCarrierInfo.visible(false);
# break;
# }
# }
#
# if (isAddressTable)
# {
# //
# // Only call the list page helper if the data source is Address
# // otherwise the helper class will copy a invalid query into the form.
# //
# SysListPageHelper::handleInitPostSuper(element);
# }
#}
ENDSOURCE
ENDMETHODS
OBJECTBANK
PROPERTIES
ENDPROPERTIES
DATASOURCE
OBJECTPOOL
PROPERTIES
Name #Address
Table #Address
Index #AddrIdx
LinkType #Active
ENDPROPERTIES
FIELDLIST
DATAFIELD CountryRegionId
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# address.AddressMap::formatAddress();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD State
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# address.AddressMap::formatAddress();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD County
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# address.AddressMap::formatAddress();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD Street
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# address.AddressMap::formatAddress();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
DATAFIELD City
PROPERTIES
ENDPROPERTIES
METHODS
Version: 3
SOURCE #modified
#public void modified()
#{
# super();
# address.AddressMap::formatAddress();
#}
ENDSOURCE
ENDMETHODS
ENDDATAFIELD
ENDFIELDLIST
ENDOBJECTPOOL
METHODS
Version: 3
SOURCE #creatFindRanges
#void creatFindRanges()
#{
# QueryBuildDataSource queryBuildDataSource;
# ;
#
# queryBuildDataSource = address_ds.query().dataSourceTable(tablenum(Address));
#
# adrTableid = SysQuery::findOrCreateRange(queryBuildDataSource, fieldnum(Address, AddrTableId));
# adrRecid = SysQuery::findOrCreateRange(queryBuildDataSource, fieldnum(Address, AddrRecId));
#
#}
ENDSOURCE
SOURCE #addQueryDirPartyAddressRelationship
#void addQueryDirPartyAddressRelationship(Common entity)
#{
# QueryBuildDataSource qbds1,qbds2,qbds3;
# fieldId dirFieldId;
# SysDictTable dictTable;
#;
# isPrimary.visible(true);
# isShared.visible(false);
#
# dictTable = new DictTable(entity.TableId);
# dirFieldId = dictTable.fieldName2Id(identifierstr(PartyId));
# if (dirFieldId)
# {
# qbds1 = this.query().dataSourceTable(tablenum(Address));
# qbds2 = qbds1.addDataSource(tablenum(DirPartyAddressRelationshipMapping));
# qbds2.addLink(fieldnum(Address,RecId),fieldnum(DirPartyAddressRelationshipMapping,AddressRecId));
# qbds2.relations(true);
# qbds2.joinMode(JoinMode::InnerJoin);
# qbds3 = qbds2.addDataSource(tablenum(DirPartyAddressRelationship));
# qbds3.relations(true);
# qbds3.joinMode(JoinMode::InnerJoin);
# qbds3.addDynalink(fieldnum(DirPartyAddressRelationship,PartyId),entity,dirFieldId);
# }
#}
ENDSOURCE
SOURCE #isPrimary
#// BP deviation documented
#edit DirIsPrimaryAddress isPrimary(boolean _set, Address _address, DirIsPrimaryAddress _isPrimary)
#{
# FormDataSource f;
# ;
# if (_address.AddrTableId == tablenum(DirPartyTable) &&
# (primaryAddressRecId == #NotFound || primaryAddressRecId == _address.RecId))
# {
# if (_set)
# {
# primaryAddressRecId = _isPrimary ? _address.RecId : #NotFound;
# isPrimaryAddress = _isPrimary;
# _address.IsPrimary = _isPrimary;
# f= _address.dataSource();
# if (f)
# {
# f.forceWrite(true);
# }
# }
# }
# return ((isPrimaryAddress && primaryAddressRecId == 0)|| (primaryAddressRecId != #NotFound && primaryAddressRecId == _address.RecId) ? true : false);
#}
ENDSOURCE
SOURCE #addQueryDirTables
#void addQueryDirTables(Common entity)
#{
# DirParty party;
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange qbr;
# fieldId dirFieldId;
# SysDictTable dictTable;
# str queryExpression;
#
# ;
# isShared.visible(entity.TableId != tablenum(DirPartyTable));
# isPrimary.visible(true);
# primaryAddressRecId = #NotFound;
# origprimaryAddressRecId = #NotFound;
#
#
# dictTable = new DictTable(entity.TableId);
# dirFieldId = dictTable.fieldName2Id(identifierstr(PartyId));
# if (dirFieldId)
# {
# dirPartyTable = DirPartyTable::find(entity.(dirFieldId));
# party = DirParty::constructFromCommon(dirPartyTable);
# if (party)
# {
# party.initializeAddressInfo(DateTimeUtil::getSystemDateTime());
# if (party.getDirPartyAddress().getAddressRecId())
# {
# primaryAddressRecId = party.getDirPartyAddress().getAddressRecId();
# origPrimaryAddressRecId = primaryAddressRecId;
# }
# }
#
# if (entity.TableId != tablenum(DirPartyTable))
# {
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
#
# queryExpression = '(((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(dirPartyTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(dirPartyTable.RecId) +
# ')) || ((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(entity.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(entity.RecId) +
# ')))';
#
# qbr = queryBuildDataSource.addRange(fieldnum(Address, RecId));
# qbr.value(queryExpression);
# qbr.status(RangeStatus::Hidden);
# }
# }
#}
ENDSOURCE
SOURCE #addQuerySalesQuotationTable
#void addQuerySalesQuotationTable(SalesQuotationTable _salesQuotationTable)
#{
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange qbr;
# CustTable custTable;
# str queryExpression;
# ;
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# custTable = CustTable::find(_salesQuotationTable.CustAccount);
#
# queryExpression = '(((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(_salesQuotationTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(_salesQuotationTable.RecId) +
# ')) || ((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(custTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(custTable.RecId) +
# ')))';
#
# qbr = queryBuildDataSource.addRange(fieldnum(Address, Address));
# qbr.value(queryExpression);
# qbr.status(RangeStatus::Hidden);
#}
ENDSOURCE
SOURCE #addQueryPurchLine
#void addQueryPurchLine(PurchLine _purchLine)
#{
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange qbr;
# PurchTable _purchTable = _purchLine.purchTable();
# VendTable vendTable;
# str queryExpression;
# ;
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# vendTable = VendTable::find(_purchLine.VendAccount);
#
# queryExpression = '(((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(_purchTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(_purchTable.RecId) +
# ')) || ((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(vendTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(vendTable.RecId) +
# ')))';
#
# qbr = queryBuildDataSource.addRange(fieldnum(Address, Address));
# qbr.value(queryExpression);
# qbr.status(RangeStatus::Hidden);
#}
ENDSOURCE
SOURCE #addQuerySalesLine
#void addQuerySalesLine(SalesLine _salesLine)
#{
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange qbr;
# SalesTable _salesTable = _salesLine.salesTable();
# CustTable custTable;
# str queryExpression;
# ;
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# custTable = CustTable::find(_salesLine.CustAccount);
#
# queryExpression = '(((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(_salesTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(_salesTable.RecId) +
# ')) || ((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(custTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(custTable.RecId) +
# ')))';
#
# qbr = queryBuildDataSource.addRange(fieldnum(Address, Address));
# qbr.value(queryExpression);
# qbr.status(RangeStatus::Hidden);
#}
ENDSOURCE
SOURCE #addQuerySalesTable
#void addQuerySalesTable(SalesTable _salesTable)
#{
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange qbr;
# CustTable custTable;
# str queryExpression;
# ;
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# custTable = CustTable::find(_salesTable.CustAccount);
#
# queryExpression = '(((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(_salesTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(_salesTable.RecId) +
# ')) || ((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(custTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(custTable.RecId) +
# ')))';
#
# qbr = queryBuildDataSource.addRange(fieldnum(Address, Address));
# qbr.value(queryExpression);
# qbr.status(RangeStatus::Hidden);
#}
ENDSOURCE
SOURCE #addQueryPurchTable
#void addQueryPurchTable(PurchTable _purchTable)
#{
# QueryBuildDataSource queryBuildDataSource;
# QueryBuildRange qbr;
# VendTable vendTable;
# str queryExpression;
# ;
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# vendTable = VendTable::find(_purchTable.OrderAccount);
#
# queryExpression = '(((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(_purchTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(_purchTable.RecId) +
# ')) || ((' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrTableId)) +
# ' == ' + queryValue(vendTable.TableId) +
# ') && (' +
# tableid2name(tablenum(Address)) + '.' + fieldid2name(tablenum(Address), fieldnum(Address, AddrRecId)) +
# ' == ' + queryValue(vendTable.RecId) +
# ')))';
#
# qbr = queryBuildDataSource.addRange(fieldnum(Address, Address));
# qbr.value(queryExpression);
# qbr.status(RangeStatus::Hidden);
#}
ENDSOURCE
SOURCE #initValue
#void initValue()
#{
# fieldId dirFieldId;
# SysDictTable dictTable;
# ;
#
# super();
#
# if (element.args().record())
# {
# switch (element.args().record().TableId)
# {
# case tablenum(SMAServiceOrderTable) :
# case tablenum(CustTable) :
# case tablenum(ContactPerson) :
# case tablenum(VendTable) :
# case tablenum(SalesQuotationTable) :
# case tablenum(smmBusRelTable) :
# case tablenum(EmplTable) :
# case tablenum(SalesTable) : address.AddrTableId = element.args().record().TableId;
# address.AddrRecId = element.args().record().RecId;
# break;
#
# case tablenum(PurchLine) : purchLine = element.args().record();
# address.AddrTableId = purchLine.purchTable().TableId;
# address.AddrRecId = purchLine.purchTable().RecId;
# break;
#
# case tablenum(SalesLine) : salesLine = element.args().record();
# address.AddrTableId = salesLine.salesTable().TableId;
# address.AddrRecId = salesLine.salesTable().RecId;
# break;
#
# case tablenum(SalesCreateReleaseOrderLineTmp) : releaseOrderLine = element.args().record();
# address.AddrTableId = SalesTable::find(releaseOrderLine.SalesIdBlanket).TableId;
# address.AddrRecId = SalesTable::find(releaseOrderLine.SalesIdBlanket).RecId;
# break;
#
# case tablenum(smmLeadTable) :
# case tablenum(smmOpportunityTable) :
# case tablenum(smmQuotationCompetitorGroup) :
# dictTable = new DictTable(element.args().record().TableId);
# dirFieldId = dictTable.fieldName2Id(identifierstr(PartyId));
#
# address.AddrTableId = tablenum(DirPartyTable);
# address.AddrRecId = DirPartyTable::find(element.args().record().(dirFieldId)).RecId;
# break;
# }
# }
# if (dirPartyTable && DirParameters::defaultSharedAddress(element.args().dataset()))
# {
# address.AddrTableId = dirPartyTable.TableId;
# address.AddrRecId = dirPartyTable.RecId;
# }
#
#}
#
ENDSOURCE
SOURCE #LinkActive
#void linkActive()
#{
# QueryBuildDataSource queryBuildDataSource;
# ;
#
# this.creatFindRanges();
#
# switch(element.args().record().TableId)
# {
# case tablenum(DirPartyTable) :
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# this.addQueryDirTables(element.args().record());
# break;
#
# case tablenum(CustTable) :
# case tablenum(DirPartyInternalOrganizationTable) :
# case tablenum(VendTable) :
# case tablenum(smmBusRelTable) :
# case tablenum(ContactPerson) :
# case tablenum(EmplTable) :
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# queryBuildDataSource.clearRanges();
# queryBuildDataSource.clearDynalinks();
# this.addQueryDirTables(element.args().record());
# break;
#
# case tablenum(smmLeadTable) :
# case tablenum(smmOpportunityTable) :
# case tablenum(smmQuotationCompetitorGroup) :
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# queryBuildDataSource.clearRanges();
# queryBuildDataSource.clearDynalinks();
# this.addQueryDirTables(element.args().record());
# this.addQueryDirPartyAddressRelationship(element.args().record());
# break;
#
# case tablenum(SalesTable) : buttonTransfer.helpText("@SYS26376");
# buttonTransfer.visible(true);
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# queryBuildDataSource.clearRanges();
# queryBuildDataSource.clearDynalinks();
# this.addQuerySalesTable(element.args().record());
# salesTable = element.args().record();
# break;
#
# case tablenum(SalesLine) : buttonTransfer.helpText("@SYS26376");
# buttonTransfer.visible(true);
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# queryBuildDataSource.clearRanges();
# queryBuildDataSource.clearDynalinks();
# this.addQuerySalesLine(element.args().record());
# salesLine = element.args().record();
# break;
#
# case tablenum(PurchTable) : buttonTransfer.helpText("@SYS68140");
# buttonTransfer.visible(true);
#
# purchTable = element.args().record();
#
# adrTableid.value (queryValue(CompanyInfo::find().TableId));
# adrRecid.value (queryValue(CompanyInfo::find().RecId));
# break;
#
# case tablenum(PurchLine) : buttonTransfer.helpText("@SYS68140");
# buttonTransfer.visible(true);
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# queryBuildDataSource.clearRanges();
# queryBuildDataSource.clearDynalinks();
# this.addQueryPurchLine(element.args().record());
# purchLine = element.args().record();
# break;
#
# case tablenum(SalesCreateReleaseOrderLineTmp) : buttonTransfer.helpText("");
# buttonTransfer.visible(true);
#
# releaseOrderLine = element.args().record();
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# queryBuildDataSource.clearRanges();
# queryBuildDataSource.clearDynalinks();
#
# this.addQuerySalesTable(SalesTable::find(releaseOrderLine.SalesIdBlanket));
# break;
#
# case tablenum(TmpPurchLine) : buttonTransfer.helpText("");
# buttonTransfer.visible(true);
#
# tmpPurchLine = element.args().record();
#
# adrTableid.value (queryValue(CompanyInfo::find().TableId));
# adrRecid.value (queryValue(CompanyInfo::find().RecId));
# break;
#
# case tablenum(SalesQuotationTable) : buttonTransfer.helpText("@SYS26376");
# buttonTransfer.visible(true);
#
# queryBuildDataSource = this.query().dataSourceTable(tablenum(Address));
# queryBuildDataSource.clearRanges();
# queryBuildDataSource.clearDynalinks();
# this.addQuerySalesQuotationTable(element.args().record());
# salesQuotationTable = element.args().record();
# break;
#
# default : break;
# }
#
# address_ds.allowCreate(element.args().record().RecId != 0);
#
# super();
#}
ENDSOURCE
SOURCE #write
#public void write()
#{
# RecId origRecId;
# ;
# ttsbegin;
#
# origRecId = address.orig().RecId;
#
# // If primary address is changed to alternate address
# if (origPrimaryAddressRecId && primaryAddressRecId == #NotFound &&
# address.RecId == origPrimaryAddressRecId)
# {
# DirPartyAddress::changePrimaryToAltAddress(address);
# }
# // If alternate address is changed to primary address
# else if (origPrimaryAddressRecId == #NotFound &&
# address.RecId == primaryAddressRecId)
# {
# DirPartyAddress::changeAltAddressToPrimary(address);
#
# }
#
# super();
#
# origPrimaryAddressRecId = primaryAddressRecId;
# if (!origRecId)
# {
# primaryAddressRecId = address.IsPrimary ? address.RecId : primaryAddressRecId;
# DirPartyAddress::insertPartyAddressRelationship(address);
# }
#
# ttscommit;
#
# element.updateCallerForm();
#}
ENDSOURCE
SOURCE #delete
#public void delete()
#{
# RecId oldRecId;
# ;
# oldRecId = address.RecId;
# super();
# if (isPrimaryAddress && primaryAddressRecId == oldRecId)
# {
# primaryAddressRecId = #NotFound;
# isPrimaryAddress = false;
# }
# element.updateCallerForm();
#}
ENDSOURCE
SOURCE #isShared
#// BP deviation documented
#edit DirIsSharedAddress isShared(boolean _set, Address _address, NoYesId _shared)
#{
# ;
# if (_set && !_address.RecId)
# {
# if (_shared)
# {
# // if address type is third-party shipping, then the address cannot be shared
# if (_address.Type == AddressType::ShipCarrierThirdPartyShipping)
# {
# return checkFailed("@SYS127142");
# }
# else
# {
# _address.AddrTableId = tablenum(DirPartyTable);
# _address.AddrRecId = dirPartyTable.RecId;
# }
# }
# else
# {
# _address.AddrTableId = element.args().record().TableId;
# _address.AddrRecId = element.args().record().RecId;
# if (isPrimaryAddress && primaryAddressRecId == _address.RecId)
# {
# primaryAddressRecId = #NotFound;
# isPrimaryAddress = false;
# _address.IsPrimary = false;
# }
# }
# }
# return _address.AddrTableId == tablenum(DirPartyTable) ? NoYes::Yes : NoYes::No;
#}
ENDSOURCE
ENDMETHODS
ENDDATASOURCE
ENDOBJECTBANK
JOINS
ENDJOINS
DESIGN
PROPERTIES
Left #216
Top #121
Caption #@SYS23936
TitleDatasource #Address
HTMLHelpFile #HTMLHelpFileIWorker
HTMLHelpTopic #AxShared.chm::/html/b00c0a20-6a59-4d94-9461-f6ff1f672fcc.htm
DataSource #Address
HideIfEmpty #No
ENDPROPERTIES
CONTAINER
CONTROL TAB
PROPERTIES
Name #Tab
AutoDeclaration #Yes
Width #Column width
Height #Column height
Tabs #4
DataSource #Address
Columns #1
ENDPROPERTIES
CONTAINER
CONTROL TABPAGE
PROPERTIES
Name #TabOverview
Height #Column height
Caption #@SYS9039
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #Grid
Width #Column width
Height #Column height
DataSource #Address
ENDPROPERTIES
CONTAINER
CONTROL CHECKBOX
PROPERTIES
Name #isShared
AutoDeclaration #Yes
Visible #No
BackgroundColor #Window background
DataSource #Address
DataMethod #isShared
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #isPrimary
AutoDeclaration #Yes
Visible #No
BackgroundColor #Window background
DataSource #Address
DataMethod #isPrimary
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Addr_Name
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/25a26fa7-9f31-45f8-8860-7cc5304c8d0e.htm
DataSource #Address
DataField #Name
ENDPROPERTIES
ENDCONTROL
CONTROL COMBOBOX
PROPERTIES
Name #Address_Type
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/b0ce3fb9-348a-4da7-9b72-23b0e23f749b.htm
Selection #255
DataSource #Address
DataField #type
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #tableRelationName
AutoDeclaration #Yes
AllowEdit #No
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/AEADF5C9-2EC7-4144-8320-8CF60C2DF67F.htm
DataSource #Address
DataMethod #tableRelationName
ENDPROPERTIES
ENDCONTROL
CONTROL CHECKBOX
PROPERTIES
Name #CheckBox
HelpText #@sys1234
BackgroundColor #Window background
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #General
Caption #@SYS2952
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #IdentificationShow
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/b0ce3fb9-348a-4da7-9b72-23b0e23f749b.htm
Caption #@SYS80392
ENDPROPERTIES
CONTAINER
CONTROL COMBOBOX
PROPERTIES
Name #Address_Type1
SecurityKey #InventDaily
Selection #255
DataSource #Address
DataField #type
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Description
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/F99D7EB4-1E40-4990-81A0-0F64FF56366A.htm
DataSource #Address
DataGroup #Description
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabAddress
Caption #@SYS9362
DataSource #Address
Columns #Auto
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #GroupAddress
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/F299550F-2C13-48D0-85CC-DFCC91B140A9.htm
DataSource #Address
DataGroup #Address
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #AddressView
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/5c59f087-5a31-4b4c-bdbc-2c696c5a13d8.htm
DataSource #Address
DataGroup #AddressDisplay
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Address
DataSource #Address
DataField #Address
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #AddressView_FRCARAddressing
DataSource #Address
DataField #FRCARAddressing
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Location
DataSource #Address
DataGroup #Location
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabCommunication
Height #Column height
Caption #@SYS21663
DataSource #Address
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #GroupCommunication
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/273ECD7A-E2C5-4982-8A74-7E0F573B8107.htm
FrameType #None
DataSource #Address
DataGroup #ContactInfo
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #Phone
DataSource #Address
DataField #Phone
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #PhoneLocal
DataSource #Address
DataField #PhoneLocal
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #CellularPhone
DataSource #Address
DataField #CellularPhone
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Communication_Pager
DataSource #Address
DataField #Pager
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #TeleFax
DataSource #Address
DataField #TeleFax
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Email
DataSource #Address
DataField #Email
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Communication_SMS
DataSource #Address
DataField #SMS
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #URL
DataSource #Address
DataField #URL
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Telex
DataSource #Address
DataField #Telex
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #Various
Height #Column height
Caption #@SYS1284
DataSource #Address
ENDPROPERTIES
CONTAINER
CONTROL GROUP
PROPERTIES
Name #TimeZone
DataSource #Address
DataGroup #TimeZone
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #Tax
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/ecbf17d5-c036-4772-a4e3-acf24adad6d8.htm
DataSource #Address
DataGroup #SalesTax
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #TaxGroup
DataSource #Address
DataField #TaxGroup
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #DeliveryGroupCtrl
AutoDeclaration #Yes
HTMLHelpFile #HTMLHelpFileAxShared
HTMLHelpTopic #html/0E2EE0A6-27E8-418F-8D3E-4BFAD470FC56.htm
DataSource #Address
DataGroup #Delivery
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
CONTROL GROUP
PROPERTIES
Name #ShipCarrierInfo
AutoDeclaration #Yes
DataSource #Address
DataGroup #ShipCarrierInfo
AutoDataGroup #Yes
ENDPROPERTIES
CONTAINER
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabPage
ENDPROPERTIES
CONTAINER
CONTROL ACTIVEX
PROPERTIES
Caption #Microsoft.Dynamics.Framework.DirectoryView.DirPartyDirectoryTreeWrapper
ClassName #{B7DE7495-C045-4848-89BD-7769560D7461}
ENDPROPERTIES
BINARY 0
ENDBINARY
BINARY 1
00
ENDBINARY
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL TABPAGE
PROPERTIES
Name #TabPage1
ENDPROPERTIES
CONTAINER
CONTROL GRID
PROPERTIES
Name #Grid1
DataSource #Address
ENDPROPERTIES
CONTAINER
CONTROL STRINGEDIT
PROPERTIES
Name #EXU_StringEdit
ExtendedDataType
ARRAY
#EXU_Str2000
#
ENDARRAY
ENDPROPERTIES
ENDCONTROL
CONTROL STRINGEDIT
PROPERTIES
Name #Address_EXU_Str2000
DataSource #Address
DataField #EXU_Str2000
ENDPROPERTIES
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDCONTROL
CONTROL BUTTONGROUP
PROPERTIES
Name #ButtonGroup
ENDPROPERTIES
CONTAINER
CONTROL BUTTON
PROPERTIES
Name #buttonTransfer
AutoDeclaration #Yes
Visible #No
Left #Auto (right)
HelpText #@SYS84012
Text #@SYS8801
ENDPROPERTIES
METHODS
Version: 3
SOURCE #Clicked
#void clicked()
#{
# if (salesTable && address)
# {
# salesTable.setAddress(address);
# salesTable.dataSource().refresh();
# element.close();
# }
#
# if (salesLine && address)
# {
# salesLine.setAddress(address);
# salesLine.dataSource().refresh();
# element.close();
# }
#
# if (purchTable && address)
# {
# purchTable.setAddress(address);
# purchTable.dataSource().refresh();
# element.close();
# }
#
# if (purchLine && address)
# {
# purchLine.setAddress(address);
# purchLine.dataSource().refresh();
# element.close();
# }
#
# if (releaseOrderLine && address)
# {
# releaseOrderLine.setAddress(address);
# releaseOrderLine.dataSource().refresh();
# element.close();
# }
#
# if (tmpPurchLine && address)
# {
# tmpPurchLine.setAddress(address);
# tmpPurchLine.dataSource().refresh();
# element.close();
# }
#
# if (salesQuotationTable && address)
# {
# salesQuotationTable.setAddress(address);
# salesQuotationTable.dataSource().refresh();
# element.close();
# }
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #buttonMoveToCustomer
AutoDeclaration #Yes
Left #Auto (right)
HelpText #@SYS68131
Text #@SYS24586
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# super();
#
# element.moveAddressToCustTable();
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
CONTROL BUTTON
PROPERTIES
Name #CtrlGoogleMapButton
AutoDeclaration #Yes
Text #Google Map
ENDPROPERTIES
METHODS
Version: 3
SOURCE #clicked
#void clicked()
#{
# FormRun formRun;
# Args args = new Args();
# Str url;
# #Define.MapURL('http://maps.google.com.au?q=\%1')
# ;
#
#
# url = Address.Street +","
# + Address.City +","
# + Address.State +","
# + Address.ZipCode +","
# + Address.CountryRegionId;
#
#
# url = strReplace(url, "\n", ","); // replace newline with commas
#
# url = System.Web.HttpUtility::UrlEncode(url);
#
# args.name(formstr(DEV_FileViewer));
# args.parm(strfmt(#MapURL, url));
# formRun = classFactory.formRunClass(args);
#
# formRun.init();
# formRun.run();
# formRun.wait();
#
#}
ENDSOURCE
ENDMETHODS
ENDCONTROL
ENDCONTAINER
ENDCONTROL
ENDCONTAINER
ENDDESIGN
ENDFORM
***Element: PRN
; Microsoft Dynamics AX Project : DEV_GoogleMap unloaded
; --------------------------------------------------------------------------------
PROJECTVERSION 2
PROJECT #DEV_GoogleMap
SHARED
PROPERTIES
Name #DEV_GoogleMap
ENDPROPERTIES
PROJECTCLASS ProjectNode
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #DEV_FileViewer
ENDNODE
BEGINNODE
FILETYPE 0
UTILTYPE 11
UTILOBJECTID 0
NODETYPE 201
NAME #Address
ENDNODE
ENDPROJECT
***Element: END
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.