Skip to main content

Posts

Showing posts with the label address

Convert Dynamics AX Entity Private Address into Public GAB Address

In this article, we will see how to convert Customer / Vendor's private addresses into public GAB addresses. If you try to do it manually by clicking the public check box on a private address then it will just not allow you to do it. Here is the code to do so: 1: //Converts private addresses to public addresses 2: static void ConvertPrivateAddressToPublic(Args _args) 3: { 4: #OCCRetryCount 5: DirPartyAddressRelationshipMapping dirPartyAddressRelationshipMapping; 6: Address address, address2; 7: DirParty dirParty; 8: DirPartyTable dirPartyTable; 9: 10: void convertAddress() 11: { 12: ; 13: address.clear(); 14: address = Address::findRecId(address2.RecId, true ); 15: 16: //dir party associated with the entity 17: dirParty = DirParty::constructFromCommon(address); 18...

Dynamics Ax Global Address Book

In this article we will discuss a very important and useful Dynamics Ax feature, Global Address Book. This article is good for both functional and technical consultants. Note: This article is for advanced Dynamics Ax users. Good knowledge of Dynamics Ax and SQL server is required. Global Address Book : It 's a mechanism to share organization details, mainly communication and address, between different business entities in the company. For example, you may have a customer which is also a vendor; in this case there would be data redundancy or unnecessary duplication of address data if you had to enter the same address on customer and vendor. Wouldn't it be good, if you can store data once in Address table and share this between different business identities of the company. Yeah, sounds good. Solution to this problem is global address book or sometimes you call it directory. This concept works on business parties. You create a business party in the global addre...

a Job to update the SID after a Domain change

but you could also use it to Sync the active accounts between AD and AX static void ChangeDomain(Args _args) { UserInfo userInfo; xAxaptaUserManager axUsrMgr; xAxaptaUserDetails axUsrDet; Boolean doUpdate; Username user; SID oldSID; #define.NewDomain("New.DOMAIN.NET") ; doUpdate = Box::yesNo("User aktualisieren?", DialogButton::No) == DialogButton::Yes; axUsrMgr = new xAxaptaUserManager(); ttsbegin; setPrefix('SID-Aktualisierung'); while select forupdate userInfo { axUsrDet = axUsrMgr.getDomainUser(#NewDomain,userInfo.networkAlias); if(userInfo && axUsrDet) { oldSID = userInfo.sid; userInfo.networkDomain = #NewDomain; userInfo.sid = axUsrMgr.getUserSid(userInfo.networkAlias, #NewDomain); if(doUpdate) { info(strfmt("Aktualisiert", userInfo.networkAlias)); userInfo.update(); } } else { error(strfm...

address tables

DirPartyAddressRelationShip                dirPartyAddressRelationShip; DirPartyAddressRelationShipMapping dirPartyAddressRelationShipMapping; Address address; ; select firstonly * from DirPartyAddressRelationShip join  dirPartyAddressRelationShipMapping join address order by  DirPartyAddressRelationShip.Shared desc,  DirPartyAddressRelationShip.IsPrimary desc                         where DirPartyAddressRelationShip.PartyId == VendTable::find(vendPAckingSlipJour.OrderAccount).PartyId && dirPartyAddressRelationShipMapping.PartyAddressRelationshipRecId == dirPartyAddressRelationShip.RecId && address.RecI...