Posts

Showing posts from April, 2010

AOT object audit Job

By using this job anyone can do audit of all the AOT objects . static void AOTObjectAudit(Args _args) { TreeNode TreeNode; TreeNode BaseTreeNode; UtilEntryLevel UtilEntryLevel; UtilElements utilElements; #AOT ; BaseTreeNode = TreeNode::findNode(#TablesPath); TreeNode = BaseTreeNode.AOTfirstChild(); while(TreeNode) { { utilElements = xUtilElements::findTreeNode(TreeNode); info(strfmt("Created by %1", utilElements.createdBy)); info(strfmt("Created date %1", datetime2str(utilElements.createdDateTime ))); info(strfmt("Modified by %1", utilElements.modifiedBy)); info(strfmt("Modified date %1",datetime2str(utilElements.modifiedDateTime))); } break; TreeNode=TreeNode.AOTnextSibling(); } }

Creating outlook appointments through Axapta

static void OutlookAppointment( Args _args) { COM sysOutlookCollection; COM collection; COM c,to; COMVariant comStartDate = new COMVariant() ; COMVariant comEndDate = new COMVariant() ; #SysOutLookCOMDEF #define.mapi("MAPI") #define.outlook("Outlook.Application") COM sysOutlook; COM sysOutlookNameSpace ; COM sysOutlookMAPIFolder; ; sysOutlook = new COM(#outlook) ; sysOutlookNameSpace = sysOutlook.getNamespace(#mapi) ; sysOutlookNameSpace .logon(); sysOutlookMAPIFolder = sysOutlookNameSpace .getDefaultFolder(#OlDefaultFolders_olFolderCalendar );//Find the Folder in which meeting is saved collection = sysOutlookMAPIFolder.items() ; c = collection.add( ); c.MeetingStatus(1); // Set type to meeting to = c.Recipients(); to.add('sukrut.parab@ignify.com'); comStartDate. date(today( )); comStartD...