Wednesday, November 29, 2017

TFS build with DAX Online VSTS

TFS build with DAX

Prerequisite:
Visual studio 2010 with SP1
Team explorer 2010

Steps:
1) Install Visual Studio 2010 with SP1
2) Install Team Explorer 2010
3) Create your team site for TFS Online (https://www.visualstudio.com/team-services/)
4) Configure version control in AX
   4.1) Open Devleopment workspace
   4.2) Version control-> Version control parameter form
   4.3) Create new repository folder in your local drive and mention the path in version control parameter form,
   4.4) Mention the TSF URL of your site
   4.5) Mention name of the project you have created in your TFS site
   4.7) You have to create one root folder under the repository folder
       and mention the name of that folder in “Application rood folder” text box in parameter form
   4.8) enter login credential for your TFS site
5) Configured TFS site and AX

Download Auto Build script
Auto Build Script

AX Build Tool
AX build Tool

Combine XPO tool
Code in CMD prompt
CombineXPOs.exe -XpoDir D:\XPO\Project1.xpo D:\XPO\Project2.xpo

Thursday, November 23, 2017

RLS & XDS in DAX


Difference Between RLS & XDS

Record Level Security(RLS):
RLS was only a filter on forms. When you have two or more roles with the same table you need to apply id on all roles. When you access the table from outside AX (e.g. business connector), there was no filter applied.
Extensible Data Security(XDS): XDS adds statements to queries on AOS level. So the data will be filtered if you have defined multiple roles where only one role has an XDS policy.

XDS reference steps link: https://www.dynamics101.com/implementing-role-based-extensible-data-security-xds-policies-in-microsoft-dynamics-ax-2012/


XDS:

XDSServices  xdsServices = new XDSServices();
str getSQLxds;
;
xdsServices.setXDSState(0); //Disable XDS

xdsServices.setXDSState(1); //Enable XDS

//To Get XDS policy name(Restricted data) and defined Query from Table name as input)

getSQLxds = xdsService.getTableSQL("TableNum");
info(getSQLxds);

Tuesday, November 14, 2017

Execute Store Procedure in X++

Connection connection = new Connection();
Statement statement = connection.createStatement();
str sqlCode = 'EXECUTE  ';// Store procedure statement in X++
SqlStatementExecutePermission permission = new SqlStatementExecutePermission(sqlCode);
permission.assert();
statement.executeQuery(sqlCode);

Tuesday, November 7, 2017

Method and its associated ( Preceding & Succeeding event) in DAX 365


Reference Source Link: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/extensibility/customization-overlayering-extensions

Published form DataSource method
Preceding eventSucceeding event
activeN/AActivated
deleteDeletingDeleted
validateWriteValidatingWritingValidatedWrite
writeWritingWritten
createCreatingCreated
executeQueryN/AQueryExecuted
linkActiveN/APostLinkActive
initN/AInitialized
validateDeleteValidatingDeleteValidatedDelete
rereadN/AReread
selectionChangedN/ASelectionChanged
markChangedN/AMarkChanged
leaveRecordLeavingRecordLeftRecord
Published form Object methodPreceding eventSucceeding event
initInitializingInitialized
closeClosingN/A
runN/APostRun
activateN/AActivated
Published form Control methodPreceding eventSucceeding event
modifiedN/AModified
validateValidatingValidated
leaveLeavingLostFocus
enterN/AEnter
gotFocusN/AGotFocus
clickedN/AClicked
selectionChangeSelectionChangingN/A
pageActivatedN/APageActivated
allowPageDeactivateAllowPageDeactivateN/A
expandExpandingExpanded
tabChangedN/ATabChanged
dialogClosedN/ADialogClosed


Published Table methodPreceding eventSucceeding event
validateWriteValidatingWriteValidatedWrite
validateDeleteValidatingDeleteValidatedDelete
validateFieldValidatingFieldValidatedField
validateFieldValueValidatingFieldValueValidatedFieldValue
modifiedFieldModifyingFieldModifiedField
modifiedFieldValueModifyingFieldValueModifiedFieldValue
InsertInsertingInserted
UpdateUpdatingUpdated
DeleteDeletingDeleted
InitvalueInitializingRecordInitializedRecord
FinalDeleteValidationExecuted when a delete operation is performed on a table object, before the operation is committed to the underlying database tableN/A
FinalInsertValidationExecuted when an insert operation is performed on a table object, before the operation is committed to the underlying database tableN/A
FinalReadValidationExecuted when a read operation is performed on a table object.N/A
FinalUpdateValidationExecuted when an update operation is performed on a table object, before the operation is committed to the underlying database table.N/A

Upload data from Excel in D365FO X++

 Action Menu Item: SAN_UploadExcelData Object type: Class Object: <Controller class name> Label: <> Class: Controller class clas...