Our support engineers have assembled the top recommended solutions for you.
Microsoft Dynamics AX 2012CRM Connector in Microsoft Dynamics AX 2012Financials Management in Microsoft Dynamics AX 2012Upgrading to Microsoft Dynamics AX 2012
Microsoft Dynamics AX 2009
Application Object Server (AOS)
Enterprise Portal and Role Centers
Inventory Costing in Microsoft Dynamics AX 2009
Invoice Settlements/Discounts/Reversals
SSRS and SSAS Integration
Workflow
Hi,
I am trying to use 'stores' as a financial dimension in AX 2012. However, I am unable to achieve the linking between 'retail channel' and 'operating unit'. Therefore, I tested this in Contosso also and get the same issue.
The following steps are followed:
Create a dedicated warehouse and mark this as store
create a retail channel and assign this warehouse as warehouse and shipping warehouse.
update other fields. However, we get an erro saying that "Field Operating Unit number must be filled in.
also another STOP error "Cannot create a record in Operating Unit (OMOperatingUnit).Party ID 8866. The record already exists
any help appreciated
Thanks
Hi Jacks,
I've come across this problem, too. I created a quick and dirty solution which works.I've added the "Operating unit number" to the "Retail channel" form and made it editable.
Now, when you create a "Retail channel", you can also enter the "Operating unit number".This will link the "Retail channel" and "Operating unit".
Import the following xpo:
Exportfile for AOT version 1.0 or laterFormatversion: 1
***Element: FRM
; Microsoft Dynamics AX Forms unloaded; --------------------------------------------------------------------------------FRMVERSION 12
FORM #RetailStoreTable PROPERTIES Name #RetailStoreTable Origin #{0B0D0000-0000-1000-2E52-83BEA9ED8165} ENDPROPERTIES METHODS SOURCE #classDeclaration #public class FormRun extends ObjectRun #{ # NumberSeqFormHandler numberSeqStoreId; # NumberSeqFormHandler numberSeqOperatingUnitNumber; # FormCheckBoxControl ctrlOnetimeCusomer; # # DimensionDefaultingController dimensionDefaultingController; # # LedgerDimensionDefaultAccountController roundingAccDimAccController; # # SysLookupMultiSelectCtrl customerAddressBookCtrl,employeeAddressBookCtrl; # container custAddressBook,emplAddressBook; #} # ENDSOURCE SOURCE #init #public void init() #{ # super(); # # dimensionDefaultingController = DimensionDefaultingController::constructInTabWithValues(true, true, true, 0, this, tabFinancialDimensions, "@SYS138487"); # dimensionDefaultingController.parmAttributeValueSetDataSource(RetailStoreTable_DS, fieldStr(RetailStoreTable, DefaultDimension)); # dimensionDefaultingController.pageActivated(); # # roundingAccDimAccController = LedgerDimensionDefaultAccountController::construct(RetailStoreTable_DS, fieldstr(RetailStoreTable, RoundingAccountLedgerDimension)); # # customerAddressBookCtrl = SysLookupMultiSelectCtrl::construct(element, CustomerAddressBook, queryStr(DirAddressBookLookup)); # # employeeAddressBookCtrl = SysLookupMultiSelectCtrl::construct(element, EmployeeAddressBook, queryStr(DirAddressBookLookup)); # # //Create the number sequence for OMOperatingUnitNumber if it doesn't exist # NumberSequenceTable::autoCreate(extendedTypeNum(OMOperatingUnitNumber), NumberSeqScopeFactory::createGlobalScope(), '', NoYes::No, '########'); #} ENDSOURCE SOURCE #numberSeqOperatingUnitNumber #NumberSeqFormHandler numberSeqOperatingUnitNumber() #{ # if( !numberSeqOperatingUnitNumber ) # { # numberSeqOperatingUnitNumber = NumberSeqFormHandler::newForm( # OMOperatingUnit::getNumberSequenceReference().NumberSequenceId, # element, # OMOperatingUnit_DS, # fieldNum(OMOperatingUnit, OMOperatingUnitNumber)); # } # return numberSeqOperatingUnitNumber; #} ENDSOURCE SOURCE #numberSeqStoreId #NumberSeqFormHandler numberSeqStoreId() #{ # if (!numberSeqStoreId) # numberSeqStoreId = numberSeqFormHandler::newForm(RetailParameters::numRefStoreId().NumberSequenceId, # element, # RetailStoreTable_DS, # fieldNum(RetailStoreTable,StoreNumber) # ); # return numberSeqStoreId; #} ENDSOURCE SOURCE #updateAddressBooks #public void updateAddressBooks() #{ # void UpdateAddresses(container addressBookContainer, RetailAddressBookType addressBookType) # { # Set selectedAddresses; # SetEnumerator selectedAddressEnumerator; # DirAddressBook addressBook; # str addressTmp; # int i; # # selectedAddresses = new Set(Types::String); # for (i = 1 ; i <= conLen(addressBookContainer) ; i++) # { # addressTmp = conPeek(addressBookContainer,i); # selectedAddresses.add(addressTmp); # } # # while select retailStoreAddressBook # where retailStoreAddressBook.StoreRecId == retailStoreTable.RecId && # retailStoreAddressBook.AddressBookType == addressBookType # { # select Name from addressBook where addressBook.RecId == retailStoreAddressBook.AddressBook; # # // If the existing address is in the new list, delete from selectedAddresses # // so that selectedAddresses leftover will get inserted later, # // or else delete the existing address from the database. # if (selectedAddresses.in(addressBook.Name)) # { # selectedAddresses.remove(addressBook.Name); # } # else # { # retailStoreAddressBook.delete(); # } # } # # // Insert selected addressed that are not found in database. # selectedAddressEnumerator = selectedAddresses.getEnumerator(); # while (selectedAddressEnumerator.moveNext()) # { # retailStoreAddressBook.insertAddressBook(retailStoreTable.RecId, selectedAddressEnumerator.current(), addressBookType); # } # } # ; # # //Only do this if we have a retailStoreTable. # if (retailStoreTable.RecId) # { # //Customer # custAddressBook = customerAddressBookCtrl.getSelectedFieldValues(); # UpdateAddresses(custAddressBook, RetailAddressBookType::Customer); # # //Employee # emplAddressBook = employeeAddressBookCtrl.getSelectedFieldValues(); # UpdateAddresses(emplAddressBook, RetailAddressBookType::Employee); # } #} ENDSOURCE SOURCE #updateControls #public void updateControls() #{ # customerAddressBookCtrl.set(retailStoreAddressBook.addressBooks(RetailStoreTable.RecId, RetailAddressBookType::Customer)); # employeeAddressBookCtrl.set(retailStoreAddressBook.addressBooks(RetailStoreTable.RecId, RetailAddressBookType::Employee)); #} ENDSOURCE ENDMETHODS OBJECTBANK PROPERTIES ENDPROPERTIES DATASOURCE OBJECTPOOL PROPERTIES Name #RetailStoreTable Table #RetailStoreTable ENDPROPERTIES FIELDLIST DATAFIELD taxGroup PROPERTIES ENDPROPERTIES METHODS SOURCE #lookup #public void lookup(FormControl _formControl, str _filterStr = "") #{ # SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(TaxGroupHeading), _formControl); # Query query = new Query(); # # query.allowCrossCompany(true); # query.addCompanyRange(retailStoreTable.inventLocationDataAreaId); # query.addDataSource(tableNum(TaxGroupHeading)); # # sysTableLookup.addLookupfield(fieldnum(TaxGroupHeading, TaxGroup), true); # sysTableLookup.addLookupfield(fieldnum(TaxGroupHeading, TaxGroupName)); # sysTableLookup.addLookupfield(fieldnum(TaxGroupHeading, dataAreaId)); # # sysTableLookup.parmQuery(query); # sysTableLookup.performFormLookup(); #} ENDSOURCE ENDMETHODS ENDDATAFIELD DATAFIELD DefaultCustAccount PROPERTIES ENDPROPERTIES METHODS SOURCE #lookup #public void lookup(FormControl _formControl, str _filterStr = "") #{ # SysTableLookup sysTableLookup = SysTableLookup::newParameters(tablenum(CustTable), _formControl); # Query query = new Query(); # # query.allowCrossCompany(true); # query.addCompanyRange(retailStoreTable.inventLocationDataAreaId); # query.addDataSource(tableNum(CustTable)); # # sysTableLookup.addLookupfield(fieldnum(CustTable, AccountNum), true); # sysTableLookup.addLookupfield(fieldnum(CustTable, dataAreaId)); # # sysTableLookup.parmQuery(query); # sysTableLookup.performFormLookup(); #} ENDSOURCE ENDMETHODS ENDDATAFIELD DATAFIELD InventLocationIdForCustomerOrder PROPERTIES ENDPROPERTIES METHODS SOURCE #lookup #public void lookup(FormControl _formControl, str _filterStr = "") #{ # SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventLocation), _formControl); # Query query = new Query(); # # sysTableLookup.addLookupfield(fieldNum(InventLocation, InventLocationId), true); # sysTableLookup.addLookupfield(fieldNum(InventLocation, InventSiteId)); # # query.allowCrossCompany(true); # # query.addCompanyRange(retailStoreTable.inventLocationDataAreaId); # query.addDataSource(tableNum(InventLocation)); # sysTableLookup.parmQuery(query); # sysTableLookup.performFormLookup(); #} ENDSOURCE ENDMETHODS ENDDATAFIELD REFERENCEFIELD RoundingAccountLedgerDimension PROPERTIES ENDPROPERTIES METHODS SOURCE #resolveReference #public Common resolveReference(FormReferenceControl _formReferenceControl) #{ # return roundingAccDimAccController.resolveReference(); #} ENDSOURCE ENDMETHODS ENDREFERENCEFIELD DATAFIELD inventLocation PROPERTIES ENDPROPERTIES METHODS SOURCE #lookup #public void lookup(FormControl _formControl, str _filterStr = "") #{ # SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(InventLocation), _formControl); # Query query = new Query(); # # sysTableLookup.addLookupfield(fieldNum(InventLocation, InventLocationId), true); # sysTableLookup.addLookupfield(fieldNum(InventLocation, InventSiteId)); # # query.allowCrossCompany(true); # # query.addCompanyRange(retailStoreTable.inventLocationDataAreaId); # query.addDataSource(tableNum(InventLocation)); # sysTableLookup.parmQuery(query); # sysTableLookup.performFormLookup(); #} ENDSOURCE ENDMETHODS ENDDATAFIELD DATAFIELD statementMethod PROPERTIES ENDPROPERTIES METHODS SOURCE #modified #public void modified() #{ # ; # # super(); # # RetailStoreTable_DS.object(fieldnum(RetailStoreTable, closingMethod)).allowEdit(RetailStoreTable.statementMethod != RetailStaffTerminalTotal::Staff); #} ENDSOURCE ENDMETHODS ENDDATAFIELD ENDFIELDLIST ENDOBJECTPOOL METHODS SOURCE #init #public void init() #{ # HcmWorker hcmWorker; # RetailStoreAddressBook storeAddressBook; # DirAddressBookParty dirAddressBookParty; # QueryBuildDataSource qbds; # # super(); # # if (element.args().dataset() && element.args().dataset() == tablenum(HcmWorker)) # { # hcmWorker = element.args().record(); # qbds = this.query().dataSourceTable(tableNum(RetailStoreTable)); # # while select AddressBook from dirAddressBookParty where dirAddressBookParty.Party == hcmWorker.Person # join AddressBook, StoreRecId from storeAddressBook where storeAddressBook.AddressBookType == RetailAddressBookType::Employee # && storeAddressBook.AddressBook == dirAddressBookParty.AddressBook # { # # qbds.addRange(fieldNum(RetailStoreTable, RecId)).value(queryValue(storeAddressBook.StoreRecId)); # } # # } #} ENDSOURCE SOURCE #leaveRecord #public boolean leaveRecord(boolean _forceUpdate = false) #{ # boolean ret; # # ret = super(_forceUpdate); # # //update RetailStoreAddressBook # element.UpdateAddressBooks(); # # return ret; #} ENDSOURCE SOURCE #active #public int active() #{ # int ret; # ; # # ret = super(); # # if (ret) # { # dimensionDefaultingController.activated(true); # } # # RetailStoreTable_DS.object(fieldnum(RetailStoreTable, closingMethod)).allowEdit(RetailStoreTable.statementMethod != RetailStaffTerminalTotal::Staff); # # element.updateControls(); # return ret; #} ENDSOURCE SOURCE #create #void create(boolean append = false, boolean extern = false) // If created externally #{ # super(append); # # RetailStoreTable.ChannelType = RetailChannelType::RetailStore; # # if (!extern) # { # element.numberSeqStoreId().formMethodDataSourceCreate(); # } #} ENDSOURCE SOURCE #delete #void delete() #{ # ttsbegin; # # element.numberSeqStoreId().formMethodDataSourceDelete(); # # super(); # dimensionDefaultingController.deleted(); # # ttscommit; #} ENDSOURCE SOURCE #write #void write() #{ # ttsbegin; # # element.numberSeqStoreId().formMethodDataSourceWrite(); # dimensionDefaultingController.writing(); # # RetailStoreTable.OMOperatingUnitID = OMOperatingUnit.RecId; # super(); # # ttscommit; #} # # # # # ENDSOURCE SOURCE #validateWrite #public boolean validateWrite() #{ # boolean ret; # # ret = super(); # # if (ret && !element.numberSeqStoreId().formMethodDataSourceValidateWrite()) # { # ret = false; # } # # return ret; #} ENDSOURCE SOURCE #linkActive #public void linkActive() #{ # element.numberSeqStoreId().formMethodDataSourceLinkActive(); # super(); #} ENDSOURCE ENDMETHODS ENDDATASOURCE DATASOURCE OBJECTPOOL PROPERTIES Name #OmOperatingUnit Table #OMOperatingUnit JoinSource #RetailStoreTable LinkType #InnerJoin ENDPROPERTIES FIELDLIST ENDFIELDLIST ENDOBJECTPOOL METHODS SOURCE #active #public int active() #{ # int ret; # # ret = super(); # # // We only allow setting the store name during creation # Identification_Name.allowEdit(OMOperatingUnit.RecId == 0); # # return ret; #} ENDSOURCE SOURCE #initValue #public void initValue() #{ # super(); # # OMOperatingUnit.OMOperatingUnitType = OMOperatingUnitType::RetailChannel; # element.numberSeqOperatingUnitNumber().formMethodDataSourceCreate(); #} ENDSOURCE SOURCE #linkActive #public void linkActive() #{ # element.numberSeqOperatingUnitNumber().formMethodDataSourceLinkActive(); # # super(); #} ENDSOURCE SOURCE #validateWrite #public boolean validateWrite() #{ # boolean ret; # # ret = super(); # # return element.numberSeqOperatingUnitNumber().formMethodDataSourceValidateWrite(ret); #} ENDSOURCE SOURCE #delete #public void delete() #{ # element.numberSeqOperatingUnitNumber().formMethodDataSourceDelete(); # # super(); #} ENDSOURCE SOURCE #write #public void write() #{ # element.numberSeqOperatingUnitNumber().formMethodDataSourceWrite(); # # super(); #} ENDSOURCE ENDMETHODS ENDDATASOURCE DATASOURCE OBJECTPOOL PROPERTIES Name #RetailStoreAddressBook Table #RetailStoreAddressBook ENDPROPERTIES FIELDLIST ENDFIELDLIST ENDOBJECTPOOL METHODS ENDMETHODS ENDDATASOURCE ENDOBJECTBANK REFERENCEDATASOURCES ENDREFERENCEDATASOURCES JOINS OmOperatingUnit RetailStoreTable ENDJOINS PARTREFERENCES PARTREFERENCE #StoreTerminalFactBox PROPERTIES Name #StoreTerminalFactBox MenuItemName #RetailStoreTerminalFactBox DataSource #RetailStoreTable DataSourceRelation #SelfLink ElementPosition #715827882 ENDPROPERTIES ENDPARTREFERENCE PARTREFERENCE #StoreOMHierarchyTypeFactBox PROPERTIES Name #StoreOMHierarchyTypeFactBox MenuItemName #RetailStoreOMHierarchyTypeFactBox DataSource #OmOperatingUnit IsLinked #Yes ElementPosition #1431655764 ENDPROPERTIES ENDPARTREFERENCE ENDPARTREFERENCES DESIGN PROPERTIES Caption #@RET3005 TitleDatasource #RetailStoreTable SetCompany #No DataSource #RetailStoreTable Columns #2 ArrangeGuide ARRAY INDEX Columns #0 #0 ENDARRAY Style #DetailsFormMaster ENDPROPERTIES CONTAINER CONTROL ACTIONPANE PROPERTIES Name #ActionPane ElementPosition #715827882 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL ACTIONPANETAB PROPERTIES Name #Setup ElementPosition #1610612733 HierarchyParent #ActionPane Caption #@RET260627 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL ACTIONPANETAB PROPERTIES Name #Store ElementPosition #1073741822 HierarchyParent #ActionPane Caption #@RET3003 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #AttachmentsGroup ElementPosition #1879048185 HierarchyParent #Store Caption #@SYS316708 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #CopyGroup ElementPosition #1288490187 HierarchyParent #Setup Caption #@SYS40266 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #InventoryGroup ElementPosition #1073741820 HierarchyParent #Store Caption #@RET1783 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #ListGroup AutoDeclaration #Yes ElementPosition #1610612730 HierarchyParent #Store Caption #@SYS118440 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #MaintainGroup ElementPosition #536870910 HierarchyParent #Store Caption #@SYS316703 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #NewGroup ElementPosition #805306365 HierarchyParent #Store Caption #@SYS2055 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #PricingGroup ElementPosition #1342177275 HierarchyParent #Store Caption #@SYS73780 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #SetupGroup ElementPosition #1717986916 HierarchyParent #Setup Caption #@RET260627 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL BUTTONGROUP PROPERTIES Name #StaffGroup ElementPosition #858993458 HierarchyParent #Setup Caption #@RET260868 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GRID PROPERTIES Name #HeaderGrid Width #Column width Height #Column height ElementPosition #1431655764 HierarchyParent #GridGroup DataSource #RetailStoreTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #AddressBook ElementPosition #1610612730 HierarchyParent #General Caption #@SYS111907 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #BatchFramework AutoDeclaration #Yes ElementPosition #1840700268 HierarchyParent #StatementClosing DataSource #RetailStoreTable DataGroup #BatchFramework ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Closing ElementPosition #1533916890 HierarchyParent #StatementClosing DataSource #RetailStoreTable DataGroup #Closing ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Culture ElementPosition #1073741820 HierarchyParent #General DataSource #RetailStoreTable DataGroup #Culture ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #GridGroup ElementPosition #1431655764 HierarchyParent #TabPageGrid Style #BorderlessGridContainer ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #HeaderInfo ElementPosition #1073741822 HierarchyParent #TabPageDetails Style #DetailTitleContainer ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Identification ElementPosition #536870910 HierarchyParent #General Caption #@RET5919 DataSource #RetailStoreTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Labels ElementPosition #1227133512 HierarchyParent #Miscellaneous DataSource #RetailStoreTable DataGroup #Labels ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Mask ConfigurationKey #RetailStoreInventory SecurityKey #RetailEx2 ElementPosition #1610612733 HierarchyParent #Handheld DataSource #RetailStoreTable DataGroup #HHTMask ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #MaximumDifference ElementPosition #1227133512 HierarchyParent #StatementClosing DataSource #RetailStoreTable DataGroup #MaximumDifference ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #NumberSeq1 ElementPosition #1073741822 HierarchyParent #NumberSeq DataSource #RetailStoreTable DataGroup #NumberSeq ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #NumberSeq2 ConfigurationKey #RetailStoreInventory SecurityKey #RetailSetupEx2 ElementPosition #1610612733 HierarchyParent #NumberSeq DataSource #RetailStoreTable DataGroup #HHTNumberSeq ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #OneTimeCustomer ElementPosition #1879048185 HierarchyParent #General DataSource #RetailStoreTable DataGroup #OneTimeCustomer ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #OpeningHours ElementPosition #920350134 HierarchyParent #Miscellaneous DataSource #RetailStoreTable DataGroup #OpeningHours ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #PlannedOrder ConfigurationKey #RetailStoreInventory SecurityKey #RetailEx2 ElementPosition #1073741822 HierarchyParent #Handheld DataSource #RetailStoreTable DataGroup #HHTPlannedOrder ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #POSTerminal ElementPosition #805306365 HierarchyParent #General DataSource #RetailStoreTable DataGroup #POSTerminal ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Purchase ElementPosition #1533916890 HierarchyParent #Miscellaneous DataSource #RetailStoreTable DataGroup #Purchase ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Rounding ElementPosition #920350134 HierarchyParent #StatementClosing DataSource #RetailStoreTable DataGroup #Rounding ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Statement ElementPosition #613566756 HierarchyParent #StatementClosing DataSource #RetailStoreTable DataGroup #Statement ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #Tax ElementPosition #1342177275 HierarchyParent #General Caption #@SYS22916 DataSource #RetailStoreTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #TenderType ElementPosition #613566756 HierarchyParent #Miscellaneous Caption #@RET3024 Columns #Auto ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL GROUP PROPERTIES Name #TrainingMode ElementPosition #1840700268 HierarchyParent #Miscellaneous DataSource #RetailStoreTable DataGroup #TrainingMode ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL REFERENCEGROUP PROPERTIES Name #POSTerminal_OfflineProfile ElementPosition #1431655764 HierarchyParent #POSTerminal DataSource #RetailStoreTable ReferenceField #OfflineProfile Label #@RET5683 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL REFERENCEGROUP PROPERTIES Name #RetailStoreTable_TaxOverrideGroup ElementPosition #1879048185 HierarchyParent #Tax DataSource #RetailStoreTable ReferenceField #TaxOverrideGroup ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TAB PROPERTIES Name #HeaderDetailsTab Width #Column width Height #Column height ElementPosition #1610612733 HierarchyParent #TabPageDetails Style #FastTabs ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TAB PROPERTIES Name #Tab Width #Column width Height #Column height ElementPosition #1431655764 ShowTabs #No ENDPROPERTIES METHODS SOURCE #tabChanged #public void tabChanged(int _FromTab, int _ToTab) #{ # super(_FromTab, _ToTab); # # element.lock(); # # // Buttons to show in Grid View # EditDetailsButton.visible(TabPageGrid.isActivePage()); # ListGroup.visible(TabPageGrid.isActivePage()); # # // Buttons to show in Details View # EditRecordButton.visible(!TabPageGrid.isActivePage()); # # element.unLock(); #} ENDSOURCE ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #General Width #Column width ElementPosition #477218588 HierarchyParent #HeaderDetailsTab Caption #@SYS2952 Columns #Auto ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #Handheld Width #Column width ConfigurationKey #RetailStoreInventory SecurityKey #RetailSetupEx2 ElementPosition #1431655764 HierarchyParent #HeaderDetailsTab Caption #@RET1575 DataSource #RetailStoreTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #Miscellaneous Width #Column width ElementPosition #954437176 HierarchyParent #HeaderDetailsTab Caption #@SYS80069 Columns #Auto ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #NumberSeq Width #Column width ElementPosition #1670265058 HierarchyParent #HeaderDetailsTab Caption #@SYS26442 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #StatementClosing Width #Column width ElementPosition #715827882 HierarchyParent #HeaderDetailsTab Caption #@RET3036 Columns #Auto ArrangeGuide ARRAY INDEX Columns #0 #0 ENDARRAY ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #TabFinancialDimensions AutoDeclaration #Yes NeededPermission #Manual Width #Column width ElementPosition #1193046470 HierarchyParent #HeaderDetailsTab Caption #@SYS101181 HideIfEmpty #No ENDPROPERTIES METHODS SOURCE #pageActivated #/// <summary> #/// When tab page is activated, call page activate method of dimension controller. #/// </summary> #public void pageActivated() #{ # dimensionDefaultingController.pageActivated(); # super(); #} ENDSOURCE ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #TabPageDetails AutoDeclaration #Yes Width #Column width Height #Column height ElementPosition #1073741822 HierarchyParent #Tab BackgroundColor #Dyn Background blue TopMargin #0 BottomMargin #0 LeftMargin #0 RightMargin #0 Style #DetailsFormDetails PanelStyle #Details ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL TABPAGE PROPERTIES Name #TabPageGrid AutoDeclaration #Yes Width #Column width Height #Column height ElementPosition #1610612733 HierarchyParent #Tab BackgroundColor #Dyn Background blue TopMargin #0 BottomMargin #0 LeftMargin #0 RightMargin #0 ViewEditMode #Edit Style #DetailsFormGrid PanelStyle #Grid ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL CHECKBOX PROPERTIES Name #Tax_PriceIncludesSalesTax ElementPosition #1073741820 HierarchyParent #Tax DataSource #RetailStoreTable DataField #PriceIncludesSalesTax ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL CHECKBOX PROPERTIES Name #Tax_UseCustomerBasedTax ElementPosition #1610612730 HierarchyParent #Tax DataSource #RetailStoreTable DataField #UseCustomerBasedTax ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL CHECKBOX PROPERTIES Name #Tax_UseDestinationBasedTax ElementPosition #1342177275 HierarchyParent #Tax DataSource #RetailStoreTable DataField #UseDestinationBasedTax ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMBOBOX PROPERTIES Name #RetailStoreTable_ChannelType ElementPosition #578627537 HierarchyParent #HeaderGrid DataSource #RetailStoreTable DataField #ChannelType ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMBOBOX PROPERTIES Name #Statement_statementMethod ElementPosition #858993458 HierarchyParent #Statement DataSource #RetailStoreTable DataField #statementMethod FastTabSummary #Yes ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMMANDBUTTON PROPERTIES Name #AttachmentsButton ElementPosition #1431655764 HierarchyParent #AttachmentsGroup Text #@SYS316708 NormalImage #10442 ImageLocation #EmbeddedResource Big #Yes Command #2853 ToggleButton #Check ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMMANDBUTTON PROPERTIES Name #CommandButton ElementPosition #1431655764 HierarchyParent #NewGroup Text #@RET5802 NormalImage #Retail_RetailModule_ico ImageLocation #AOTResource MultiSelect #Yes Big #Yes Primary #Yes Command #260 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMMANDBUTTON PROPERTIES Name #DeleteButton ElementPosition #1717986916 HierarchyParent #MaintainGroup Text #@SYS14425 NormalImage #10121 ImageLocation #EmbeddedResource SaveRecord #No MultiSelect #Yes Primary #Yes Command #2832 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMMANDBUTTON PROPERTIES Name #EditRecordButton AutoDeclaration #Yes ElementPosition #858993458 HierarchyParent #MaintainGroup Text #@SYS317438 NormalImage #10040 ImageLocation #EmbeddedResource Big #Yes Primary #Yes Command #4471 ToggleButton #Check ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMMANDBUTTON PROPERTIES Name #ExportCommandButton ElementPosition #1610612733 HierarchyParent #ListGroup NormalImage #10156 ImageLocation #EmbeddedResource Big #Yes Command #4436 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL COMMANDBUTTON PROPERTIES Name #RefreshCommandButton HelpText #@SYS315818 ElementPosition #1073741822 HierarchyParent #ListGroup NormalImage #11437 ImageLocation #EmbeddedResource Big #Yes Command #2875 ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #AssortmentListButton ElementPosition #1073741822 HierarchyParent #InventoryGroup NormalImage #Retail_Assortment_ico ImageLocation #AOTResource ShowShortCut #No Big #Yes DataSource #OmOperatingUnit MenuItemName #RetailAssortmentListPageByChannel ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #CashDeclarationButton ElementPosition #920350134 HierarchyParent #SetupGroup NormalImage #11257 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemName #RetailStoreCashDeclarationTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #CopyAllButton ElementPosition #1879048185 HierarchyParent #CopyGroup NormalImage #1023 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemType #Action MenuItemName #RetailCopyAllStoreInfo ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #CopyCashDeclarationButton ElementPosition #805306365 HierarchyParent #CopyGroup NormalImage #1023 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemType #Action MenuItemName #RetailCopyStoreCashDeclaration ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #CopyIncomeExpenseAccountButton ElementPosition #1073741820 HierarchyParent #CopyGroup NormalImage #1023 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemType #Action MenuItemName #RetailCopyIncomeExpense ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #CopySectionsButton ElementPosition #1610612730 HierarchyParent #CopyGroup NormalImage #1023 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemType #Action MenuItemName #RetailCopySection ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #CopyTenderToStoreButton ElementPosition #536870910 HierarchyParent #CopyGroup NormalImage #1023 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemType #Action MenuItemName #RetailCopyStoreTender ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #CopyWorkShiftButton ElementPosition #1342177275 HierarchyParent #CopyGroup NormalImage #1023 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemType #Action MenuItemName #RetailCopyWorkshift ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #DistributionLocationButton ElementPosition #1840700268 HierarchyParent #SetupGroup NormalImage #12053 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemName #RetailConnDistributionLocation ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #EditDetailsButton AutoDeclaration #Yes Visible #No ElementPosition #1288490187 HierarchyParent #MaintainGroup Text #@SYS317438 NormalImage #10040 ImageLocation #EmbeddedResource Big #Yes Primary #Yes OpenMode #Edit CopyCallerQuery #Yes MenuItemName #RetailStoreTableDetails ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #IncomeExpenseAccountsButton ElementPosition #1227133512 HierarchyParent #SetupGroup NormalImage #12008 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemName #RetailIncomeExpenseAccountTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #ItemListButtons ElementPosition #1610612734 HierarchyParent #InventoryGroup NormalImage #11047 ImageLocation #EmbeddedResource ShowShortCut #No Big #Yes DataSource #OmOperatingUnit MenuItemName #EcoResProductListPageByChannel ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #PriceGroupsButton ElementPosition #1073741822 HierarchyParent #PricingGroup NormalImage #Retail_PriceGroups_ico ImageLocation #AOTResource ShowShortCut #No MultiSelect #No Big #Yes DataSource #RetailStoreTable MenuItemName #RetailChannelPriceGroup ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #PriceListButton ElementPosition #1610612733 HierarchyParent #PricingGroup NormalImage #Retail_PriceList_ico ImageLocation #AOTResource ShowShortCut #No MultiSelect #No Big #Yes DataSource #OmOperatingUnit MenuItemName #RetailPriceList ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #SectionsButton ElementPosition #1533916890 HierarchyParent #SetupGroup NormalImage #1023 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemName #RetailStoreSection ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #StaffButton ElementPosition #1073741822 HierarchyParent #StaffGroup Text #@RET260868 NormalImage #10737 ImageLocation #EmbeddedResource ShowShortCut #No Big #Yes DataSource #RetailStoreTable MenuItemName #HcmWorkerListPage ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #TenderTypesButton ElementPosition #613566756 HierarchyParent #SetupGroup NormalImage #10671 ImageLocation #EmbeddedResource ShowShortCut #No MenuItemName #RetailStoreTenderTypeTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL MENUITEMBUTTON PROPERTIES Name #WorkShiftListButton ElementPosition #1610612733 HierarchyParent #StaffGroup NormalImage #12026 ImageLocation #EmbeddedResource ShowShortCut #No Big #Yes MenuItemName #RetailStoreWorkShiftTable ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL SEGMENTEDENTRY PROPERTIES Name #Rounding_RoundingAccountLedgerDimension ElementPosition #858993458 HierarchyParent #Rounding DataSource #RetailStoreTable ReferenceField #RoundingAccountLedgerDimension ENDPROPERTIES METHODS SOURCE #jumpRef #public void jumpRef() #{ # roundingAccDimAccController.jumpRef(); #} ENDSOURCE SOURCE #loadAutoCompleteData #public void loadAutoCompleteData(LoadAutoCompleteDataEventArgs _e) #{ # roundingAccDimAccController.loadAutoCompleteData(_e); # super(_e); #} ENDSOURCE SOURCE #loadSegments #public void loadSegments() #{ # super(); # // (Optional parm*() specification should go here, see the Control options section.) # roundingAccDimAccController.parmControl(this); # roundingAccDimAccController.loadSegments(); #} ENDSOURCE SOURCE #segmentValueChanged #public void segmentValueChanged(SegmentValueChangedEventArgs _e) #{ # super(_e); # roundingAccDimAccController.segmentValueChanged(_e); #} ENDSOURCE SOURCE #validate #public boolean validate() #{ # boolean isValid; # # isValid = super(); # isValid = roundingAccDimAccController.validate() && isValid; # # return isValid; #} ENDSOURCE ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #CustomerAddressBook AutoDeclaration #Yes ElementPosition #1073741822 HierarchyParent #AddressBook Label #@RET5718 ENDPROPERTIES METHODS SOURCE #jumpRef #public void jumpRef() #{ # super(); # smmUtility::openMenuItemForm(menuitemDisplayStr(DirAddressBook), null, this); #} ENDSOURCE ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #EmployeeAddressBook AutoDeclaration #Yes ElementPosition #1610612733 HierarchyParent #AddressBook Label #@RET5719 ENDPROPERTIES METHODS SOURCE #jumpRef #public void jumpRef() #{ # super(); # smmUtility::openMenuItemForm(menuitemDisplayStr(DirAddressBook), null, this); #} ENDSOURCE ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #HeaderTitle Width #Column width Skip #Yes AlignControl #No ElementPosition #1431655764 HierarchyParent #HeaderInfo Border #None ColorScheme #Windows palette ForegroundColor #Dyn Title green FontSize #11 ShowLabel #No DataSource #RetailStoreTable DataMethod #retailStoreTitleFields ViewEditMode #View Style #TitleField ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #Identification_InventLocation ElementPosition #1533916890 HierarchyParent #Identification DataSource #RetailStoreTable DataField #inventLocation FastTabSummary #Yes ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #Identification_Name AutoDeclaration #Yes ElementPosition #613566756 HierarchyParent #Identification DataSource #OmOperatingUnit DataField #Name ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #inventLocation_StoreNumber ElementPosition #920350134 HierarchyParent #Identification DataSource #RetailStoreTable DataField #StoreNumber ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #OMOperatingUnit_Name AllowEdit #No ElementPosition #375809638 HierarchyParent #HeaderGrid DataSource #OmOperatingUnit DataField #Name ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #OMOperatingUnit_OMOperatingUnitNumber AllowEdit #No ElementPosition #781445437 HierarchyParent #HeaderGrid DataSource #OmOperatingUnit DataField #OMOperatingUnitNumber ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #OmOperatingUnit_OMOperatingUnitNumber1 ElementPosition #1073741823 HierarchyParent #Identification DataSource #OmOperatingUnit DataField #OMOperatingUnitNumber ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #OneTimeCustomer_DefaultCustAccount AutoDeclaration #Yes ElementPosition #1431655764 HierarchyParent #OneTimeCustomer DataSource #RetailStoreTable DataField #DefaultCustAccount FastTabSummary #Yes ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #PlannedOrder_HHTReqPlanIdSched ElementPosition #1431655764 HierarchyParent #PlannedOrder DataSource #RetailStoreTable DataField #RetailReqPlanIdSched ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #RetailStoreTable_DefaultCustAccount ElementPosition #1914839581 HierarchyParent #HeaderGrid DataSource #RetailStoreTable DataField #DefaultCustAccount ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #RetailStoreTable_InventLocation ElementPosition #1449551459 HierarchyParent #HeaderGrid LabelAlignment #Right DataSource #RetailStoreTable DataField #inventLocation ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #RetailStoreTable_inventLocationDataAreaId ElementPosition #1227133512 HierarchyParent #Identification DataSource #RetailStoreTable DataField #inventLocationDataAreaId ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #RetailStoreTable_InventLocationIdForCustomerOrder ElementPosition #1840700268 HierarchyParent #Identification DataSource #RetailStoreTable DataField #InventLocationIdForCustomerOrder ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #RetailStoreTable_StoreNumber AutoDeclaration #Yes AllowEdit #No ElementPosition #1216907398 HierarchyParent #HeaderGrid LabelAlignment #Right DataSource #RetailStoreTable DataField #StoreNumber ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #RetailStoreTable_TaxGroup ElementPosition #1682195520 HierarchyParent #HeaderGrid DataSource #RetailStoreTable DataField #taxGroup ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #Tax_taxGroup AutoDeclaration #Yes ElementPosition #805306365 HierarchyParent #Tax DataSource #RetailStoreTable DataField #taxGroup FastTabSummary #Yes ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #Tax_TaxIdentificationNumber ElementPosition #536870910 HierarchyParent #Tax DataSource #RetailStoreTable DataField #TaxIdentificationNumber ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL CONTROL STRINGEDIT PROPERTIES Name #TenderType_RemoveAddTender ElementPosition #1431655764 HierarchyParent #TenderType DataSource #RetailStoreTable DataField #removeAddTender ENDPROPERTIES METHODS ENDMETHODS ENDCONTROL ENDCONTAINER ENDDESIGN PERMISSIONS #Permissions PROPERTIES ENDPROPERTIES PERMISSIONSET #Read PROPERTIES ENDPROPERTIES FORM #Controls ENDFORM TABLES #Tables ENDTABLES SERVERMETHODS #Server Methods ENDSERVERMETHODS ASSOCIATEDFORMS #Associated FormsENDASSOCIATEDFORMS
ENDPERMISSIONSET
PERMISSIONSET #Update PROPERTIES ENDPROPERTIES FORM #Controls ENDFORM TABLES #TablesENDTABLES
SERVERMETHODS #Server MethodsENDSERVERMETHODS
ASSOCIATEDFORMS #Associated FormsENDASSOCIATEDFORMS
PERMISSIONSET #Create PROPERTIES ENDPROPERTIES FORM #Controls ENDFORM TABLES #TablesENDTABLES
PERMISSIONSET #Delete PROPERTIES ENDPROPERTIES FORM #Controls ENDFORM TABLES #TablesENDTABLES
ENDPERMISSIONS
ENDFORM
***Element: DBT
; Microsoft Dynamics AX Table : OMOperatingUnit unloaded; -------------------------------------------------------------------------------- TABLEVERSION 1 TABLE #OMOperatingUnit EnforceFKRelation 1 PROPERTIES Name #OMOperatingUnit Label #@SYS130618 FormRef #OMOPeratingUnit TitleField2 #OMOperatingUnitNumber SecurityKey #BasicTables CacheLookup #Found CreateRecIdIndex #Yes SaveDataPerCompany #No TableGroup #Main PrimaryIndex #SurrogateKey ClusterIndex #SurrogateKey SingularLabel #@SYS320917 DeveloperDocumentation #@SYS318697 Extends #OMInternalOrganization SupportInheritance #Yes Origin #{2C0F0949-0000-1000-62F1-09340B60B83C} LegacyId #2377 ENDPROPERTIES FIELDS FIELD #HcmWorker INT64 PROPERTIES Name #HcmWorker Label #@SYS1682 Table #OMOperatingUnit Origin #{CD111015-E213-4213-A3BF-61BEB3CC66C7} LegacyId #2495 ExtendedDataType #RefRecId ENDPROPERTIES FIELD #OMOperatingUnitNumber STRING PROPERTIES Name #OMOperatingUnitNumber Label #@SYS319848 HelpText #@SYS319849 Mandatory #Yes Table #OMOperatingUnit Origin #{A382DA65-856E-4B6D-942D-CE58C48A6311} LegacyId #2496 ExtendedDataType #OMOperatingUnitNumber StringSize #8 ENDPROPERTIES FIELD #OMOperatingUnitType ENUM PROPERTIES Name #OMOperatingUnitType Mandatory #Yes AllowEdit #No Table #OMOperatingUnit Origin #{9852B6BD-E50F-4B6C-A74E-5EEE6CCA0B64} LegacyId #2489 EnumType #OMOperatingUnitType ENDPROPERTIES ENDFIELDS GROUPS GROUP #AutoSummary PROPERTIES Name #AutoSummary ENDPROPERTIES GROUPFIELDS #HcmWorker #OMOperatingUnitType #OMOperatingUnitNumber ENDGROUPFIELDS ENDGROUP GROUP #AutoReport PROPERTIES Name #AutoReport ENDPROPERTIES GROUPFIELDS #RecId #HcmWorker #OMOperatingUnitType #OMOperatingUnitNumber ENDGROUPFIELDS ENDGROUP GROUP #AutoLookup PROPERTIES Name #AutoLookup ENDPROPERTIES GROUPFIELDS #OMOperatingUnitType #OMOperatingUnitNumber #Name #RecId ENDGROUPFIELDS ENDGROUP GROUP #HiddenFields PROPERTIES Name #HiddenFields Label #@SYS54478 ENDPROPERTIES GROUPFIELDS ENDGROUPFIELDS ENDGROUP GROUP #OperatingUnit PROPERTIES Name #OperatingUnit Label #@SYS130618 ENDPROPERTIES GROUPFIELDS ENDGROUPFIELDS ENDGROUP ENDGROUPS INDICES #HcmWorkerIdx PROPERTIES Name #HcmWorkerIdx Origin #{2A4214B3-5DBF-4A16-BF65-FA92148D175C} LegacyId #5 ENDPROPERTIES INDEXFIELDS #HcmWorker ENDINDEXFIELDS #OMOperatingUnitNumber PROPERTIES Name #OMOperatingUnitNumber AllowDuplicates #No AlternateKey #Yes Origin #{C0D71DA6-080F-4E24-AA29-C760A4205ABD} LegacyId #6 ENDPROPERTIES INDEXFIELDS #OMOperatingUnitNumber ENDINDEXFIELDS ENDINDICES FULLTEXTINDICES ENDFULLTEXTINDICES REFERENCES REFERENCE #HCMWorker_FK PROPERTIES Name #HCMWorker_FK Table #HcmWorker RelatedTableCardinality #ZeroOne Cardinality #ZeroMore RelationshipType #Association RelatedTableRole #HcmWorker Role #HcmWorker_OMOperatingUnit ENDPROPERTIES FIELDREFERENCES REFERENCETYPE PKFK PROPERTIES Field #HcmWorker RelatedField #RecId ENDPROPERTIES ENDFIELDREFERENCES ENDREFERENCE REFERENCE #OMOUInternalOrganization_FK PROPERTIES Name #OMOUInternalOrganization_FK Table #OMInternalOrganization RelatedTableCardinality #ExactlyOne Cardinality #ZeroOne RelationshipType #Specialization UseDefaultRoleNames #Yes RelatedTableRole #OMInternalOrganization_OperatingUnit Role #OMOperatingUnit ENDPROPERTIES FIELDREFERENCES REFERENCETYPE PKPK PROPERTIES Field #RecId RelatedField #RecId ENDPROPERTIES ENDFIELDREFERENCES ENDREFERENCE ENDREFERENCES DELETEACTIONS #HRMCompEligibility(OMOperatingUnit) PROPERTIES Table #HRMCompEligibility DeleteAction #Restricted Relation #OMOperatingUnit ENDPROPERTIES #RetailChannelTable(OMOperatingUnit_FK) PROPERTIES Table #RetailChannelTable DeleteAction #Cascade Relation #OMOperatingUnit_FK ENDPROPERTIES ENDDELETEACTIONS METHODS SOURCE #aosValidateDelete #public boolean aosValidateDelete() #{ # boolean ret; # # ret = super(); # # if( OMMultipleHierarchy::checkExistenceInHierarchy(this.RecId) ) # { # error("@SYS320682"); # return false; # } # # return ret; #} ENDSOURCE SOURCE #aosValidateInsert #public boolean aosValidateInsert() #{ # boolean ret; # # ret = super(); # # if( ret ) # { # //Operating unit type field has to be set. # if( (this.omOperatingUnitType <= 0 ) || (this.omOperatingUnitType == OMOperatingUnitType::OMAnyOU)) # return false; # # //OMOperatingunit number is a mandatory field # if( this.omOperatingUnitNumber == '' ) # { # this.omOperatingUnitNumber = # NumberSeq::newGetNum(NumberSeqReference::findReference( # extendedTypeNum(OMOperatingUnitNumber), # NumberSeqScopeFactory::createGlobalScope())).num(); # } # # } # # return ret; #} ENDSOURCE SOURCE #aosValidateUpdate #public boolean aosValidateUpdate() #{ # boolean ret; # # ret = super(); # # if( this.omOperatingUnitType != this.orig().omOperatingUnitType ) # return false; # # return ret; #} ENDSOURCE SOURCE #delete #void delete() #{ # tableId roleViewId = OMOperatingUnit::getDimensionViewId(this.OMOperatingUnitType); # // <RETAIL> # boolean replicate = false; # # if (isConfigurationkeyEnabled(configurationKeyNum(Retail))) # { # replicate = RetailConnActionManagement::shouldReplicate(this, this.orig(), true); # } # // </RETAIL> # # // Check to see if the associated dimension attribute value has been used # // in a way that would prevent deletion. # if (!DimensionValidation::canDeleteEntityValue(this, roleViewId)) # { # throw error(strfmt("@SYS134392", this.omOperatingUnitNumber)); # } # # ttsbegin; # # // Update the associated dimension attribute value. # DimensionAttributeValue::updateForEntityValueDelete(this, roleViewId); # # super(); # # // <RETAIL> # if (replicate) # { # RetailConnActionManagement::createActions(this, RetailConnActionUpdate::Delete); # } # // </RETAIL> # # ttscommit; #} # ENDSOURCE SOURCE #insert #public void insert() #{ # // <RETAIL> # boolean replicate = false; # # if (isConfigurationkeyEnabled(configurationKeyNum(Retail))) # { # replicate = RetailConnActionManagement::shouldReplicate(this, this.orig(), false); # } # // </RETAIL> # # this.OrganizationType = OMInternalOrganizationType::OperatingUnit; # super(); # # // <RETAIL> # if (replicate) # { # RetailConnActionManagement::createActions(this, RetailConnActionUpdate::Insert); # } # // </RETAIL> #} ENDSOURCE SOURCE #update #public void update() #{ # OMOperatingUnit originalRecord = this.orig(); # // <RETAIL> # boolean replicate = false; # # if (isConfigurationkeyEnabled(configurationKeyNum(Retail))) # { # replicate = RetailConnActionManagement::shouldReplicate(this, this.orig(), false); # } # // </RETAIL> # # super(); # # if (this.omOperatingUnitNumber != originalRecord.omOperatingUnitNumber) # { # DimensionStorage::syncRenamedValue(this, originalRecord, OMOperatingUnit::getDimensionViewId(this.OMOperatingUnitType)); # } # # // <RETAIL> # if (replicate) # { # RetailConnActionManagement::createActions(this, RetailConnActionUpdate::Update); # } # // </RETAIL> #} ENDSOURCE SOURCE #find #/// <summary> #/// Finds the specified record in the <c>OMDepartment</c> table. #/// </summary> #/// <param name="_ouRecId"> #/// The <c>RecId</c> value of the record to find. #/// </param> #/// <param name="ouType"> #/// The type of the operating unit. #/// </param> #/// <param name="_forUpdate"> #/// A Boolean value that indicates whether to read the record for update; optional. #/// </param> #/// <returns> #/// A record in the <c>OMOperatingUnit</c> table; otherwise, an empty record. #/// </returns> #static OMOperatingUnit find(RecId _ouRecId, OMOperatingUnitType ouType, boolean _forUpdate = false) #{ # OMOperatingUnit omou; # ; # # if (_ouRecId) # { # omou.selectForUpdate(_forUpdate); # # if( ouType != OMOperatingUnitType::OMAnyOU ) # { # select # omou # where # omou.RecId == _ouRecId && # omou.omOperatingUnitType == ouType; # } # else # { # select # omou # where # omou.RecId == _ouRecId; # } # } # return omou; #} ENDSOURCE SOURCE #findName #/// <summary> #/// Finds a specified operating unit by using a specified name and the operating unit type. #/// </summary> #/// <param name="_partyName"> #/// A party name that is stored in the <c>DirPartyTable</c> table. #/// </param> #/// <param name="_ouType"> #/// A type of operating unit. #/// </param> #/// <param name="_forupdate"> #/// A Boolean value that indicates whether to select for update. #/// </param> #/// <returns> #/// A record, if found; otherwise, null. #/// </returns> #public static OMOperatingUnit findName(str 100 _partyName, # OMOperatingUnitType _ouType, # boolean _forupdate = false) #{ # OMOperatingUnit operatingUnit = null; # ; # # if (_partyName) # { # # operatingUnit.selectForUpdate(_forupdate); # # select firstonly operatingUnit # where operatingUnit.Name == _partyName && # operatingUnit.omOperatingUnitType == _ouType; # } # return operatingUnit; #} ENDSOURCE SOURCE #getDepartmentChildren #/// <summary> #/// Builds a list of the <c>OMDepartment</c> record <c>RefRecId</c> values that are child departments #/// of the specified department. #/// </summary> #/// <param name="_departmentRecId"> #/// A record ID value that represents the <c>OMDepartment</c> record for which to retrieve child #/// departments. #/// </param> #/// <param name="_list"> #/// A list of record IDs of all children of the specified <c>OMDepartment</c> record that may have been #/// determined by prior processing. #/// </param> #/// <param name="_perDate"> #/// An as-of <c>date</c> to base date range selections upon. #/// </param> #/// <returns> #/// A list of record IDs of all children of the specified <c>OMDepartment</c> record. #/// </returns> #/// <remarks> #/// This method is used recursively. #/// </remarks> #server static List getDepartmentChildren( # RefRecId _departmentRecId = 0, # List _list = null, # date _perDate = DateTimeUtil::date(DateTimeUtil::getSystemDateTime())) #{ # List list; # OMOperatingUnit operatingUnit; # OMHierarchyRelationship hierarchyRelationship; # DirPartyTable dirPartyTable; # date perDate = _perdate; # RefRecId hierarchyTypeRecId; # # // Create new list if one wasn't supplied # if (!_list) # { # list = new List(Types::Int64); # } # else # { # list = _list; # } # # hierarchyTypeRecId = HcmDepartmentHierarchy::getDepartmentHierarchyType(); # # if (hierarchyTypeRecId) # { # // For a given department recid, retrieve all department recids for its immediate child records. # // Joining with OMDepartment to ensure that the supplied recid is for an actual department. # while select ValidTimeState(perDate) RecId from operatingUnit order by dirPartyTable.Name # where operatingUnit.RecId == _departmentRecId # join ParentOrganization, HierarchyType, ChildOrganization from hierarchyRelationship # where hierarchyRelationship.ParentOrganization == operatingUnit.RecId # && hierarchyRelationship.HierarchyType == hierarchyTypeRecId # join Name from dirPartyTable # where dirPartyTable.RecId == hierarchyRelationship.ChildOrganization # { # list.addEnd(hierarchyRelationship.ChildOrganization); # # // Recursive call to continue adding to list child departments of this child current child dept. # list = OMOperatingUnit::getDepartmentChildren(hierarchyRelationship.ChildOrganization, list, perDate); # } # } # # return list; #} ENDSOURCE SOURCE #getDescendantsAndSelf #/// <summary> #/// Get the descendants and the self of an OMInternalOrganization in a certain hierarchy type #/// </summary> #/// <param name="_omInternalOrganizationRecId"> #/// The RecID of the root OMInternalOrganization #/// </param> #/// <param name="_omHierarchyTypeRecID"> #/// The RecID of the hierarchy type #/// </param> #/// <param name="_effectiveDateTime"> #/// Optional. Find the descendants which are effective at the give date time. #/// Return all descendants if _effectiveDateTime is default. #/// </param> #/// <param name="_descendantOperatingUnitTypes"> #/// Optional. A set containing wanted operating unit types (e.g. OMOperatingUnitType::RetailChannel) #/// </param> #/// <returns> #/// A set containing RecIds of the descendants and the self of an OMInternalOrganization #/// </returns> #public static Set getDescendantsAndSelf #( # RecId _omInternalOrganizationRecId, # RecId _omHierarchyTypeRecID, # UtcDateTime _effectiveDateTime = DateTimeUtil::minValue(), # Set _descendantOperatingUnitTypes = null #) #{ # Set descendantsAndSelf; # SetEnumerator nodeEnumerator, ouTypeEnumerator; # Set result = new Set(Types::Int64); # RecId ioRecId; # OMOperatingUnitType ouType; # # // Find all descendant and self of the root OMInternalOrganization # descendantsAndSelf = OMInternalOrganization::getDescendantsAndSelf(_omInternalOrganizationRecId, _omHierarchyTypeRecID, _effectiveDateTime); # # if(descendantsAndSelf != null) # { # nodeEnumerator = descendantsAndSelf.getEnumerator(); # # // Loop through all nodes to decide whether to add them into the result # while(nodeEnumerator.moveNext()) # { # ioRecId = nodeEnumerator.current(); # # // Add the current record into the result set based on conditions below # if(ioRecId == _omInternalOrganizationRecId) // Always add the root node # { # result.add(ioRecId); # } # else if(_descendantOperatingUnitTypes == null) // Add the node if no type filter # { # result.add(ioRecId); # } # else // Add the node if its organization type is in the wanted type list # { # ouTypeEnumerator = _descendantOperatingUnitTypes.getEnumerator(); # # while(ouTypeEnumerator.moveNext()) # { # ouType = ouTypeEnumerator.current(); # # if(OMOperatingUnit::find(ioRecId, ouType).RecId > 0) # { # result.add(ioRecId); # } # } # } # } # } # # return result; #} ENDSOURCE SOURCE #getDimensionViewId #/// <summary> #/// Looks up the dimension view ID associated with an <c>OMOperatingUnitType</c>. #/// </summary> #/// <param name="_omOperatingUnitType"> #/// An <c>OMOperatingUnitType</c> value that indicates what type discriminator to use by which the #/// <c>OMOperatingUnit</c> table is filtered. #/// </param> #/// <returns> #/// The dimension view ID associated with the specified <c>OMOperatingUnitType</c>. #/// </returns> #private static TableId getDimensionViewId(OMOperatingUnitType _omOperatingUnitType) #{ # Dictionary dict = new Dictionary(); # DictEnum dictEnum = new DictEnum(enumNum(OMOperatingUnitType)); # # return dict.tableName2Id(strFmt('DimAttribute%1', dictEnum.index2Symbol(_omOperatingUnitType))); #} # ENDSOURCE SOURCE #getDimensionViewIds #/// <summary> #/// Retreives a <c>Map</c> of table ID's for all dimensionable operating units. #/// </summary> #/// <returns> #/// A <c>Map</c> of table ID's for all dimensionable operating units. #/// </returns> #public static Map getDimensionViewIds() #{ # Map map = new Map(Types::Int64, Types::void); # int i; # DictEnum dictEnum; # TableId tableId; # # // Enumerate all custom OMOperatingUnits based on their enum value, skipping ::None and ::OMAnyOU # dictEnum = new DictEnum(enumNum(OMOperatingUnitType)); # for (i = 0; i < dictEnum.values(); i++) # { # switch (i) # { # case OMOperatingUnitType::None: # case OMOperatingUnitType::OMAnyOU: # // Ignore these 2 types # break; # # default: # tableId = OMOperatingUnit::getDimensionViewId(i); # map.insert(tableId, null); # } # } # # return map; #} # ENDSOURCE SOURCE #getNumberSequenceReference #client server static NumberSequenceReference getNumberSequenceReference() #{ # return NumberSeqReference::findReference(extendedTypeNum(OMOperatingUnitNumber), # NumberSeqScopeFactory::createGlobalScope()); #} ENDSOURCE SOURCE #numberOfVacantPositions #/// <summary> #/// Calculates the total number of positions that do not have workers assigned to them. #/// </summary> #/// <param name="_countChildren"> #/// A Boolean value that specifies whether to include child departments in the vacancy total; optional. #/// </param> #/// <param name="_departmentRecId"> #/// A record ID value that represents the <c>OMOperatingUnit</c> table for which to calculate vacant #/// positions. #/// </param> #/// <param name="_perDate"> #/// An as-of <c>utcdatetime</c> to base date range selections upon. #/// </param> #/// <returns> #/// The count of the total number of positions that do not have workers assigned to them; see remarks. #/// </returns> #/// <remarks> #/// An unspecified <paramref name="_perDate" /> parameter will use the current system #/// <c>utcdatetime</c>. #/// </remarks> #static server HRMNumberOfVacantPositions numberOfVacantPositions( # boolean _countChildren = false, # OMDepartmentRecId _departmentRecId = 0, # utcdatetime _perDate = DateTimeUtil::getSystemDateTime()) # #{ # HcmPositionDetail positionDetail; # HcmPositionDuration positionDuration; # HcmPositionWorkerAssignment positionWorkerAssignment; # HRMNumberOfVacantPositions hrmNumberOfVacantPositions; # ListIterator listIterator; # List list; # OMDepartmentRecId departmentRecId; # utcdatetime perDate = _perDate; # # list = new List(Types::Int64); # # if (_departmentRecId) # { # list.addEnd(_departmentRecId); # } # # if (_countChildren) # { # list = OMOperatingUnit::getDepartmentChildren(_departmentRecId, list, DateTimeUtil::date(perDate)); # } # # listIterator = new ListIterator(list); # listIterator.begin(); # # // For each department in the list, calculate the number of positions that are unfilled. # while (listIterator.more()) # { # departmentRecId = listIterator.value(); # # select ValidTimeState(_perDate) count(RecId) from # positionDetail # where # positionDetail.Department == departmentRecId # exists join positionDuration # where positionDuration.Position==positionDetail.Position #// perDate >= positionDetail.ActivationDate && #// perDate <= positionDetail.RetirementDate # notexists join positionWorkerAssignment # where # positionWorkerAssignment.Position == positionDetail.Position; # # // Accumulate the unfilled positions count. # hrmNumberOfVacantPositions += positionDetail.RecId; # listIterator.next(); # } # # return hrmNumberOfVacantPositions; #} ENDSOURCE SOURCE #numberOfWorkers #/// <summary> #/// Calculates the number of unique workers for a specified department and its children, if it is #/// specified. #/// </summary> #/// <param name="_countChildren"> #/// A Boolean value that specifies whether to include child departments in the worker total; optional. #/// </param> #/// <param name="_includeContractors"> #/// A Boolean value that specifies whether to include contract workers in the worker total; optional. #/// </param> #/// <param name="_departmentRecId"> #/// A record ID value that represents the <c>OMOperatingUnit</c> table for which to calculate the #/// worker total. #/// </param> #/// <param name="_perDate"> #/// An as-of <c>utcdatetime</c> to base date range selections upon. #/// </param> #/// <returns> #/// The count of the total number of workers for a department or department and its children; see #/// remarks. #/// </returns> #/// <remarks> #/// Workers can be affiliated to multiple positions across multiple departments, but the intent of this #/// method is to provide the unique number of employees, regardless. #/// </remarks> #static server HRMNumberOfEmployees numberOfWorkers( # boolean _countChildren = false, # boolean _includeContractors = false, # OMDepartmentRecId _departmentRecId = 0, # utcdatetime _perDate = DateTimeUtil::getSystemDateTime()) # #{ # HcmPositionDetail positionDetail; # HcmPositionDuration positionDuration; # HcmPositionWorkerAssignment positionWorkerAssignment; # HcmEmployment workerEmployment; # ListIterator listIterator; # List list; # Set workers = new Set(Types::Int64); # OMDepartmentRecId departmentRecId; # utcdatetime perDate = _perDate; # # list = new List(Types::Int64); # # # if (_departmentRecId) # { # list.addEnd(_departmentRecId); # } # # if (_countChildren) # { # list = OMOperatingUnit::getDepartmentChildren(_departmentRecId, list, DateTimeUtil::date(perDate)); # } # # listIterator = new ListIterator(list); # listIterator.begin(); # # if (_includeContractors) # { # // Iterate through the list of departments to count. # while (listIterator.more()) # { # departmentRecId = listIterator.value(); # # // Query against the HcmWorkerAffiliation table polymorphically since it comprises records from both # // the employee and contractor affiliation tables. # while select ValidTimeState(_perDate) Position, Department from positionDetail # exists join positionDuration # where # positionDuration.Position == positionDetail.Position && # positionDetail.Department == departmentRecId # { # while select ValidTimeState(_perDate) Position, Worker from positionWorkerAssignment # where # positionWorkerAssignment.Position == positionDetail.Position # { # while select ValidTimeState(_perDate) RecId, Worker from workerEmployment # where # workerEmployment.Worker == positionWorkerAssignment.Worker # { # // Although a worker may have multiple affiliations across multiple departments, using # // a Set class will ensure that the employee will only be added (and thus counted) once. # workers.add(workerEmployment.Worker); # } # } # } # listIterator.next(); # } # } # else # { # // Iterate through the list of departments to count. # while (listIterator.more()) # { # departmentRecId = listIterator.value(); # # // Query against the employee affiliation table since excluding contractors. # while select ValidTimeState(_perDate) Position, Department from positionDetail # exists join positionDuration # where # positionDuration.Position == positionDuration.Position && # positionDetail.Department == departmentRecId # { # while select ValidTimeState(_perDate) Position, Worker from positionWorkerAssignment # where # positionWorkerAssignment.Position == positionDetail.Position # { # while select ValidTimeState(_perDate) RecId, Worker from workerEmployment # where # workerEmployment.Worker == positionWorkerAssignment.Worker && # workerEmployment.EmploymentType == HcmEmploymentType::Employee # { # // Although a worker may have multiple affiliations across multiple departments, using # // a Set class will ensure that the employee will only be added (and thus counted) once. # workers.add(workerEmployment.Worker); # } # } # } # listIterator.next(); # } # } # # // Return the number of unique workers assigned # return workers.elements(); #} # ENDSOURCE SOURCE #operatingUnitLookup #/// <summary> #/// Provides a custom lookup of the <c>OMOperatingUnit</c> records that are of the specified #/// <c>OMOperatingUnitType</c> type. #/// </summary> #/// <param name="_formReferenceControl"> #/// The <c>FormReferenceControl</c> value for which the lookup being created by this method is #/// servicing. #/// </param> #/// <param name="_type"> #/// An <c>OMOperatingUnitType</c> value that indicates what type discriminator to use by which the #/// <c>OMOperatingUnit</c> table is filtered. #/// </param> #/// <param name="_name"> #/// A string that specifies a user-entered name that is ambiguous and must be resolved by the lookup; #/// optional. #/// </param> #/// <returns> #/// An <c>OMOperatingUnit</c> record that was selected by the user. #/// </returns> #/// <remarks> #/// This lookup helper method also assists in resolving duplicate names when surrogate key replacement #/// cannot do so automatically. #/// </remarks> #public static OMOperatingUnit operatingUnitLookup( # FormReferenceControl _formReferenceControl, # OMOperatingUnitType _type, # DirPartyName _name = '') #{ # OMOperatingUnit selectedRecord; # SysReferenceTableLookup sysTableLookup = SysReferenceTableLookup::newParameters(tableNum(OMOperatingUnit), _formReferenceControl, true); # Query lookupQuery; # QueryBuildDataSource ouQbds; # boolean unfiltered = (_type == 0); # # sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, Name)); # sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, NameAlias)); # sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, omOperatingUnitNumber)); # sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, HcmWorker)); # if (unfiltered) # { # sysTableLookup.addLookupfield(fieldNum(OMOperatingUnit, omOperatingUnitType)); # } # # // Create a custom Query that filters to show only a specific OMOperatingUnitType # lookupQuery = new Query(); # ouQbds = lookupQuery.addDataSource(tableNum(OMOperatingUnit)); # ouQbds.fields().addField(fieldNum(OMOperatingUnit, Name)); # ouQbds.fields().addField(fieldNum(OMOperatingUnit, NameAlias)); # ouQbds.fields().addField(fieldNum(OMOperatingUnit, omOperatingUnitNumber)); # ouQbds.fields().addField(fieldNum(OMOperatingUnit, HcmWorker)); # if (unfiltered) # { # ouQbds.fields().addField(fieldNum(OMOperatingUnit, omOperatingUnitType)); # } # # if (!unfiltered) # { # // Filter the lookup by the specified type # ouQbds.addRange(fieldNum(OMOperatingUnit, omOperatingUnitType)).value(enum2str(_type)); # } # # // If a name is specified then it is being called in a duplicate resolution scenario, so filter # // on the name as well # if (_name) # { # // Filter to the specified name to help resolve duplicates # ouQbds.addRange(fieldNum(OMOperatingUnit, Name)).value(_name); # } # # sysTableLookup.parmQuery(lookupQuery); # selectedRecord = sysTableLookup.performFormLookup(); # # return selectedRecord; #} ENDSOURCE SOURCE #operatingUnitLookupUnfiltered #/// <summary> #/// Provides a custom lookup of all of the <c>OMOperatingUnit</c> records. #/// </summary> #/// <param name="_formReferenceControl"> #/// The <c>FormReferenceControl</c> value for which the lookup being created by this method is #/// servicing. #/// </param> #/// <param name="_name"> #/// A string that specifies a user-entered name that is ambiguous and must be resolved by the lookup; #/// optional. #/// </param> #/// <returns> #/// An <c>OMOperatingUnit</c> record that was selected by the user. #/// </returns> #/// <remarks> #/// This lookup helper method also assists in resolving duplicate names when surrogate key replacement #/// cannot do so automatically. #/// </remarks> #public static OMOperatingUnit operatingUnitLookupUnfiltered( # FormReferenceControl _formReferenceControl, # str 100 _name = '') #{ # // Call operatingUnitLookup specifying a null type # return OMOperatingUnit::operatingUnitLookup(_formReferenceControl, 0, _name); #} ENDSOURCE SOURCE #operatingUnitResolve #/// <summary> #/// Provides custom resolve reference logic for foreign keys to the <c>OMOperatingUnit</c> table by #/// filtering to a specified <c>OMOperatingUnitType</c> type. #/// </summary> #/// <param name="_formReferenceControl"> #/// The <c>FormReferenceControl</c> value for which the user typed in a value to resolve. #/// </param> #/// <param name="_type"> #/// An <c>OMOperatingUnitType</c> value that indicates what type discriminator to use by which the #/// <c>OMOperatingUnit</c> table is filtered. #/// </param> #/// <returns> #/// An <c>OMOperatingUnit</c> record that was selected by the user. #/// </returns> #/// <remarks> #/// This resolve helper method also assists in resolving duplicate names when surrogate key replacement #/// cannot do so automatically. #/// </remarks> #public static OMOperatingUnit operatingUnitResolve( # FormReferenceControl _formReferenceControl, # OMOperatingUnitType _type) #{ # OMOperatingUnit operatingUnit; # DirPartyName operatingUnitName = ''; # boolean unfiltered = (_type == 0); # # // Get the text that the user entered into the control to see if there is a match to display # operatingUnitName = _formReferenceControl.filterValue(AbsoluteFieldBinding::construct(fieldStr(OMOperatingUnit, Name), tableStr(OMOperatingUnit))).value(); # # // Determine if there are duplicate names to resolve. # if (unfiltered) # { # // No filtering necessary # select count(RecId) from operatingUnit # where # operatingUnit.Name == operatingUnitName; # } # else # { # // A type is specified, so filter by it # select count(RecId) from operatingUnit # where # operatingUnit.Name == operatingUnitName && # operatingUnit.omOperatingUnitType == _type; # } # # // If there are more than one workers of the same name then use a lookup to resolve # if (operatingUnit.RecId > 1) # { # operatingUnit = OMOperatingUnit::operatingUnitLookup(_formReferenceControl, _type, operatingUnitName); # } # else # { # // Retrieve the unique operating unit # if (unfiltered) # { # // No filtering necessary # select # operatingUnit # where # operatingUnit.Name == operatingUnitName; # } # else # { # select # operatingUnit # where # operatingUnit.Name == operatingUnitName && # operatingUnit.omOperatingUnitType == _type; # } # } # # return operatingUnit; # #} ENDSOURCE SOURCE #operatingUnitResolveUnfiltered #/// <summary> #/// Provides custom resolve reference logic for foreign keys to the <c>OMOperatingUnit</c> table where #/// filtering to a specified <c>OMOperatingUnitType</c> type is not required. #/// </summary> #/// <param name="_formReferenceControl"> #/// The <c>FormReferenceControl</c> value for which the user typed in a value to resolve. #/// </param> #/// <returns> #/// An <c>OMOperatingUnit</c> record that was selected by the user. #/// </returns> #/// <remarks> #/// This resolve helper method also assists in resolving duplicate names when surrogate key replacement #/// cannot do so automatically. #/// </remarks> #public static OMOperatingUnit operatingUnitResolveUnfiltered(FormReferenceControl _formReferenceControl) #{ # // Call operatingUnitResolve specifying a null type # return OMOperatingUnit::operatingUnitResolve(_formReferenceControl, 0); #} ENDSOURCE ENDMETHODS ENDTABLE
***Element: PRN
; Microsoft Dynamics AX Project : CAPWH_Changes unloaded; -------------------------------------------------------------------------------- PROJECTVERSION 2 PROJECT #CAPWH_Changes SHARED PROPERTIES Name #CAPWH_Changes Origin #{42F9D483-B98B-449E-A5C8-7305629648AC} ENDPROPERTIES PROJECTCLASS ProjectNode GROUP #Forms PROPERTIES Name #Forms ProjectGroupType #Forms GroupMask # PreventEditProperties #No ENDPROPERTIES BEGINNODE FILETYPE 0 UTILTYPE 11 UTILOBJECTID 0 NODETYPE 201 NAME #RetailStoreTable ENDNODE ENDGROUP GROUP #Tables PROPERTIES Name #Tables ProjectGroupType #Tables GroupMask # PreventEditProperties #No ENDPROPERTIES BEGINNODE FILETYPE 0 UTILTYPE 44 UTILOBJECTID 2377 NODETYPE 204 NAME #OMOperatingUnit ENDNODE ENDGROUP ENDPROJECT
***Element: END
Regards,
Wesley
Thanks a lot Wesley, much appreciated
Thank you Wesley, It helped me