[development-axapta] AOTSetPropertiesExt
Hi All, Has anyone successfully change a table field's property (especially ExtendedDataType) using AOTSetPropertiesExt in AX 2009 SP0/SP1 by using AOTSetPropertiesExt? Whenever I tried to run below job, it crashed at AOTSetPropertiesExt statement. I had experience to make it run once before, but maybe I was lucky. static void Job6(Args _args) { #define.TableName( 'TSTTestTable' ) #define.FieldName( 'TestField' ) #AOT #Properties TreeNode a,b,c; AOTTableFieldList fields; Struct s; Map map = new Map(Types::String, Types::String) ; Counter propertiesCount; Array propertyInfoArray; Struct propertyInfo; str propertyValue; int i; ; //create table a = infolog.findNode( #TablesPath) ; b = a.AOTfindChild( #TableName) ; if (!b) { b = a.AOTadd(#TableName ); b.AOTsave(); } //create field fields = b.AOTfindChild( 'Fields') ; c = fields.AOTfindChild (#FieldName) ; if (!c) { fields.addString( #FieldName) ; c = fields.AOTfindChild (#FieldName) ; b.AOTsave(); } //set field's properties s = c.AOTgetPropertiesE xt(); map.insert(# PropertyExtended DataType, 'SalesId'); propertiesCount = s.value('Entries' ); propertyInfoArray = s.value('PropertyIn fo'); for (i = 1; i = propertiesCount; i++) { propertyInfo = propertyInfoArray. value(i); if (map.exists( propertyInfo. value('Name' ))) { propertyValue = map.lookup(property Info.value( 'Name')); propertyInfo. value('Value' , propertyValue) ; } } c.AOTsetPropertiesE xt(s); b.AOTsave(); } If I run it on AX 4 SP2, it didn't crash, but the string size is wrong (2 instead of 10 as in SalesId). But second run will give 10 in string size. Is it as simple as 'unstable'? If I use normal AOTSetProperties, sometimes it hang or took very long time to finish (either 30 seconds or forever). Regards, Start your day with Yahoo!7 and win a Sony Bravia TV. Enter now http://au.docs.yahoo.com/homepageset/?p1=otherp2=aup3=tagline
Re: SV: [development-axapta] findrecord performance
Hi, Stefan, There is another solution that can work fast like in Go to the Main Table. When doing Go to the Main Table task, Axapta will run the form at ClassFactory static class, formRunClass function. Thus, I have observed the argument values there. After several trials and errors, the argument can then be verivied as a lookup form argument when the lookupField and lookupValue properties are filled. FormRun formRunClass(Args args) { if (args args.lookupField()) info(strFmt(â%1 - %2â, args.lookupField(),args.lookupValue())); return ClassFactory::formRunClassOnClient(args); } When a form has lookup argument, Axapta kernel will then load the page starting at the lookupValue property until end data. Then if the user click the previous button or go to the previous records, then Axapta kernel will load all records before lookupValue. This will consider paging, too. So, Axapta will also use sp_cursorFetch store procedure to obtain the data. But the query will then run twice (= lookupValue, and lookupValue). We needn't code the additional paging logic in the Axapta. We can just use the lookup functionality in the formâs argument. So, if we want to do it in the form itself, then we can just fill the argument, then call the executeQuery again to run Axapta kernel logic using lookup functionality. Here is the code (for this example, I use custTable table): void clicked() { Args args = element.args(); int ts,te; super(); ts = winAPI::getTickCount(); args.lookupField(fieldNum(CustTable,AccountNum)); args.lookupValue(âCUST987654321â); CustTable_ds.executeQuery(); te = winAPI::getTickCount(); info (strFmt(FindRecord cost = %1 ticks (%2 seconds),te-ts,(te-ts)/1000)); } I used the findRecord function and it took about three seconds or more, it depends on the record count. I used the lookup functionality and it took less than a second. Good luck. Erik Hansen [EMAIL PROTECTED] wrote: Hi, FindRecord has, as you have experienced huge performance problems. The way findRecord works is, that it loops the FormDataSource (xx_ds.next()) to find the actual record. The only other way is to use a range, but that has the disadvantage that you loose the complete overview over all other data. - Erik Fra: development-axapta@yahoogroups.com p� vegne af Stefan Osterburg Sendt: ma 02-01-2006 09:15 Til: development-axapta@yahoogroups.com Emne: [development-axapta] findrecord performance Hi, I am having a major problem with the performance of the formDatasource method findrecord in a form with lots of records. When I call the function it takes a lot of time to actually go to the record I need. What I want to do is to activate/show a certain record in the form. The must be a better way than using findrecord obviously - because for example the Go to the main table function in the same form works perfectly and fast. Any ideas? Stefan SPONSORED LINKS Computer part http://groups.yahoo.com/gads?t=msk=Computer+partw1=Computer+partw2=Programming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=yLpvcLTIDJ5FTkRJGsO11w Programming languages http://groups.yahoo.com/gads?t=msk=Programming+languagesw1=Computer+partw2=Programming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=cuhEClK4dU4wapXFmKisbQ Microsoft axapta http://groups.yahoo.com/gads?t=msk=Microsoft+axaptaw1=Computer+partw2=Programming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=yfeG_U6QaLfPOZZIud02Fg Support exchange http://groups.yahoo.com/gads?t=msk=Support+exchangew1=Computer+partw2=Programming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=hy8yRGMzrmxdphyITTUeqA YAHOO! GROUPS LINKS * Visit your group development-axapta http://groups.yahoo.com/group/development-axapta on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . [Non-text portions of this message have been removed] SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange - YAHOO! GROUPS LINKS Visit your group development-axapta on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET - Yahoo! DSL Something to write home about. Just $16.99/mo. or less [Non-text portions of this message have been removed] SPONSORED LINKS
Re: [development-axapta] Change property on form element in runtime without AutoDeclaration(Fully dynamic
Sorry, my attachment did not attached successfully in the email, coz I did not click the send button for a long time period. Here is the attachment... Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hello, Michael, I have tried your method for display/hide the control in a grid. I tried it and it worked well. I attached my xpo (contains only one form) to show you my working code. Do you have another condition for the code? Maybe the TmpGrid.id()or UserSettings.visible or UserSettings.UserPosition has a wrong value. Good luck. mbhansen83 [EMAIL PROTECTED] wrote: Hi I have a problem that I haven't been able to find the answer too anywhere. Basically what I am doing is the following: I have a form containing a grid. Most of the different customers using this form always wants changes to the grid, which is why I decided on the solution below. From this form they can click on a dialog to enable/disable(visible or not) the different fields on the grid. I have now made it so that I build the dialog by running through the elements of the grid in run time. I am able to get all the properties without any problems. But when they click disable on the dialog and I want to get that change effective(runtime) in the grid-element it doesn't show/hide the element, even though in the debugger I can see it changing before and after. Here's the code: Object parentControl, childcontrol; ; ... parentControl = element.form().design().control(TmpGrid.id()); childControl = parentControl.controlNum(UserSettings.Position); childControl.visible(UserSettings.visible); // I have tried all these but noone of them seem to work: element.redraw(); this.redraw(); element.refresh(); I really hope someone can help me with this, because I am almost considering going back to the old crappy solution where its not dynamic. Thanks Michael __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] SPONSORED LINKS Computer part Programming languages Microsoft axapta& nbsp; Support exchange - YAHOO! GROUPS LINKS Visit your group development-axapta on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Change property on form element in runtime without AutoDeclaration(Fully dynamic
Hello, Michael, I have tried your method for display/hide the control in a grid. I tried it and it worked well. I attached my xpo (contains only one form) to show you my working code. Do you have another condition for the code? Maybe the TmpGrid.id()or UserSettings.visible or UserSettings.UserPosition has a wrong value. Good luck. mbhansen83 [EMAIL PROTECTED] wrote: Hi I have a problem that I haven't been able to find the answer too anywhere. Basically what I am doing is the following: I have a form containing a grid. Most of the different customers using this form always wants changes to the grid, which is why I decided on the solution below. From this form they can click on a dialog to enable/disable(visible or not) the different fields on the grid. I have now made it so that I build the dialog by running through the elements of the grid in run time. I am able to get all the properties without any problems. But when they click disable on the dialog and I want to get that change effective(runtime) in the grid-element it doesn't show/hide the element, even though in the debugger I can see it changing before and after. Here's the code: Object parentControl, childcontrol; ; ... parentControl = element.form().design().control(TmpGrid.id()); childControl = parentControl.controlNum(UserSettings.Position); childControl.visible(UserSettings.visible); // I have tried all these but noone of them seem to work: element.redraw(); this.redraw(); element.refresh(); I really hope someone can help me with this, because I am almost considering going back to the old crappy solution where its not dynamic. Thanks Michael __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] args
Hi, byteway_so, Is what you mean the datasource that is in the form? If so, then just send the DataSourceName using record accessor method. So, if you want to get the FormObjectSet object, then use element.args().record().dataSource() function. Ex.: Args args; ; args = new Args(); args.record(SalesTable); //when receiving the argument: SalesTable salesTableLocal = element.args().record(); FormObjectSet salesTableLocal.dataSource(); byteway_so [EMAIL PROTECTED] wrote: Hi, How can I pass a datasource (with selected records) in an args object? Tried the dataset method without luck, also parm(datasourceName) didn't work. Args arg; ; args = new Args(); //args.parm(datasourceName); //args.dataset()= datasourceName; Any hints? SPONSORED LINKS Computer part Programming languages Microsoft axapta& nbsp; Support exchange - YAHOO! GROUPS LINKS Visit your group development-axapta on the web. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET - Yahoo! Music Unlimited - Access over 1 million songs. Try it free. [Non-text portions of this message have been removed] SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] like clause in query
Hi, Meyyappan, You should use special code to write character '%' in strFmt function like this: select * from %1 where %1.Name like '\%abc\%' or strFmt( select * from %1 where %1.Name like '%2abc%2' ,table,%) Good luck. --- Meyyappan [EMAIL PROTECTED] wrote: I am creating a IAxapta Record and then executing the query select * from %1 where %1.Name =='*abc*' But it is not returning any record. The query is working if I will specify the full name like select * from %1 where %1.Name =='abcedfg' select * from %1 where %1.Name like '%abc%' like clause is also not working for pattern matching. It is also expecting the full string. Following is the code I m using: IAxaptaRecord objAxRec = _objAxConnection.CreateRecord(TableName); _objAxConnection.ExecuteStmt(strQuery,_ objAxRec, null,null, null, null, null) Is this not supported?. Is there any other approach to achive the same functionality? Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET __ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com SPONSORED LINKS Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Print group totals in auto reports
Hello, Stefan Osterburg, If you want to change the property dynamically with user interaction, then need modification at the report and also the parameter form (which is SysQueryForm form). This is the example code for change the property programatically: //init method of the report public void init() { object obj; ; super(); obj = element.design().sectionName(SalesLine_1).controlName(SalesLine_LineAmount); obj.SumAll(NoYes::Yes); } >From above method, you may add conditions which controls will be summed or not summed. I'm sorry I cannot provide more detailed solution, but you can use above code as a good start. Good luck. --- Stefan Osterburg [EMAIL PROTECTED] wrote: Sonny, thanks for your answer - but I do not want to save the autoreport in AOT as I want the user to choose by what feidls he needs the report grouped and sub-totaled: The user clicks on the print icon, when he is in a form where in my case ProjJournalTrans is the datasource, Axapta opens the dialog for Auto-Reports, the user clicks Select and on the tab Sorting can choose the fields to sort the report by and decide to print subheadings and subtotatals, whenever the value in a certain sort field changes. Unfortenately, Axapta does not print subtotals for all number fields, but only certain fields. As I explained in my initial mail the following example shows what I mean: when I use auto-report on LedgerTrans table I get a sum on the AmountMST field but not on the AmountMSTSecond field. Likewise I cannot get Axapta to automatically print subtotals on ProjJournalTrans\Qty field. What I woulkd like to know is how I can tell Axapta to consider certain number fields for automatic subtotal-creation. Stefan Sonny Wibawa Adi schrieb: Hi, Stefan, You have to change the report design through AOT. Set the property SumAll or SumNeg or SumPos of real-type controls to Yes. Those controls will then be summed up by Axapta automatically. --- Stefan Osterburg [EMAIL PROTECTED] wrote: Hi, I am trying to use Axapta's auto report to print group total sums. However I do not get this to work for all fields I would like to sum up. For example when I use auto-report on LedgerTrans table I get a sum on the AmountMST field but not on the AmountMSTSecond field. However what I am actually trying is to get an auto-report on ProjJournalTrans print sub-totals for the Qty field. Any idea, how Axapta chooses the fields to print sums for and what I can do to change this? Stefan Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM ~- Yahoo! Groups Links http://groups.yahoo.com/group/development-axapta/ [EMAIL PROTECTED] Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ Yahoo! Groups Links Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Print group totals in auto reports
Hi, Stefan, You have to change the report design through AOT. Set the property SumAll or SumNeg or SumPos of real-type controls to Yes. Those controls will then be summed up by Axapta automatically. --- Stefan Osterburg [EMAIL PROTECTED] wrote: Hi, I am trying to use Axapta's auto report to print group total sums. However I do not get this to work for all fields I would like to sum up. For example when I use auto-report on LedgerTrans table I get a sum on the AmountMST field but not on the AmountMSTSecond field. However what I am actually trying is to get an auto-report on ProjJournalTrans print sub-totals for the Qty field. Any idea, how Axapta chooses the fields to print sums for and what I can do to change this? Stefan Yahoo! Groups Sponsor ~-- Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/saFolB/TM ~- Yahoo! Groups Links http://groups.yahoo.com/group/development-axapta/ [EMAIL PROTECTED] Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Form datasource .query() modification
Hi, christoph.malherbe, Why do you use the code to make a dynamic link manually? Delete the code in executeQuery, and create relation between VehicleTable and VehicleOwnerHistory on VehicleOwnerHistory table. When you create a menuitembutton on VehicleTable form that launch VehicleOwnerHistory form, then Axapta will create the dynamic link automatically. If you want to learn about this, create the simplest forms and tables. Then, use that method on your form, because I don't see your other modifications on your form. Good luck. --- cdlmalherbe01 [EMAIL PROTECTED] wrote: I have a table Vehicles which contains 2 fields, VehicleId and OwnerId. VehicleId is the primary key for table VehicleTable. When the OwnerId is changed, I record the value of the previous OwnerId in a table called VehicleOwnerHistory with fields VehicleId, OwnerId, DateChanged etc. From my VehicleTable form, I want to launch a form VehicleOwnerHistory form which shows the list of historical owners. This form is used to view and update the list of historical owners. I looked at the LedgerTransAccount form and how it is launched from the LedgerTable form to show transactions for the selected account only. The principle applies to my problem. I've adapted the code in the InitQuery and executeQuery methods of the LedgerTransAccount form: void InitQuery()--- { Query query; Vehicles vehicles; VehicleOwnerHistory vehicleOwnerHistory; ; query = new query(querystr(vehicleOwnerHistory)); switch(element.args().dataset()) { case(tablenum(FSMEquip)): fsmEquip = element.args().record(); query.dataSourceNo(1).addDynalink(fieldnum (Vehicles,VehicleId),Vehicles,fieldnum (VehicleOwnerHistory,VehicleId)); break; default: } VehicleOwnerHistory_ds.query(query); } public void executeQuery()--- { this.InitQuery(); super(); } It seems to work except for the fact that it returns only 1 record when I launch the VehicleOwnerHistory form, irrespective how many matching records exist in the VehicleOwnerHistory table. All help appreciated! Best regards, Sonny Wibawa Adi MBS Certified Professional - Axapta 3.0 Technical MCSD.NET MCAD.NET __ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Modified Methods or similars on a Class
Hi, Gustavo Camargo, Do you mean that you have created a class that extends RunBaseReport and you want to catch modified event of the control in dialog form? I forget the method name for that, but actually that method is not flexible (it works different with form). But, I have another solution for this problem. You may just create the form for the dialog and do like the same with Axapta's form. So, modified method can be used here just like ordinary Axapta's form. For more detail solution in the class, open the Tutorial_RunbaseForm project in the shared node of project. Good luck. Best regards, Sonny Wibawa Adi, MBSCP, MCSD.NET, MCAD.NET --- Gustavo Camargo [EMAIL PROTECTED] wrote: Hi fellows!! This is the problem. I have a class with multiple paramters basically it is compounds by one radioButton Group o RadioButton1 o RadioButton2 RadioButton1 has a group of special parameters and RadioButton2 has another group of special parameters. I want to show the special paramteres for each one, only if the user selects one of the radioBtIn other words i want to know if i can use modified methods or similars on a class that permits to show and hide a group or text or any field in the class depending of the radioBt Selection??? Thanks to all!!! :) Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] reading sysdatabase log outside axapta
Hi Andres Jano, I couldn't help with the code, but I can give an information about the format of Axapta container stored in MSSQL database. I run a job to insert a container into a table, then I select the table from Query Analyzer. From there, I could see that a container is stored with beginning 07 hexadecimal code and finished with FF hexadecimal code. >From that definition, you could begin to try and understand the other type of data (string, boolean, etc.) and define the total bytes required to store that type of data. About the table name and field name, you could use SqlDictionary table for lookup from tableId and fieldId. Anyway, hope this help and if my vs.net installation was okay, maybe I had tried the code myself. static void SWALearnContainerDataOutsideAxapta(Args _args) { Table6 a; ; a.Field1 = [ 'satu', 2, 3.0, 'satu', false, 'satu', true, 'satu', [ 'x', 'a', 1, 2, 3, [ 100, 200, 1\1\2005, [ 'abc' ] ] ], 'end' ]; a.insert(); /*0x 07 00 7361747500 01 0200 02 0030 00 7361747500 04 F0 00 7361747500 04 0100F0 00 7361747500 07 07 00 7800 00 6100 01 0100 01 0200 01 0300 07 07 01 6400 01 C800 03 69 07 07 00 61626300 FF FF FF 00 656E6400 FF dat 7974846 container = 07 { data }* FF data = string | integer | real | date | boolean | container string = 00 { byte }* 00 integer = 01 ( byte )^4 real = 02 ( byte )^10 date = 03 ( byte )^3 boolean = 04 ( 00 | 01 ) 00 F0 */ } Good luck. Best regards, Sonny Wibawa Adi, MBSCP, MCSD.NET, MCAD.NET --- Lars Mikkelsen [EMAIL PROTECTED] wrote: Yes. It is a serialized container of containers. You can see how it is serialized in method SysDataBaseLog.SetData and deserialized in method SysDataBaseLog.GetDataAsList. It is probably difficult to figure out the format of a serialized container, so it will be difficult to create an external algorithm for doing this, unless someone else has done this and is willing to publish the code. You have a couple of other options. Make a call through the COM connector and let a method in Axapta return the information in a format you can use. Overwrite Insert/update methods of SysDataBaseLog and store the information in a format that is easy for you to read and interpret. This could be in another table or in a new field in SysDataBaseLog in whatever format you may choose. _ From: development-axapta@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andres Janno Sent: Tuesday, August 23, 2005 2:49 AM To: development-axapta@yahoogroups.com Subject: Re: [development-axapta] reading sysdatabase log outside axapta No, I mean that sysdatabaselog data field is somehow crypted or something. It is container type of field. Is there any outside algorithm to decode this data field? Regards, Andres Erik Hansen wrote: You might need to install a ODBC driver on the computer, but otherwise use the ODBCConnection in Axapta. Best regard Erik From: development-axapta@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andres Janno Sent: 23. august 2005 10:30 To: development-axapta@yahoogroups.com Subject: [development-axapta] reading sysdatabase log outside axapta Hello! Is there any possibilities to read sysdatabaselog data container outside axapta? From sql query analyzer directly for example? Regards, Andres YAHOO! GROUPS LINKS * Visit your group development-axapta http://groups.yahoo.com/group/development-axapta on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] be * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . [Non-text portions of this message have been removed] SPONSORED LINKS Computer part http://groups.yahoo.com/gads?t=ms http://groups.yahoo.com/gads?t=msk=Computer+partw1=Computer+partw2=Progr amming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=yLpvc LTIDJ5FTkRJGsO11w k=Computer+partw1=Computer+partw2=Programming+languagesw3=Microsoft+axap taw4=Support+exchangec=4s=90.sig=yLpvcLTIDJ5FTkRJGsO11w Programming languages http://groups.yahoo.com/gads?t=ms http://groups.yahoo.com/gads?t=msk=Programming+languagesw1=Computer+part w2=Programming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.s ig=cuhEClK4dU4wapXFmKisbQ k=Programming+languagesw1=Computer+partw2=Programming+languagesw3=Micros oft+axaptaw4=Support+exchangec=4s=90.sig=cuhEClK4dU4wapXFmKisbQ Microsoft axapta http://groups.yahoo.com/gads?t=ms http://groups.yahoo.com/gads?t=msk=Microsoft+axaptaw1=Computer+partw2=Pr ogramming+languagesw3=Micros
RE: [development-axapta] reading sysdatabase log outside axapta
Hi, Andres, I have tried to insert a container data into a table and select it using SQL Query Analyzer. The format of a container I know is, it begins with 07 hex code and end with FF hex code. I can only provide the format of the container in image-type of the field. This is the regular _expression_ of the container: container = 07 { data }* FF data = 00 string | 01 integer | 02 real | 03 date | 04 boolean | 07 container string = { byte }* 00 integer = ( byte )^4 real = ( byte )^10 date = ( byte )^3 boolean = ( 00 | 01 ) 00 F0 Just create a code to read the image-type of a field, then query SqlDictionary table for the table and the field name. Good luck. static void SWALearnContainerDataOutsideAxapta(Args _args) { Table6 a; ; a.Field1 = [ 'abc', 2, 3.0, 'abc', false, 'abc', true, 'abc', [ 'x', 'a', 1, 2, 3, [ 100, 200, 1\1\2005, [ 'abc' ] ] ], 'end' ]; a.insert(); /*0x 07 00 61626300 01 0200 02 0030 00 61626300 04 F0 00 61626300 04 0100F0 00 61626300 07 07 00 7800 00 6100 01 0100 01 0200 01 0300 07 07 01 6400 01 C800 03 69 07 07 00 61626300 FF FF FF 00 656E6400 FF dat 7974846 container = 07 { data }* FF data = 00 string | 01 integer | 02 real | 03 date | 04 boolean | 07 container string = { byte }* 00 integer = ( byte )^4 real = ( byte )^10 date = ( byte )^3 boolean = ( 00 | 01 ) 00 F0 */ } Btw, is there problem with the yahoogroups? I have sent this email twice to make it work. Best regards, Sonny Wibawa Adi, MBSCP, MCSD.NET, MCAD.NET --- Lars Mikkelsen [EMAIL PROTECTED] wrote: Yes. It is a serialized container of containers. You can see how it is serialized in method SysDataBaseLog.SetData and deserialized in method SysDataBaseLog.GetDataAsList. It is probably difficult to figure out the format of a serialized container, so it will be difficult to create an external algorithm for doing this, unless someone else has done this and is willing to publish the code. You have a couple of other options. Make a call through the COM connector and let a method in Axapta return the information in a format you can use. Overwrite Insert/update methods of SysDataBaseLog and store the information in a format that is easy for you to read and interpret. This could be in another table or in a new field in SysDataBaseLog in whatever format you may choose. _ From: development-axapta@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andres Janno Sent: Tuesday, August 23, 2005 2:49 AM To: development-axapta@yahoogroups.com Subject: Re: [development-axapta] reading sysdatabase log outside axapta No, I mean that sysdatabaselog data field is somehow crypted or something. It is container type of field. Is there any outside algorithm to decode this data field? Regards, Andres Erik Hansen wrote: You might need to install a ODBC driver on the computer, but otherwise use the ODBCConnection in Axapta. Best regard Erik From: development-axapta@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andres Janno Sent: 23. august 2005 10:30 To: development-axapta@yahoogroups.com Subject: [development-axapta] reading sysdatabase log outside axapta Hello! Is there any possibilities to read sysdatabaselog data container outside axapta? From sql query analyzer directly for example? Regards, Andres YAHOO! GROUPS LINKS * Visit your group development-axapta http://groups.yahoo.com/group/development-axapta on the web. * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] be * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . [Non-text portions of this message have been removed] SPONSORED LINKS Computer part http://groups.yahoo.com/gads?t=ms http://groups.yahoo.com/gads?t=msk=Computer+partw1=Computer+partw2=Progr amming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.sig=yLpvc LTIDJ5FTkRJGsO11w k=Computer+partw1=Computer+partw2=Programming+languagesw3=Microsoft+axap taw4=Support+exchangec=4s=90.sig=yLpvcLTIDJ5FTkRJGsO11w Programming languages http://groups.yahoo.com/gads?t=ms http://groups.yahoo.com/gads?t=msk=Programming+languagesw1=Computer+part w2=Programming+languagesw3=Microsoft+axaptaw4=Support+exchangec=4s=90.s ig=cuhEClK4dU4wapXFmKisbQ k=Programming+languagesw1=Computer+partw2=Programming+languagesw3=Micros oft+axaptaw4=Support+exchangec=4s=90.sig=cuhEClK4dU4wapXFmKisbQ Microsoft axapta http://groups.yahoo.com/gads?t=ms http://groups.yahoo.com/gads?t=msk=Microsoft+axaptaw1=Computer+partw2=Pr ogramming+languagesw3=Microsoft
Re: [development-axapta] FormTreeDatasource
Hi Andre Klopper, The standard FormTreeDatasource doesn't implement filtered datasource into it. If you want to implement, modify subTreeQueryRun function in FormTreeDataSource class. Call mergeRanges method to merge the ranges into a new query object: QueryRun subTreeQueryRun(AnyType _ParentValue) { Query query = new Query(); QueryBuildDataSource queryBuildDataSource = query.addDataSource(formDataSource.table()); QueryBuildRange criteriaParentId = queryBuildDataSource.addRange(parentId); ; queryBuildDataSource.addSortField(txt); SysQuery::mergeRanges(query,formDataSource.query()); //this is the additional code if (_ParentValue) criteriaParentId.value(_ParentValue); else criteriaParentId.value(strFmt('%1',queryValue(_ParentValue))); return new QueryRun(query); } This is to filter the CustTable datasource, init method on tutorial_Form_Treedatasource form: void init() { super(); SysQuery::findOrCreateRange( CustTable_q.dataSourceNo(1), fieldNum(CustTable,CustGroup)).value(queryValue('20')); treeDatasource = new FormTreeDatasource(this,element.control(control::Tree), fieldnum(CustTable,accountNum), fieldnum(CustTable,invoiceAccount), fieldnum(CustTable,name) ); treeDatasource.initRoot(CompanyInfo::find().name,''); } If there are another requirements, then modify the class if needed. Good luck. Best regards, Sonny Wibawa Adi, MBSCP, MCSD.NET, MCAD.NET --- Andre Klopper [EMAIL PROTECTED] wrote: Ok, So I worked through the tutorial_Form_TreeDatasource. I get this to work but would like to take it one step futher... I want do create the tree on the data in a filtered datasource. How do I assign the filtered datasource to the FormTreeDatasource? Regards Andre __ Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail SPONSORED LINKS Computer part Programming languages Microsoft axapta Support exchange YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Can anybody explain me this syntax
Hi, Thomas, It's like a property in C#. Here is the code in C# with the same function as the method in Axapta (which in Axapta, it's called an 'accessor method'). public string name { get { return _emp.name; } set { _emp.name = value; } } About the parameter syntax: _Type n [= defValue]. The meaning of [= defValue] is the default value if the parameter is not set. So, in C# you can access the property value by calling the property name like this: MessageBox.Show(MyObject.name); In Axapta, you just doing the code like this: box::info(MyObject.name()); Axapta will set n as the same with _emp.name (in the argument), so The line code _emp.name = n; will have no effect to _emp.name (i.e. set _empl.name into n, which has been set equal to _empl.name). When you want to set the property value in C#, then it simply like this: MyObject.name = My Name; In Axapta, this is how we set from the accessor method: MyObject.name('My Name'); This will change _empl.name into a new value n in this line code _emp.name = n;. The returned value is not processed and the compiler will not give a syntax error. In Java, it's like the same with getProperty and setProperty methods. The difference between Java's set and get methods with Axapta's accessor method is, Axapta write the code in only one method using a default value parameter. Welcome to OOP in Axapta using X++. :) Regards, Sonny Wibawa Adi, MBSCP, MCAD.NET, MCSD.NET, MCP --- Thomas [EMAIL PROTECTED] wrote: Hello, I am used to programming Java and C#. But for some reason I have problems understanding this syntax: EmplName name(EmplName n = _emp.name) { _emp.name = n; return n; } I understand the following: the method name returns an EmplName. when calling the method you do it with a parameter n of the type EmplName. But what dows the n = _emp.name do? and what goes on in the method body? Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] How can i...
Hi, pallegude, No, you cannot do that, except... You create a ZeroTo99Table that have one field (with the same EDT) and fill the records with that field value to 0..99. Then, create EDT relation to ZeroTo99Table. The other way, is to put FormHelp property of the EDT to a form that shows table control. Table control should have row values numbers from 0 to 99. Then, you must to add the following code for each table that use the EDT on validateField method: public boolean validateField(fieldId _fieldIdToCheck) { boolean ret; MyEDT fieldValue; ret = super(_fieldIdToCheck); switch (_fieldIdToCheck) { case fieldname2id(this.TableId,MyEDT) : fieldValue = this.(fieldIdToCheck); if (fieldValue 0 || fieldValue 99) { ret = checkFailed(0..99); } break; } return ret; } Good luck. Regards, Sonny Wibawa Adi, MBSCP, MCAD.NET, MCSD.NET, MCP --- pallegude [EMAIL PROTECTED] wrote: I would like to create an integer that only accepts values from 0-99. I would think i had to create an extended datatype, but this doesn't seem to be possible. Ofcourse I can do it in the validate writing, but as it is a method to be used several places, it would be nice having an extended datatype. -- Best regards Palle Gude Consultant __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Re: Input mask
Hi Gideon, There are many ways to obtain it, though none of them is an easy task (as I know). The first way is, you create an array EDT (EDT with more than one array elements). The drawback is, the UI will create multiple stringEdit. The second way is, to manipulating the input controls just like real edit (format will be cleared when the cursor is entered and display the format after the cursor leaves). The sample code is like this: Set MyTable_1_Field1Ctl AutoDeclaration of StringEdit control to Yes. Override three methods: enter, leave and validate of that control. public class FormRun extends ObjectRun { boolean validateCalled; } public void enter() { str a; ; super(); //format: uk-12-3 validateCalled = false; a = MyTable_1.Field1; MyTable_1.Field1 = substr(a,4,2) + substr(a,7,1); MyTable_1_ds.refresh(); } public boolean validate() { boolean ret; str a; ret = super(); a = MyTable_1_Field1Ctl.text(); MyTable_1.Field1 = 'UK-' + substr(a,1,2) + '-' + substr(a,3,1); validateCalled = true; MyTable_1_ds.refresh(); return ret; } public boolean leave() { boolean ret; ret = super(); if (!validateCalled) this.validate(); return ret; } The third way is, to use AxtiveX to obtain it. For this solution I don't know the activeX name yet that can be used together with the Axapta. So, actually this is just an idea. Maybe other people in this forum have a better idea for the solution. Good luck. Regards, Sonny Wibawa Adi, MBSCP, MCAD.NET, MCSD.NET, MCP --- gideonneijs [EMAIL PROTECTED] wrote: Hi Tom, Thanks for the reply. The problem is that i don't want to use a number sequence. I only want to make sure the format of the number is correct. The number itself can be any number. Best regards, Gideon --- In development-axapta@yahoogroups.com, taulbert2000 [EMAIL PROTECTED] wrote: Hi Gideon, why don't you use the format of the number sequence? Your example should look like this: UK-##--##. Best regards, Tom --- In development-axapta@yahoogroups.com, Gideon Neijs [EMAIL PROTECTED] wrote: Hi all, Does anyone know if it's possible to set up an input mask on an EDT or a table field? For example: I want to prescribe that an item id always has the following fomat: xx-xx--xx (e.g UK-34-8732-02) Does anyone know if this is possible or have an suggestion? Thanks in advance! Gideon __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] How to call field's method of a table in the datasource?
Hi necmigocek, Did you mean by calling validate / modified-like methods of a specific field in form datasource? I tried this method on Axapta SP3 and worked well. public boolean validate() { boolean ret; ret = super(); info(X); return ret; } void clicked() { FormDataObject myField; super(); myField = SalesTable_ds.object(fieldNum(SalesTable,CustAccount)); myField.validate(); } Remember to use FormDataObject variable as pointer holder, if didn't then X won't be shown in infolog. (i.e. SalesTable_ds.object(...).validate(); will call validateField) Regards, Sonny Wibawa Adi, MBSCP, MCAD.NET, MCSD.NET, MCP --- necmigocek [EMAIL PROTECTED] wrote: __ Discover Yahoo! Stay in touch with email, IM, photo sharing and more. Check it out! http://discover.yahoo.com/stayintouch.html YAHOO! GROUPS LINKS Visit your group "development-axapta" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] (urgent) join datasources with code
Hi Cenk Ince, Set the JoinSource property of Table2 to Table1 (Table2 will follow Table1). Then, if you want to show them in the same grid, then change LinkType property of Table2 to InnerJoin (just like SalesLine and InventDim). If you want to show them in different grid, then nothing is changed (just link SalesTable and SalesLine). Next, override init method of Table2 and put this code after super(): //if joinType is innerJoin this.query().dataSourceTable(tableNum(Table2)).addLink( fieldNum(Table1,field1), fieldNum(Table2,field1)); //if joinType is delayed //this.query().dataSourceTable(tableNum(Table2)).addDynalink( // fieldNum(Table2,field1), // Table1, // fieldNum(Table1,field1)); I tried above code using new Tables (Table1 and Table2) with no relation between tables, no EDT and it worked well. Good luck. Regards, Sonny Wibawa Adi --- Cenk Ince [EMAIL PROTECTED] wrote: Hi all; I have 2 data sources on a form. Table1, Table2. There is no relation on Table2 for Table1. I want to put them on a form and join them on a field. I want to show data from both tables on a grid, but i don't want to use display methods. What i want to do is like salesline and inventDim. Just want to set relation with code. How to do it?. Thanks. Cenk Ince [Non-text portions of this message have been removed] __ Discover Yahoo! Have fun online with music videos, cool games, IM and more. Check it out! http://discover.yahoo.com/online.html Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Number sequence problems in Journals
Dear Palle, Hope this explanation is not too long to understand. Please check the create method in LedgerJournalTable form, LedgerJournalTable datasource. Is it the same with this? (Axapta 3.0 SP3) void create(boolean append = FALSE) { if (comboAllOpenPosted.selection() != AllOpenPosted::Posted) { if (! journalFormTable.datasourceCreatePre()) return; if (ledgerJournalTable.recId || !ledgerJournalTable.journalNum) super(append); journalFormTable.datasourceCreatePost(); ledgerJournalTable_ds.forceWrite(true); } } The code: if (ledgerJournalTable.recId || !ledgerJournalTable.journalNum) before calling super is important. It is because Axapta has a number sequence flow that is very strict when that number is commited used or canceled. But, axapta kernel has a contradiction condition with that flow. Because, axapta kernel will not call validateWrite and Write method of datasource if the kernel find no fields are filled (all fields are empty or not modified after calling initValue event). So, number sequence flow will take this case as uncommited number sequence, so it is stored in number sequence list as 'Activated'. Until, that number sequence is cleaned up, usually after 24 hours. After cleaned up, that number's status will change into 'Free'. So, it will give error message 'The number is already used.'. So, try to check create method with above method (it's important to check line above calling super method). Then, clean all number sequence list, and delete all number sequence that can make an error or delete all of them if you are sure that number will not be used again. Then, set 'next number' of that number sequence to the desired number. Regards, Sonny Wibawa Adi --- pallegude [EMAIL PROTECTED] wrote: When we create a new journal, it sometimes get a number that is allready used. When we look in the numbersequence free list, the number is in the free list, but looking in posted journals, shows it has allready been used for another journal. We have downloaded and installed the Hotfix from MS, which SHOULD have solved the problem, but it didn't !! It is still there. The error is not replicable, we et it with random users, random journaltypes, and random interval. Only thing we can be sure, it will occour again very soon in the future. Both we, and the customer, are quite frustrated. Please suggest whatever that MIGHT help us solve. Best regards Palle __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Retun temp table recordset to caller form
Hi Daniel Lim, Use element.args().caller() function, object type variable, myTable.setTmpData() method, formHasMethod() global function. It's only a hint and you should search again in microsoft axapta's developer guide for more detail. Regards, Sonny Wibawa Adi --- daniellim_yh [EMAIL PROTECTED] wrote: hi all, i faced problem on returning temp table recordset to caller form. for e.g Form1 call Form2 with a Temp table recordset passed in, after certain process user will close form2 and that recordset need to be pass back to form1, how can i do it? pls help n thx in advance. daniel __ Do you Yahoo!? Make Yahoo! your home page http://www.yahoo.com/r/hs Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Report Crashes
Hi Studlee15, I have experienced before with a report that crashed. When I run the report by opening it or called it from a form, then it was ok. But, when I called it from a form that is called from a form, then it crashed. I change the code (simplified) from: display str Addr() { str s; ; s += r.Addr; } into: display str Addr() { str s = ''; ; s += r.Addr; } Then it's ok now. Probably, you should check your code thoroughly. Axapta can crashed when there is a memory management failure or something like that. Regards, Sonny Wibawa Adi --- studlee15 [EMAIL PROTECTED] wrote: I have just created an inventory report in which I join the inventtable,inventsum,inventdim, and inevnttablemodule tables. Exerything works fine, until the last page is being displayed, then Axapta quits. I use a temporary table and populate it from the previously mentioned tables. The report gets through the tempTable populattion, and the loop in which I send the temp table to the report. But somewhere in between where fetch finished exectuing, and when the report has totally finished, it crashes and kicks me out of Axapta, but not consistantly, sometimes it works fine, and somtimes not. I think there is a printer problem. If I keep switching what printer to use, it seems to work OK, but if I continually run the report pointing to the same printer, it will eventually start crashing. Any Ideas?? __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] autoincrement
Hello, astro_viking The compilation error is because you read the documentation of number sequence (Number Sequence Step by Step in Axapta 20040628.doc) for Navision Axapta 3.0 SP3. If you want to learn more about how to create a number sequence for Damgaard Axapta 2.5, then read the X++ code in sys standard form (ex.: BOMTable form, SalesTable form). But, you have to filter yourself only the code needed for number sequencing. Your question about where is the place the code for this: 1. How to Call in One Scope of a Process. the answer is none if you want to use the number sequencing in a form. The meaning of one scope of a process, is: If you want to use the number sequencing in a job or a class or any method outside the Axapta's way to use number sequencing in a standard form. Probably, there will be a new section of that documentation with the text: 3. How to Use Number Sequence in an Axapta Form for Damgaard Axapta 2.5 after 2. How to Use Number Sequence in an Axapta Form for Navision Axapta 3.0 SP3 Regards, Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hello, I am following the guide about how to add a new numbersequence in Axapta. So far I have created the reference. But when I want to call the number sequence from a form i add this to the FormRun as mentioned in the guide - and I get a compilation error. Anybody knows why? (Axapta 2.5) class FormRun extends ObjectRun { NumberSeqFormHandler myNumberSeqFormHandler; } Also could somebody explain to me where to add the code in the section 1. How to Call in One Scope of a Process. You find the the guide here: http://finance.groups.yahoo.com/group/Axapta-Knowledge- Village/files/Members/ Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Manage less. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] What is the BEST practice using Class with Sql Statement
Hi, Yong, I read your code and found a non stable result at line: from _ProdBom join _ProdTable group by ItemId Because, You want to sum ProdBom table, joined with ProdTable that is grouped by ItemId, but you don't specify which prodTable.ItemId is. So, I change the code into: join tableId from _ProdTable //group by ItemId - which itemId ? All ? If you want to sum the quantity for all prodTable which having relation and conditions you have written (all filter except ItemId). So, if you want to speed up the query, this is my suggestion: Select Sum(QtyBomCalc) from _ProdBom where _ProdBom.ItemId == _itemId //probably you may add ProdStatus filter (see: ProdStatusIdx) join tableId from _ProdTable //group by ItemId - which itemId ? All ? where _ProdBom.ProdId == _ProdTable.ProdId _ProdTable.ProdStatus = ProdStatus::Scheduled _ProdTable.ProdStatus = ProdStatus::StartedUp _ProdTable.ProdType == ProdType::Vendor; For reducing memory usage, I still don't have a time to check that. Other suggestions may give a better result, though. Regards, Sonny Wibawa Adi pepejeans2k [EMAIL PROTECTED] wrote: Hi, I've created a static class that are reuseable in many reports. The problem is that it's slow and causing SQL to eat up a lot of physical memory. Can anyone of you pls take a look at these static class and advice what is the best practice to reduce the memory usage in SQL. Below is one of the example where I select all ItemId from Item Master, call below static class and pass in ItemId one by one as I need to display each item in rows. static InventQty GetExtWIPQty(ItemId _itemid) { ProdTable _ProdTable; ProdBom _ProdBom; ; Select ItemId, Sum(QtyBomCalc) from _ProdBom join _ProdTable group by ItemId where _ProdBom.ItemId == _itemId _ProdBom.ProdId == _ProdTable.ProdId (_ProdTable.ProdStatus == ProdStatus::Scheduled || _ProdTable.ProdStatus == ProdStatus::Released || _ProdTable.ProdStatus == ProdStatus::StartedUp) _ProdTable.ProdType == ProdType::Vendor; return _ProdBom.QtyBOMCalc; } Thks in adv, Best rgs, Yong. Yahoo! Groups Sponsor Get unlimited calls to U.S./Canada - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] Yahoo! Groups Sponsor Get unlimited calls to U.S./Canada Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Text on Report
Hi, Shruti, You can do that by creating an blank image in memory, then write a string into the image in vertical direction. After the image is prepared, then show it in a bitmap control of a report. I have done the code for that. You may ask me directly in my email for the solution. The other solution, is to write the escape sequence (if the printer accept escape sequence code for vertical printing method) using element.passThrough and element.setEscapeSequence methods. Thank you, Sonny Wibawa Adi Shruti [EMAIL PROTECTED] wrote: Thx for this information but still the alphabets are displayed in a horizontal fashion, i want to tilt the string as a whole. So if u can provide me some more information it will be really Great. Regards:: Shruti Jain Euroinfo Systems Pvt. Ltd. C-126, Sector - 2 Noida - 201301 (U.P.) Phone :- +91-120-2520414 - Original Message - From: Sonny Wibawa Adi To: development-axapta@yahoogroups.com Sent: Wednesday, February 02, 2005 6:17 AM Subject: Re: [development-axapta] Text on Report Hi Shruti, Please refer to technet.navision.com, discussion 48.4: this is a copied text from technet, by kjrgense, Denmark: One way to print a vertical text in a report It can be done by using the following approach: Make a pageHeader that has height 0.01 mm. (If it has height 0.00 mm it is not printed). Insert a stringControl in the pageHeader with width 1 Char and height e.g. 40 Char and left=Right edge. Set the font to a non proportional one (I used Courier). Set right margin for the other sections in the report to e.g. 1 cm (so they will not overlap the vertical text). In version 2.5 this works fine if the control in the pageHeader is a string control. To get a space in the vertical text insert a \n in the string. In version 2.1 the string must have a \n between each letter in the string, otherwise only the first letter in each word is printed. If you use a promptControl you might run into an 8 lines height limitation. When previewing this type of report the vertical text is not shown properly, but on paper it looks fine. Regards, Sonny Wibawa Adi Shruti [EMAIL PROTECTED] wrote: The thing which I need to do is to actually display one or two field values within a shape i.e a rectangle, the values are just like name and something similar. so what I want is that the field values within the shape get displayed vertically I hope u get wht I am trying to explain Regards:: Shruti Jain Euroinfo Systems Pvt. Ltd. C-126, Sector - 2 Noida - 201301 (U.P.) Phone :- +91-120-2520414 - Original Message - From: Girish Bhatkal To: development-axapta@yahoogroups.com Sent: Monday, January 31, 2005 6:26 PM Subject: RE: [development-axapta] Text on Report I am not sure if you want to display some texts or you want to display the records from the table ? If you are trying to display the records from the table with multiple lines then this way of arranging the fields will not help. Its like you want to display the records in the grid vertically. Just using standard reporting it might not be possible. I had earlier created a few such reports but with some workarounds. It also depends on how many lines you want to display, are there any fixed no of line or it can n nos of lines? If the no of records are fixed then it is possible, or create field dynamically. If there are fixed no of lines to be displayed then you need to have a table with those may fields and get the records populated so that even though it is displayed horizontally on the report, for the user the displayed records are as if they are printed vertically. Hope this will help you. Cheers, Girish -Original Message- From: Shruti [mailto:[EMAIL PROTECTED] Sent: 31 January 2005 12:23 To: development-axapta@yahoogroups.com Subject: Re: [development-axapta] Text on Report I've tried this out but it does not seem to work the way it should I want the text to get displayed in a vertical manner Any other suggestions will be highly appreciable. Regards:: Shruti Jain Euroinfo Systems Pvt. Ltd. C-126, Sector - 2 Noida - 201301 (U.P.) Phone :- +91-120-2520414 - Original Message - From: Sonny Wibawa Adi To: development-axapta@yahoogroups.com Sent: Monday, January 31, 2005 2:16 PM Subject: Re: [development-axapta] Text on Report Hi Shruti, There is an arrange method of a section in Axapta's design (form, web, report), so the design will arrange horizontally or vertically. Usually, this property is combined with Column property. For your case, change the ArrangeMethod property to Vertical in the body section, then for all controls in that body section, set the properties into these values: #LabelPosition Left #Left LeftEdge #Top Auto #LabelWidth Fixed width, for example: 20 char (optional) #Alignment Left (optional) That's it. Regards, Sonny Wibawa Adi Shruti [EMAIL PROTECTED] wrote
Re: [development-axapta] Text on Report
Hi Shruti, Please refer to technet.navision.com, discussion 48.4: this is a copied text from technet, by kjrgense, Denmark: One way to print a vertical text in a report It can be done by using the following approach: Make a pageHeader that has height 0.01 mm. (If it has height 0.00 mm it is not printed). Insert a stringControl in the pageHeader with width 1 Char and height e.g. 40 Char and left=Right edge. Set the font to a non proportional one (I used Courier). Set right margin for the other sections in the report to e.g. 1 cm (so they will not overlap the vertical text). In version 2.5 this works fine if the control in the pageHeader is a string control. To get a space in the vertical text insert a \n in the string. In version 2.1 the string must have a \n between each letter in the string, otherwise only the first letter in each word is printed. If you use a promptControl you might run into an 8 lines height limitation. When previewing this type of report the vertical text is not shown properly, but on paper it looks fine. Regards, Sonny Wibawa Adi Shruti [EMAIL PROTECTED] wrote: The thing which I need to do is to actually display one or two field values within a shape i.e a rectangle, the values are just like name and something similar. so what I want is that the field values within the shape get displayed vertically I hope u get wht I am trying to explain Regards:: Shruti Jain Euroinfo Systems Pvt. Ltd. C-126, Sector - 2 Noida - 201301 (U.P.) Phone :- +91-120-2520414 - Original Message - From: Girish Bhatkal To: development-axapta@yahoogroups.com Sent: Monday, January 31, 2005 6:26 PM Subject: RE: [development-axapta] Text on Report I am not sure if you want to display some texts or you want to display the records from the table ? If you are trying to display the records from the table with multiple lines then this way of arranging the fields will not help. Its like you want to display the records in the grid vertically. Just using standard reporting it might not be possible. I had earlier created a few such reports but with some workarounds. It also depends on how many lines you want to display, are there any fixed no of line or it can n nos of lines? If the no of records are fixed then it is possible, or create field dynamically. If there are fixed no of lines to be displayed then you need to have a table with those may fields and get the records populated so that even though it is displayed horizontally on the report, for the user the displayed records are as if they are printed vertically. Hope this will help you. Cheers, Girish -Original Message- From: Shruti [mailto:[EMAIL PROTECTED] Sent: 31 January 2005 12:23 To: development-axapta@yahoogroups.com Subject: Re: [development-axapta] Text on Report I've tried this out but it does not seem to work the way it should I want the text to get displayed in a vertical manner Any other suggestions will be highly appreciable. Regards:: Shruti Jain Euroinfo Systems Pvt. Ltd. C-126, Sector - 2 Noida - 201301 (U.P.) Phone :- +91-120-2520414 - Original Message - From: Sonny Wibawa Adi To: development-axapta@yahoogroups.com Sent: Monday, January 31, 2005 2:16 PM Subject: Re: [development-axapta] Text on Report Hi Shruti, There is an arrange method of a section in Axapta's design (form, web, report), so the design will arrange horizontally or vertically. Usually, this property is combined with Column property. For your case, change the ArrangeMethod property to Vertical in the body section, then for all controls in that body section, set the properties into these values: #LabelPosition Left #Left LeftEdge #Top Auto #LabelWidth Fixed width, for example: 20 char (optional) #Alignment Left (optional) That's it. Regards, Sonny Wibawa Adi Shruti [EMAIL PROTECTED] wrote: I had a query The data on report is displayed horizontally but I need to display text vertically on a report It will be appreciably great to have help in this regard. Regards:: Shruti Jain Euroinfo Systems Pvt. Ltd. C-126, Sector - 2 Noida - 201301 (U.P.) Phone :- +91-120-2520414 [Non-text portions of this message have been removed] - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' [Non-text portions of this message have been removed] -- Yahoo! Groups Links a.. To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ b.. To unsubscribe from this group, send an email to: [EMAIL
Re: [development-axapta] Text on Report
Hi Shruti, There is an arrange method of a section in Axapta's design (form, web, report), so the design will arrange horizontally or vertically. Usually, this property is combined with Column property. For your case, change the ArrangeMethod property to Vertical in the body section, then for all controls in that body section, set the properties into these values: #LabelPosition Left #Left LeftEdge #Top Auto #LabelWidth Fixed width, for example: 20 char (optional) #Alignment Left (optional) That's it. Regards, Sonny Wibawa Adi Shruti [EMAIL PROTECTED] wrote: I had a query The data on report is displayed horizontally but I need to display text vertically on a report It will be appreciably great to have help in this regard. Regards:: Shruti Jain Euroinfo Systems Pvt. Ltd. C-126, Sector - 2 Noida - 201301 (U.P.) Phone :- +91-120-2520414 [Non-text portions of this message have been removed] - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' [Non-text portions of this message have been removed] Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] X++ Language Question
Hi, Raal Goff, You have created a non-standard main method. In Axapta, main method should be declared with one parameter of Args (class) type. Change your code like this: //Static void main ()Static void main (args a) I don't think there is a documentaion on that. You should learn by experience, or just post your question into a discussion group like this mail group. :) Maybe, you can create a documentation with the title peculiarities of X++?. :) Regards, Sonny Wibawa Adi Raal Goff [EMAIL PROTECTED] wrote: Hi, I am trying to return a class from a method and assign the returned object to a local object in X++, something like this: Class aMethod(some parameter) { Class temp = new Class(parameter); return temp; } Static void main () { //..init the object and all that Class theClass; theClass= aClass.aMethod(parameter); } Axapta gives me an error saying that the operand types are not compatible with the operator. I don't get it, most other languages will let you do this just fine, and will simply assign the reference or pointer to 'theClass' What am I doing wrong? (its most probably something glaringly obvious, I know) Are there any books or references that I can look at that will give me info on the peculiarities of X++? Cheers, Raal Goff Software Developer NAS Insurance Brokers T 08 9480 8900 F 08 9481 1166 W www.nasinsurance.com.au - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Does anybody know how I can prevent a form from closing.
Hi, Myrl Stadnick, Override canClose method of that form, and call winAPI::minimizeWindow, when the form cannot be closed. This is the sample code, but require new checkBox control (named okToClose) with autoDeclare property is Yes: public boolean canClose() { boolean ret; ret = super(); if (okToClose.value() == NoYes::Yes) { ret = true; } else { ret = false; WinAPI::minimizeWindow(element.hWnd()); } return ret; } Regards, Sonny Wibawa Adi Myrl Stadnick [EMAIL PROTECTED] wrote: Does anybody know how I can prevent a form from closing but should minimize when the close button on the upper right is clicked? Regards, Myrl Stadnick - mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] NRI Electronics Inc. - IT Technologist Confidential Proprietary Information - For internal use only. [Non-text portions of this message have been removed] - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' [Non-text portions of this message have been removed] Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: RE : [development-axapta] Parsing Axapta Main menu tree
Hi, Stefan Osterburg, Run this job, then copy the result (in infolog) into clipboard and paste it into notepad and then save it into a text file. Open that file using excel using asterisks separator. Works done. static void SWAGetMenu(Args _args) { #AOT TreeNodemenu; TreeNodeIteratorit; str strTemp; int pos; void doIterator(int _prev,TreeNodeIterator _it) { TreeNoden; ; if (!_it) return; n = _it.next(); while (n) { strTemp = n.AOTgetProperties(); pos = strscan(strTemp, Label #,1,); if (pos) { info(strFmt(%1%2,strrep(*,_prev), new label().extractString( substr(strTemp,pos + 23,strscan(strTemp,' ',pos + 23,) - pos - 23)) )); } doIterator( _prev + 1 ,n.AOTiterator()); n = _it.next(); } } ; menu= infolog.findNode(#MenusPath); it = menu.AOTiterator(); doIterator(1,it); } Regards, Sonny Wibawa Adi Steeve Gilbert [EMAIL PROTECTED] wrote: I would use the TreeNode object (check in dev help) to traverse the MainMenu. But I don't know how to output to a text file but it shouldn't be that hard. Steeve... -Message d'origine- De : Stefan Osterburg [mailto:[EMAIL PROTECTED] Envoyé : 13 janvier 2005 08:45 À : development-axapta@yahoogroups.com Objet : [development-axapta] Parsing Axapta Main menu tree Hi all, I need to output the Axapta main menu structure to a file. Has anyone done this already? If not, what Axapta classes can I use to traverse and output the menu? Stefan Yahoo! Groups Links - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - You care about security. So do we. [Non-text portions of this message have been removed] Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: RE : [development-axapta] problems creating a complex with querybuild
Hi, Stefan Osterburg, You cannot create date value in dynamic range value in query object using queryValue(dtDate). I have tried before and trying to solve by finding it's pattern to generate date. The result is this formula: static int date2SQLint(TransDate _dtDate) { return (year(_dtDate) - 1900) + ((mthofyr(_dtDate) - 1) * 256) + ((dayofmth(_dtDate) - 1) * 65536); } So, the only thing you should do is change queryValue function with date2SQLint function. Try that. Regards, Sonny Wibawa Adi Stefan Osterburg [EMAIL PROTECTED] wrote: afaik this relation is automatically added by Axapta as a result of specifying the qBR2.relations(true); but I have also tried manually adding this with addLink with no change. Stefan Steeve Gilbert schrieb: The relation emplTable.EmplId==projvalEmplProjSetup.EmplId doesn't seem to be specified in the queryBuild form of the query. Is that supposed to be there or not? Steeve... -Message d'origine- De : Stefan Osterburg [mailto:[EMAIL PROTECTED] Envoyé : 10 janvier 2005 15:54 À : development-axapta@yahoogroups.com Objet : [development-axapta] problems creating a complex with querybuild Hi, I am trying to create a somewhat more complex query as a form datasource I want to get all records from EmplTable, that have neither have a corresponding record in projvalEmplProjSetup for a certain project (someprojid) nor records for other projects whose daterange includes a certain date (somedate). in Axapta-SQL the following expression does what I need: while select emplTable notexists join projvalEmplProjSetup where emplTable.EmplId==projvalEmplProjSetup.EmplId (projvalEmplProjSetup.Projid==someprojid || (projvalEmplProjSetup.myStartDate=somedate projvalEmplProjSetup.myEndDate=somedate)) I have not yet been able to get this working with the a querybuild object. The biggest problem is getting the OR/AND-conditions in the where expression to work. If have tried the following, but it does not give the correct results: q = new Query(); qBR1 = q.addDataSource(tablenum(EmplTable)); qBR2 = qBR1.addDataSource(tablenum(ProjValEmplProjSetup)); qBR2.relations(true); qBR2.joinMode(JoinMode::NotExistsJoin); range=qBR2.addRange(fieldnum(ProjValEmplProjSetup, projid)); range.value(strfmt(' %1) || ((%2.%3 = %5) (%2.%4 = %5)', someprojId, q.datasourceno(1).name(), fieldstr(ProjValEmplProjSetup, myStartDate), fieldstr(ProjValEmplProjSetup, myEndDate), queryvalue(somedate), fieldstr(ProjValEmplProjSetup, ProjId))); Can anyone help? Stefan - Do you Yahoo!? Yahoo! Mail - now with 250MB free storage. Learn more. [Non-text portions of this message have been removed] Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[development-axapta] Temporary Table cannot be set for security setup
Hi All, I tried to configure user security for calling some menus and allow user only to access limited tables. After a while, I configured for GL | Reports | Reconciliation | Inventory Report. I open security type for 'Main Menu', then configure view access for that report. The problem is, when I logged-in using the user with view access for that report, it showed: Unable to run InventLedgerConciliation due to access restriction in table TmpInventBalance. It seems that TmpInventBalance has 'InventTable' security key. But, when I try to open security setup for 'Security Key', I couldn't find Inventory management | Tables | 'Item posting' table (which is TmpInventBalance). When I debug the code, at SysSecurity class of expandSecurityKey method, Line 123, the method will check if the table is allowed or not for security setup. if (table.dataId == tableNum(TmpInventBalance)) //534 breakpoint; dictTable = new SysDictTable(table.dataId); if (!dictTable.allowSecuritySetup()) continue; At allowSecuritySetup method, it checks that if it is temporary table, then it won't shown. boolean allowSecuritySetup() { if (this.isTmp() || this.isMap() || this.isView() || this.id() == tableNum(AccessRightslist) || this.id() == tableNum(SysConfig) || !this.securityKeyId() || //If not, the table rights cannot be calculated if the user is a member of 1 group (this.configurationKeyId() !isConfigurationkeyEnabled(this.configurationKeyId( return false; return true; } So, what can I do to configure TmpInventBalance table security, then the user will be able to run the report ? Many thanks, Sonny Wibawa Adi - Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. Learn more. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] infolog and setprefix
Hi, Matt Benic, Axapta's infolog can use \t escape sequence to define absolute prefix of a message. For example: ; { info(test\tprefix 1\tinfo1); { info(test\tprefix 2\tinfo2); } } info(test\tinfo3); Regards, Sonny Wibawa Adi Matt Benic [EMAIL PROTECTED] wrote: Hi all, In the developer guide, under 'Using the infolog system', the paragraph about setprefix says 'When leaving a block, the heading is automatically set to the previous level.', however, when I run the following job: ; { setprefix(prefix 1); info(info1); { setprefix(prefix 2); info(info2); } } info(info3); 'info3' is printed at the same indent level as 'info2'. Does setprefix only work properly when the blocks are associated with loop structures or methods? Is there a way to force the prefixing back to a previous level without having to put my code in a seperate method? Regards, Matt Benic Axapta Developer UTi Sun Couriers Division The universal aptitude for ineptitude makes any human accomplishment an incredible miracle. - Col. John P. Stapp Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Dress up your holiday email, Hollywood style. Learn more. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] InventJournalCheckPost
Hi, Ibrahim Kilicarslan, Try this: JournalCheckPost journalCheckPost; ; ttsbegin; journalCheckPost = InventJournalCheckPost::newPostJournal(_inventJournalTable); //if (journalCheckPost.prompt()) //{ journalCheckPost.run(); //} ttscommit; uncomment the commented codes for displaying prompt dialog before posting. Regards, Sonny Wibawa Adi Ibrahim Kilicarslan [EMAIL PROTECTED] wrote: Hi, How can i post a journal from code without using form source with only journal table data. Thanks in advance. Yahoo! Groups Sponsor Get unlimited calls to U.S./Canada - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: SV: [development-axapta] Add a new field to a table from X++ code
Hi, Use AOTTableFieldList class to add dynamic type of field. Below are taken from axapta help of AOTTableFieldList. AOTTableFieldList tfl = infolog.findNode('\\Data Dictionary\\Tables\\TutorialJournalName\\Fields'); if (!tfl.AOTFindChild('NewEnum')) { tfl.addEnum('NewEnum'); // adds the field NewEnum } Regards, Sonny Wibawa Adi onnobid [EMAIL PROTECTED] wrote: Hi, please try this: static void Job39(Args _args) { str Props; TreeNode TN; AOTTableFieldList FList; str Field = NewField; str Table = AXUTab01; ; // Add a String Field FList = TreeNode::findNode(Data Dictionary\\Tables\\ + Table + \\Fields); FList.addString(Field); TN = TreeNode::findNode(Data Dictionary\\Tables\\ + Table ); TN.AOTcompile(); TN.AOTsave(); // Set Properties (e. g. Size) TN = TreeNode::findNode(Data Dictionary\\Tables\\ + Table + \\Fields\\ + Field); Props = TN.AOTgetProperties(); Props = SetProperty(Props, StringSize, 30); TN.AOTsetProperties(Props); TN = TreeNode::findNode(Data Dictionary\\Tables\\ + Table ); TN.AOTcompile(); TN.AOTsave(); pause; } Regards, Onno Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - You care about security. So do we. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor Get unlimited calls to U.S./Canada Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] Select statement and month
Hi ukmar, You may try to code the select statement something like this: dtDate = str2date(strFmt('1/%1/2004', intMonth), 123); select sum(amount) from myTable where myTable.TransDate = dtDate myTable.TransDate = endmth(dtDate); Regards, Sonny Wibawa Adi [EMAIL PROTECTED] wrote: I'm sorry but I'm asking if it is possible using X++ not using the dbms. Thanks SELECT MONTH(THEDATE), SUM(FIELD) FROM TABLE WHERE YEAR(THEDATE) = 2004 GROUP BY MONTH(THEDATE) Works in msSQL at least Pieter _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 24. november 2004 15:39 To: [EMAIL PROTECTED] Subject: [development-axapta] Select statement and month Is There a way in which I can made a select that select only the record that in a Date field have a specific month? select ct where MONTH(ct.myDate) = 2; The problem is how can I build a select that sum a currency from a table groupped by month? Thank you. Roberto Ukmar Indis S.p.A. Yahoo! Groups Sponsor ADVERTISEMENT click here http://us.ard.yahoo.com/SIG=129rd3q7a/M=298184.5639630.6699735.3001176/ D=groups/S=1705006764:HM/EXP=1101394267/A=2434971/R=0/SIG=11eeoolb0/*htt p:/www.netflix.com/Default?mqso=60185400 http://us.adserver.yahoo.com/l?M=298184.5639630.6699735.3001176/D=group s/S=:HM/A=2434971/rand=621297504 _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] be * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service http://docs.yahoo.com/info/terms/ . [Non-text portions of this message have been removed] Yahoo! Groups Links Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Temporary tables in form data source
Hi Jim, I have created a simple temporary table and a form that have that datasource. Mine is working fine. This is my code at form: public void run() { MyTmpTable _MyTmpTable; ; _MyTmpTable.clear(); _MyTmpTable.CustAccount = 'D2'; // this code must exists at CustTable.CustAccount _MyTmpTable.Name= 'a'; _MyTmpTable.insert(); _MyTmpTable.clear(); _MyTmpTable.CustAccount = 'D4'; _MyTmpTable.Name= 'avbvb'; _MyTmpTable.insert(); _MyTmpTable.clear(); _MyTmpTable.CustAccount = 'D00019'; _MyTmpTable.Name= 'dda'; _MyTmpTable.insert(); _MyTmpTable.clear(); _MyTmpTable.CustAccount = 'D00051'; _MyTmpTable.Name= 'asda'; _MyTmpTable.insert(); super(); MyTmpTable.setTmpData(_MyTmpTable); MyTmpTable_ds.executeQuery(); } My form has two datasources (MyTmpTable and CustTable) and CustTable is joined to MyTmpTable. I also attach my project for this example. Regards, Sonny Wibawa Adi Jim Dickie [EMAIL PROTECTED] wrote: Hello group, I'm trying to use a temporary table in a form data source and it doesn't seem to work. The data is generated ok, but if I try to sort or filter on it, it all seems to disappear again, also does not seem to be available for a join. Anyone had any experience with this? Also it doesn't seem possible to set a normal table als temporary in a data source. I had to create a temp. table specially for this purpose. Or am I missing something? Thank you for any hints, even if only to confirm it is not possible. Jim Yahoo! Groups Sponsor Get unlimited calls to U.S./Canada - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Meet the all-new My Yahoo! Try it today! [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ~-- Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM ~- Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [development-axapta] Selectionlist ffor ComboBox
Hi Manfred Ursprung, There is an example of using dynamic values in combobox. It's in Tools | Options..., there you can right click | Setup and see at tab Development, Startup project field. Part of code at lookupProject method is: controlStartupProject.clear(); controlStartupProject.add(@SYS26699); Perhaps you want to change the Combobox property ComboType to List. Regards, Sonny Wibawa Adi Amit Jain [EMAIL PROTECTED] wrote: Hi Manfred, I don't know why you want to use combo box for this. If you use some tmp table , you can achieve this very easily. I am writting a code, just a job which put the fields (with their properties) in a container. If you use the tmp table you can create a lookup method and set the performlookup to that table. Here is the code. I have taken the example of table SalesTable. You can send as parameters or use global variables to put this value on the fly. static void Job2(Args _args) { SysDictTable dictTable = new SysDictTable(TableNum(SalesTable)); SysDictField sysDictField; SysDictField field; int arraySize; int elements; int i, j; container pack; if (dictTable) { for (i = dictTable.fieldCnt(); i 0; i--) { sysDictField = new SysDictField(dictTable.id(), dictTable.fieldCnt2Id(i)); if (sysDictField) { arraySize = sysDictField.arraySize(); for(j = 1; j = arraySize; j++) { field = new SysDictField(dictTable.id(), dictTable.fieldCnt2Id(i), j); if ((field.baseType() != Types::CONTAINER) (field.name() != fieldStr(Common, dataAreaId)) (field.name() != fieldStr(Common, sequenceNum)) (field.name() != fieldStr(Common, tableId)) (field.baseType() != Types::VARSTRING)) { elements++; pack = conIns(pack, elements, [field.extendedFieldId(), field.arrayIndex(), field.label(), field.help(j), field.baseType(), (field.flags())]); } } } } } for(i = 1; i = conlen(pack); i++) { print conpeek(conpeek(pack,i),3); } pause; } Just return container pack, in case you are performing lookup. This way you can see the fields of all the tables. Regards Amit Jain Euroinfo Systems Pvt. Ltd, India smeagul2303 [EMAIL PROTECTED] wrote: Hi, I have a question regarding handling of ComboBox: By default I (or the System) chooses a Combox for displaying Enums. Another mechanism is to use lookup forms. But how do I fill Combobox with a list of choices which are not enums or informations comming from a table? In my special case I have a grid with a field where I select a table. In the next field I want the user to select a fieldname from this table. Therefore I want a combobox with a list of valid fieldnames. How do I fill comboBox with a fieldlist ? Regards Manfred Ursprung Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Sequence Number Duplicated
Hi, Roberto Pineda, I have encountered a similar problem. But, I don't know if the problem is the same with yours, because my problem will resulting a jumped number sequence, not duplicate number sequence. My problem is jumped number sequence when user tried to create a new record in two different ways. The first way is by pressing down arrow («) and the second way is by clicking new toolbar button or by pressing Ctrl+N key. The second way will result a jumped number sequence. This is the call stack from each way of creating new records: 1. Use Down Arrow and Set Datasource Property InsertAtEnd to YES (C) \Classes\JournalFormTrans\datasourceValidateWritePost - line 5 (C) \Forms\InventJournalMovement\Data Sources\InventJournalTrans\Methods\validateWrite - line 7 (C) \Classes\FormDataSource\Next (C) \Classes\FormRun\task (C) \Classes\SysSetupFormRun\task - line 20 2. USE New Button on Toolbar (C) \Classes\JournalFormTrans\datasourceValidateWritePost - line 5 (C) \Forms\InventJournalMovement\Data Sources\InventJournalTrans\Methods\validateWrite - line 7 (C) \Classes\FormRun\selectControl (C) \Classes\FormDataSource\create (C) \Forms\InventJournalMovement\Data Sources\InventJournalTrans\Methods\create - line 5 (C) \Classes\FormRun\task (C) \Classes\SysSetupFormRun\task - line 20 So, this is my solution: - Add a new condition at Create method of the datasource. void create(boolean append = false) { ; if (!MyTable.RecId) // issue about create new line in different orders. { MyTable_ds.research(); } //c super(append); //c } Regards, Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Delete that voucher list - set the the next number to higher that was used. I think this should help - as fa as I know this voucher problem hasn't been solved even in SP3...:( Darius Hello to all... Recently i have experienced a problem with the number sequence for vouchers. I entered a line in a journal and set up all data like taxes, the line entered is valid, so the next line voucher to add had to be next, but it was not working. I am using citrix to access the axapta server, i suppose it is a determining factor but not sure. I have checked the number sequence list, and sometimes it stores the voucher like it was free. Does someone know which could cause it? Thanks if the question is not understandable, let me know. Any help will be appreciated. Yahoo! Groups Links Yahoo! Groups Links - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ~-- $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/saFolB/TM ~- Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: RE : [development-axapta] No Editor after a new job is created
Hi, Bob, I didn't see your image, but.. try to re-arrange the windows. Use Alt + W, C (Cascade), or T (Tile). Regards, Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hi All, I have a very elementary question. I created a newJob but the editor window did not appear. My new Job is Hellojob and a screen print is shown below. I thought the Editor would display if a job, class or macro is created and then edited. Any help will be greatly appreciated as this has got. me stopped. Thanks in advice, Bob Bob Brinker Oakdene Group, Inc. 2625 Butterfield Rd. (Suite 212E) Oak Brook, IL 60523-1261 (630)368-1046 x/230 (630)368-1050 (Fax) [EMAIL PROTECTED] [Non-text portions of this message have been removed] Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Shop for Back-to-School deals on Yahoo! Shopping. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Re: Edit method problem in grid...
Akash, Doing fine here. Try to recompile the object and please check your modifications. Regards, Sonny Wibawa Adi akash malohatra [EMAIL PROTECTED] wrote: Hi, Thanks all for your help. But now when i am implimenting the below code (using the Map) , my axapta crashes when i run the forrm and click the Marktrans check box. this is the Crash log: Axapta Crash Dump File for Axapta build 1951.2410 (Aug 19 2003 19:44:15) Dumped : Mon Aug 02 12:34:13 2004 Crash : Exception 0xc005 caught (unspecified) in thread 0xc78 of process 0xa34. - --# FV EIP- RetAddr- FramePtr StackPtr Symbol 0 .V 0049cbf8 0049d4b4 0012e0f4 0012e0a4 Mod: ax32[ax32.exe], base: 0040h 1 .V 0049d4b4 0012e0a4 Mod: ax32[ax32.exe], base: 0040h Stackdump exit code 487 (Attempt to access invalid address) Any one has idea...why this happens Regards Akash --- Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Akash, You should store your checkbox value into a variable. Another solution is to create a new field at CommissionTrans table and then set SaveContents property to No. You now may override modified method at that new field. The first solution, you have to add a code, for example is like this: Classdeclaration: map oMark; Init: oMark = new map(types::Integer,types::Integer); edit NoYes markTrans(boolean set, CommissionTrans _commissionTrans, NoYes _markTrans) { if (set) { element.lock(); if (_markTrans == NoYes::Yes) { BalanceAmount += _CommissionTrans.AmountMST; } else { BalanceAmount -= _CommissionTrans.AmountMST; } element.unLock(); this.refresh(); oMark.insert(_commissionTrans.RecId,_markTrans); } else { if (oMark.exists(_commissionTrans.RecId)) { _markTrans = oMark.lookup(_commissionTrans.RecId); } } return _MarkTrans; } Regards, Sonny Wibawa Adi bmp_thydatacenter_dk [EMAIL PROTECTED] wrote: I think the problem is that the third parameter _markTrans only has a defined content if the first parameter is true. You should have a global variable in the classdeclaration of the form holding the current status of the checkbox. Only access and use the _markTrans parameter to read the new value in the field if the first parameter is true. Then you can tranfer the new value to you global variable, which is the one the method is returning. Best regards, Bjørn Møller Pedersen Thy Data Center Development A/S edit NoYes markTrans(boolean _set, CommissionTrans _commissionTrans, NoYes_markTrans) { if (set) { markTrans = _markTrans; element.lock(); if (_markTrans == NoYes::Yes) { balanceAmount += _CommissionTrans.AmountMST; } else { balanceAmount -= _CommissionTrans.AmountMST; } element.unLock(); this.refresh(); } return markTrans; } --- In [EMAIL PROTECTED], akash malohatra [EMAIL PROTECTED] wrote: Hi All, I have problem in implimenting this Edit method. When i am trying to click the check box. It never checks , still its editable...whats wrong in code edit NoYes markTrans(boolean set, CommissionTrans _commissionTrans, NoYes _markTrans) { if (set) { element.lock(); if (_markTrans == NoYes::Yes) { BalanceAmount += _CommissionTrans.AmountMST; } else { BalanceAmount -= _CommissionTrans.AmountMST; } element.unLock(); this.refresh(); } return _MarkTrans; } This method is in the Datasource of the form . and this is a checkbox in my grid. Thanks Akash - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ~-- Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM ~- Yahoo! Groups Links http://groups.yahoo.com/group/development-axapta/ [EMAIL PROTECTED] ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
Re: [development-axapta] Re: Edit method problem in grid...
Akash, You should store your checkbox value into a variable. Another solution is to create a new field at CommissionTrans table and then set SaveContents property to No. You now may override modified method at that new field. The first solution, you have to add a code, for example is like this: Classdeclaration: map oMark; Init: oMark = new map(types::Integer,types::Integer); edit NoYes markTrans(boolean set, CommissionTrans _commissionTrans, NoYes _markTrans) { if (set) { element.lock(); if (_markTrans == NoYes::Yes) { BalanceAmount += _CommissionTrans.AmountMST; } else { BalanceAmount -= _CommissionTrans.AmountMST; } element.unLock(); this.refresh(); oMark.insert(_commissionTrans.RecId,_markTrans); } else { if (oMark.exists(_commissionTrans.RecId)) { _markTrans = oMark.lookup(_commissionTrans.RecId); } } return _MarkTrans; } Regards, Sonny Wibawa Adi bmp_thydatacenter_dk [EMAIL PROTECTED] wrote: I think the problem is that the third parameter _markTrans only has a defined content if the first parameter is true. You should have a global variable in the classdeclaration of the form holding the current status of the checkbox. Only access and use the _markTrans parameter to read the new value in the field if the first parameter is true. Then you can tranfer the new value to you global variable, which is the one the method is returning. Best regards, Bjørn Møller Pedersen Thy Data Center Development A/S edit NoYes markTrans(boolean _set, CommissionTrans _commissionTrans, NoYes_markTrans) { if (set) { markTrans = _markTrans; element.lock(); if (_markTrans == NoYes::Yes) { balanceAmount += _CommissionTrans.AmountMST; } else { balanceAmount -= _CommissionTrans.AmountMST; } element.unLock(); this.refresh(); } return markTrans; } --- In [EMAIL PROTECTED], akash malohatra [EMAIL PROTECTED] wrote: Hi All, I have problem in implimenting this Edit method. When i am trying to click the check box. It never checks , still its editable...whats wrong in code edit NoYes markTrans(boolean set, CommissionTrans _commissionTrans, NoYes _markTrans) { if (set) { element.lock(); if (_markTrans == NoYes::Yes) { BalanceAmount += _CommissionTrans.AmountMST; } else { BalanceAmount -= _CommissionTrans.AmountMST; } element.unLock(); this.refresh(); } return _MarkTrans; } This method is in the Datasource of the form . and this is a checkbox in my grid. Thanks Akash - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ~-- Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM ~- Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [development-axapta] Set enumvalues by name
Hi Morten, #AOT str s; // ... ; s = infolog.findNode(#BaseEnumsPath + '\\SalesType\\' + 'Sales').AOTgetProperties(); salesTable.SalesType = str2int(substr(s,strscan(s,'#',strscan(s,'EnumValue ',1,) + 1,) + 1,)); The other solution : //salesTable.SalesType = X(salesType, 'Sales' ); salesTable.SalesType = runbuf(strFmt('SalesType a(){return SalesType::%1;}','Sales')); Regards, Sonny Wibawa Adi Morten Aasheim [EMAIL PROTECTED] wrote: Hi all! I want to set a table enum by using its name-value. Ex.: SalesTable salesTable; SalesType salesType; ; salesTable.SalesType = X(salesType, 'Sales' ); (X = Unknown function.. ) I've tried using the str2enum, but that just works if I use the labelname.. The reason why I want to do this is because of an import-job uses the name-values as the source values. Regards, Morten Aasheim Systemkonsulent _ [Non-text portions of this message have been removed] Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] (urgent) how to delete log file from SQL server 2000
Hi Cenk Ince, If your log file is not being used to trace any transaction into database, then you may use backup with truncate using the command backup log and then shrink the log file using dbcc shrink file command. The following script is to truncate all databases' log file. You can put the script in the job, but run it in cautious that you don't use the log file to trace any transaction or anything. use [master] declare cur cursor for select name from sysdatabases declare @dbname varchar(100) open cur fetch cur into @dbname while @@fetch_status = 0 begin exec ('use [' + @dbname + ']') exec ('backup log [' + @dbname + '] with truncate_only') exec ('dbcc shrinkfile (2,1,truncateonly)') fetch cur into @dbname end close cur deallocate cur Cheers, Sonny Wibawa Adi Cenk Ince [EMAIL PROTECTED] wrote: First i want to thank for all replies; But i couldn't solve problem, when i shrink db, the physical file size is not getting smaller. How can i get it smaller? Thanks in advance. Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Number Sequence Documentation Update
Hi, Kenny Pang, Here is my number sequence documentation. Hope this can be useful for you. Please check at the attachment. Regards, Sonny Wibawa Adi Kenny Pang [EMAIL PROTECTED] wrote: Hi Sonny, Appreciate if you can forward me the documentation Thanks in advance Pang --- Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hi All, Sorry, since this mailgroup doesn't support file attachment anymore. You may get the documentation by sending me an email directly, then I will send you the document. Sonny Wibawa Adi Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hi All, Several weeks ago I have posted a documentation for the use of number sequence and I would like to update the doc, as there is a little modification in SP3 for number sequence. Also, I would like to add some techniques of implementation if there are multiple fields that are using number sequence simultaniously in one form. Please check the example and updated doc at the attachment file. Regards, Sonny Wibawa Adi - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! [Non-text portions of this message have been removed] Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! [Non-text portions of this message have been removed] __ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[development-axapta] Number Sequence Documentation Update
Hi All, Several weeks ago I have posted a documentation for the use of number sequence and I would like to update the doc, as there is a little modification in SP3 for number sequence. Also, I would like to add some techniques of implementation if there are multiple fields that are using number sequence simultaniously in one form. Please check the example and updated doc at the attachment file. Regards, Sonny Wibawa Adi - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Number Sequence Documentation Update
Hi All, Sorry, since this mailgroup doesn't support file attachment anymore. You may get the documentation by sending me an email directly, then I will send you the document. Sonny Wibawa Adi Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hi All, Several weeks ago I have posted a documentation for the use of number sequence and I would like to update the doc, as there is a little modification in SP3 for number sequence. Also, I would like to add some techniques of implementation if there are multiple fields that are using number sequence simultaniously in one form. Please check the example and updated doc at the attachment file. Regards, Sonny Wibawa Adi - Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! [Non-text portions of this message have been removed] Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: RE : [development-axapta] Totals in Reports Axapta 3.0.
Julio Jiménez, The easiest way to make a total of your report, is you make a little modification in AutoDesignSpecs. If you have created generated design, then you have to create Sum control mannually. I will explain you the first way, that is the easiest way. First, you have to change the propery of the field controls or method controls you want to sum, for example is SalesLine_AmountMST control in Body:SalesLine. Change the property SumAll to Yes. Next, create a sort field in datasource, or use the existing sort fields. Change the property of sum field AutoHeader and AutoSum to Yes, for example SalesTable.SalesId sort field. This will create a header and subtotal of the changing of that field. If you don't want to use this feature, you can also show the grand total of your fields. Go to AutoDesignSpecs' property and change GrandTotal to Yes. Note, that the user still can change these properties by clicking Option button when print dialog shown, unless you generate a design specs from autogenerated design, the tab Option won't be shown. You can also learn how to create Sum control in the generated design, created by axapta. Regards, Sonny Wibawa Adi Steeve Gilbert [EMAIL PROTECTED] wrote: Try using Sum Control in footer section. Otherwise you'll have to go with some X++. Steeve... -Message d'origine- De : sting_xcr [mailto:[EMAIL PROTECTED] Envoyé : 1 juin 2004 15:21 À : [EMAIL PROTECTED] Objet : [development-axapta] Totals in Reports Axapta 3.0. I can not find any procedure for make reports with totals. Maybe my question is very basic, but any can help me. How I can do report with total and sub-total in Axapta 3.0 ? Best regards Julio Jiménez Yahoo! Groups Links Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ~-- Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM ~- Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [development-axapta] Accessing Excel from code
Hi Anil, I don't know why you choose to insert to InventTable table mannually in code. But, I have a sample of code for accessing Excel Table by code. Here is the steps you have to do: 1. Open the Excel file to edit it. - Block entire data of the excel you want to access them. - Give that block a name, by typing in text field the top left corner of the Excel editor (usually it's said B9 or A1 that shows the top left coordinate of your selected area). This will be used as the table name when doing a select query (for example, myTable). - Save the Excel file. 2. Create ODBC connection to that Excel file. - Start | Setting | Control Panel | Administrative Tools | Data Sources (ODBC). - Click Add.. and choose Driver do Microsoft Excel(*.xls) and click Finish. - Enter your datasource id (for example, myID). - Check your MS Office version and choose your Excel file by clicking Select Workbook.. button. 2. Create a job or a class. - Write these sample of codes: OdbcConnection C; Statement S; ResultSet R; LoginProperty LP = new LoginProperty(); LP.setDSN(myID); C = new OdbcConnection(LP); S = C.createStatement(); R = S.executeQuery(SELECT * FROM myTable); while (R.next()) { R.getString(1); } - Example above will get the first colum of the table and store it in a string type value. In my experience, you cannot call getType method in the same column number more than once and you cannot call with id number unsorted (ex: getString(2); getString(1) will get an error, must be 1 and then 2). 3. Run your code. I have other solution, by creating Excel object using COM object, so there are many ways to go to the same place, right? :) Cheers, Sonny Wibawa Adi Anil Ozay [EMAIL PROTECTED] wrote: Hi all.. When i import invent table records from excel through Data Import/Export i can't view my data from InventTable Form. But i can view it from table browser. So i can decide to access excel spreadsheet from code, and insert to invent table from code. How can i do this? Thanks.. Anil [Non-text portions of this message have been removed] Yahoo! Groups SponsorADVERTISEMENT - Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. - Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ADVERTISEMENT Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Open directory with AX codes
Hi Mikael, Try to change the code : winapi::shellExecute('explorer.exe ' + vItemName); become : winapi::shellExecute('explorer.exe ', vItemName); Cheers, Sonny Wibawa Adi Mikael_Dalgård [EMAIL PROTECTED] wrote: Hi all From DOS I can use this parameter to open a directory "explorer C:\dirname". Does anybody know how I can open a directory with Axapta codes. I have tried with this: void clicked(){ str vItemName; SMM_CustTable PrefTable; PrefTable = SMM_CustTable_DS.cursor(); if (PrefTable) { vItemName = ' ' + xinfo::directory(directoryType::Appl); vItemName = vItemName + 'SMMArchive\\' + PrefTable.SMM_ID; winapi::shellExecute('explorer.exe ' + vItemName); } super();} Best regards Mikael Dalgård Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: RE : [development-axapta] display method
Hi, Maybe, it's because the axapta compiler for X++ needs a display method to check the parameter syntax.Because, you cannot create a display method using a complex arguments. Hence, the control will not be able to use any method other than display method, because non-display method has not been checked for complex arguments. But I still a newbie, too in X++, so, maybe another arguments are better and acceptable. Regards, Sonny Wibawa AdiSteeve Gilbert [EMAIL PROTECTED] wrote: I can understand that, but why do I need to add the "display" keyword if I want to call the method from a control? If I don't put "display" then it won't compile the object because a control is calling a non"display" method. The message given is "Method getDateRange is not an edit/display method". Steeve... -Message d'origine-De: Girish Bhatkal [mailto:[EMAIL PROTECTED] Envoyé: 22 avril 2004 05:50À: [EMAIL PROTECTED]Objet: RE: [development-axapta] "display" method Hi Steeve, i feel that the use of display is mainly to reduce the unnecessary adding of fields in the table (and hence increase the database size) , say for example if one table is used in many forms/reports and we need one particular field (which could be got from any other table with reference) to be displayed in only one report/form then it is better to use the display to show that record. cheers, Girish -Original Message-From: Steeve Gilbert [mailto:[EMAIL PROTECTED]Sent: 21 April 2004 20:38To: [EMAIL PROTECTED]Subject: [development-axapta] "display" method Purely for my knowledge, what's the use of having to put "display" whenwe want a method to be called from a control? Does the "display"keyword enable some optimization?Regards,Steeve... Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] The never ending go to maintable thing...
Hi wolfgang, I don't think this is the right answer, but actually the solution below works well on me. :) This is a little bit dangerous, because you have to change the sys classes. Step 1. Add code in SysSetupFormRun Step 1.a. Add new boolean value (example: m_blnA) in classdeclaration of SysSetupFormRun { boolean m_blnA;#if.never Step 1.b. Add new method to pass parameter the boolean value above (example: A) boolean a(boolean p_blnA = m_blnA){ m_blnA = p_blnA; return m_blnA;} Step 1.c. Add a codein method task in SysSetupFormRun int ret; ; //starts from here if (_p1 == 293) // goto main table code {this.a(true); } // ends here if (_p1 == #taskFilter) Step 2. Add codes in method run of the form you want to check whether it is called from 'Go to the main table' context menu or not. void run(){ object o; ; super(); try { o = element.args().caller(); if (o != null) { if (strscan(o.toString(),' FormRun(',1,) 0) { //info(o.toString()); if (o.a()) { info('from goto main table'); // You can change the code here.. o.a(false); //set it to false again } } } } catch (Exception::Error) { } //...} Hope this sample of solution is helpful.If it is very urgent, you can use the code above. :) Be cautious: I still don't try if the form was run without the use of SysSetupFormRun, because it is inherited from FormRun itself and FormRun is a sys-layered class. If the form doesn't inherited from SysSetupFormRun, it will not have method a() and an error will be raised. Regards, Sonny Wibawa Adi -Original Message-Put this code in the init method of your form and call it from different places and see what you get, it should help you get moving with this. Note: If the form object is being called from a class like salesEdit lines, then this will always point to a class, and you actually have to attack the class to find where it is being called from. -Preston //-code if(! element.args().caller()) info('No Caller'); else info(element.args().caller().toString()); //Code -Original Message-From: Groß [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 7:28 AMTo: [EMAIL PROTECTED]Subject: AW: [development-axapta] The never ending "go to maintable" thing... hi sonny, thank's for replay, good idea - but: the mentioned form (in my case: smmQuotationTable) will be called from other places in the applicationbythe same menuitem. so I can't distinguish if the form was called by the "go to maintable" function or not anybody else a hint...? regards wolfgang -Ursprüngliche Nachricht-----Von: Sonny Wibawa Adi [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 8. April 2004 07:34An: [EMAIL PROTECTED]Betreff: Re: [development-axapta] The never ending "go to maintable" thing... Hi wolfgang, For default, axapta will call a menu item that having the same name with the table name. For example, you can check the menutemname caller using args object. void init() { if (element.args.menuItemName() != null element.args.menuItemName() ==menustr(InventTable)) { // here is your code.. } } PS: you may want to check too that the menuitemtype is a menu item display. Regards, Sonny Wibawa Adi wohegro [EMAIL PROTECTED] wrote: hi there,does anybody know if it's possible to indicate in an opened form, if the form was called by an "go to maintable" jump ?thank's in advanceregards to allwolfgang Do you Yahoo!?Yahoo! Small Business $15K Web Design Giveaway - Enter today Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway - Enter today Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] The never ending go to maintable thing...
Sorry,I missedto add a step for initial value in init method of SysSetupFormRun. For making sure the initial value is false, because I don't know the initial value in axapta. I have an experience that an uninitialized string value can crash your axapta when you do += operation and then close the form in a form. :) Anyway, this is the additional step. Step 1.d. Add a codein methodinit in SysSetupFormRun SysSecurityFormSetup::loadSecurity(this); m_blnA = false;} Regards, Sonny Wibawa Adi Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hi wolfgang, I don't think this is the right answer, but actually the solution below works well on me. :) This is a little bit dangerous, because you have to change the sys classes. Step 1. Add code in SysSetupFormRun Step 1.a. Add new boolean value (example: m_blnA) in classdeclaration of SysSetupFormRun { boolean m_blnA;#if.never Step 1.b. Add new method to pass parameter the boolean value above (example: A) boolean a(boolean p_blnA = m_blnA){ m_blnA = p_blnA; return m_blnA;} Step 1.c. Add a codein method task in SysSetupFormRun int ret; ; //starts from here if (_p1 == 293) // goto main table code {this.a(true); } // ends here if (_p1 == #taskFilter) Step 2. Add codes in method run of the form you want to check whether it is called from 'Go to the main table' context menu or not. void run(){ object o; ; super(); try { o = element.args().caller(); if (o != null) { if (strscan(o.toString(),' FormRun(',1,) 0) { //info(o.toString()); if (o.a()) { info('from goto main table'); // You can change the code here.. o.a(false); //set it to false again } } } } catch (Exception::Error) { } //...} Hope this sample of solution is helpful.If it is very urgent, you can use the code above. :) Be cautious: I still don't try if the form was run without the use of SysSetupFormRun, because it is inherited from FormRun itself and FormRun is a sys-layered class. If the form doesn't inherited from SysSetupFormRun, it will not have method a() and an error will be raised. Regards, Sonny Wibawa Adi -Original Message-Put this code in the init method of your form and call it from different places and see what you get, it should help you get moving with this. Note: If the form object is being called from a class like salesEdit lines, then this will always point to a class, and you actually have to attack the class to find where it is being called from. -Preston //-code if(! element.args().caller()) info('No Caller'); else info(element.args().caller().toString()); //Code -Original Message-From: Groß [mailto:[EMAIL PROTECTED] Sent: Thursday, April 08, 2004 7:28 AMTo: [EMAIL PROTECTED]Subject: AW: [development-axapta] The never ending "go to maintable" thing... hi sonny, thank's for replay, good idea - but: the mentioned form (in my case: smmQuotationTable) will be called from other places in the applicationbythe same menuitem. so I can't distinguish if the form was called by the "go to maintable" function or not anybody else a hint...? regards wolfgang -Ursprüngliche Nachricht-----Von: Sonny Wibawa Adi [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 8. April 2004 07:34An: [EMAIL PROTECTED]Betreff: Re: [development-axapta] The never ending "go to maintable" thing... Hi wolfgang, For default, axapta will call a menu item that having the same name with the table name. For example, you can check the menutemname caller using args object. void init() { if (element.args.menuItemName() != null element.args.menuItemName() ==menustr(InventTable)) { // here is your code.. } } PS: you may want to check too that the menuitemtype is a menu item display. Regards, Sonny Wibawa Adi wohegro [EMAIL PROTECTED] wrote: hi there,does anybody know if it's possible to indicate in an opened form, if the form was called by an "go to maintable" jump ?thank's in advanceregards to allwolfgang Do you Yahoo!?Yahoo! Small Business $15K Web Design Giveaway - Enter today Do you Yahoo!? Yahoo! Small Business $15K Web Design Giveaway - Enter today Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] want to understand how to create a record in the table (SQL) by writti
Hi Girish Bhatkal, Doesyour clientbuy theCOM license? If yes, then you can use COM Connector in Axapta (AxCom.dll). It can call a job, call a static method, even create Axapta Object to be used in other applications, such as VB, VC++, .NET app. So, one of the solution is you can create a listener type object using windows service application, to read any event driven then call COM, or you can directly call via COM in your application. I recently send email with attachment of a sample of COM connector to Axapta in VC++ and VB.NET. You can refer to the help, too. Regards, Sonny Wibawa Adi Girish Bhatkal [EMAIL PROTECTED] wrote: Hi Jesper, thanks for the reply. the problem in this solution is that axapta is event driven and we have to run a job to import the data from the new table (created by external software). But the requirement is that as soon as the request is entered by Filemaker axapta has to pick the same. we need the same for some other functions also (to import /update the records created by file maker). if this has to work then there should be something which could triger the job (from Filemaker) which could then run the job of importing the records. If there are any work arounds in your knowledge which could help to solve this problem please do let me know. thanks again. cheers, Girish -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]Sent: 03 March 2004 16:49To: [EMAIL PROTECTED]Subject: Re: [development-axapta] want to understand how to create a record in the table (SQL) by writtiHi Girish,I do not like external software writing in the Axapta tables. The reasons for that you describe yourself (problems with Recid).Whar I like to do on integrations is to create an table that Axapta cann't se. (Other User, and/or other Database). I then use the ODBC class to access this table and pull the data into Axapta. Using Axapta to pull the Data solves the problem with Recid, gives you controle over tha datavalidation within Axapta. Try something like this: LoginProperty lp; OdbcConnection _odbc; Statement _sql; ResultSet _records; ; lp = new LoginProperty(); lp.setDatabase('MyDB'); lp.setDSN('MyDNS'); lp.setUsername('MyUser'); lp.setPassword('MyPassword'); try { _odbc = new ODBCConnection(lp); } catch { info("Not loged in."); } _sql = _odbc.createStatement(); _records = _sql.executeQuery('SELECT ItemId, Qty FROM ExchengeTable'); while (_records.next()) { print _records.getString(1); print _records.getReal(2); }/Jesper Original Message Subject: [development-axapta] want to understand how to create a record in the table (SQL) by writting p (03-Mrz-2004 17:29)From: [EMAIL PROTECTED]To: [EMAIL PROTECTED] Hi Guys, our client was earlier using a different application (File maker) before we went live with axapta. some part of the business process is still done on the earlier application which we intend to slowly move to axapta. our client is in computer repair business and the users are still using the old system to request for Items. we could manage to insert the request directly in the SQL table and axapta pickedup the records from that table. 1. This application has to run a sequence to update the recId field in the table (which some times gives duplicates and the request is lost). is it in some way possible to write some code in SQL table itself to populate the recId. 2. also is there any code which could be written on this table (with 3 fields : Item, Qty requested). At start the first record would have just the ItemId populated and when the Filmaker updates the record with the Qty (quantity) field. Now at this stage is it possible that when the Qty field is updated some code on the sql table would automatically create a new record with the same Item but Qty field blank so that the Filemaker would require only to populate the Qty field. i would appreciate if anyone would let me know if we can achieve this and how to run the code if we can achieve. i don't have much knowledge of running the codes on SQL directly. thanks in advance. cheers, Girish Yahoo! Groups Links To: [EMAIL PROTECTED] Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] Re: Using Axapta Business Connector
Hi all, In case you want to do it in VC++.NET or VB.NET, I attach the sample source code. cheers, Sonny Wibawa AdiHlavnièka_Karel [EMAIL PROTECTED] wrote: There are samples on installation CD as well (in setup\development) regard Karel -Original Message-From: Harish Mohanbabu [mailto:[EMAIL PROTECTED] Sent: Thursday, February 26, 2004 10:23 AMTo: [EMAIL PROTECTED]Subject: [development-axapta] Re: Using Axapta Business ConnectorHi Steeve,Have you looked in to Developer's guide? There are some code examples of Axapta BC from VB and ASP.Regards,Harish Mohanbabu--- In [EMAIL PROTECTED], "Steeve Gilbert" [EMAIL PROTECTED] wrote: Hi All! We are thinking about developing a new application that will speak to Axapta thru the Axapta Business Connector. We do that to optimize the interface to be able to use it efficiently on portable device. I think about using VB or VC#. Do you have any tips, suggestions or place to look for samples of code in VB or VC# using Axapta Business Connector? Regards, Steeve... Do you Yahoo!? Yahoo! Search - Find what youre looking for faster. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. attachment: AxComUse.zip
RE: [development-axapta] Error messages while opening a class
Hi, The error occured,because you have made modifications at: #DEFINE.CurrentVersion(1) #LOCALMACRO.CurrentList mname yrname #ENDMACROIf you want to change that, but somebody has run the class once, then you have to change the version number to other number. If you try to delete table SysLastValue, then it's okay, but the version number will be unused. The error message comes from this: When axapta runs the packable class, it call unpack method first to get the last saved value for that class. Afterthe running code is done,then method pack will be called to store to a container data type. That containerisstored in sysLastValue table. If particular userid has run the class, then the class has called pack method.After that if you change the type or the total element of #LOCALMACRO.CurrentList, then when that user try torun the class again, the code will try to unpack different data type or trying to store container with a different total elementin container. Thus, the error message will say 'Bad container'. I think it's a little bit confusing, but maybe you will understand after see the code of SysPackable class: public container pack(){#if.never return [#CurrentVersion,#CurrentList];#endif} public boolean unpack(container packedClass){#if.never int version = runbase::getVersion(packedClass); switch (version) { case #CurrentVersion: [version,#CurrentList] = packedClass; return true; default : return false; } return false;#endif} Cheers, Sonny Wibawa Adiabinsam [EMAIL PROTECTED] wrote: hi, Did you try to open the class in different systems ? We has a same kinda error some time back !. Yes deleting the syslastvalue some times help it ! did you try that ?? Aks -Original Message-From: Deshpande, Harry [mailto:[EMAIL PROTECTED]Sent: Thursday, February 19, 2004 9:52 AMTo: '[EMAIL PROTECTED]'Subject: RE: [development-axapta] Error messages while opening a class hi since the error refers to a container, there may be a problem with syslastvalue. Did u try deleting the record in syslastvalue or change version no of the report? regards harry -Original Message-From: panda arabinda [mailto:[EMAIL PROTECTED]Sent: Thursday, February 19, 2004 2:40 PMTo: [EMAIL PROTECTED]Subject: [development-axapta] Error messages while opening a classDear Friends,I have created the class PurchaseOrderStatusReport forrunning a report which takes the input of month and year .previously it was running fine and openingbut after few days when i open the class its not opening and give the error Message (23:53:42)Bad container.Object 'ReportRun' could not be createdBut a5t the same time the other classes similar tothis type of class works fine.There is no compilation error in this running finewhen i first created but i dont know what happen to the system and why its not opening now the source codefor this is as follows.public class PurchaseOrderStatusReport extendsRunBaseReport{MonthsOfYear mname; Yr yrname; DialogField dfmonth; DialogField dfyear; #DEFINE.CurrentVersion(1) #LOCALMACRO.CurrentList mname yrname #ENDMACRO}//Object Dialog(){ DialogRunbase dialog = super(); dfmonth =dialog.addFieldValue(typeid(MonthsOfYear),mname,"Month","Month"); dfyear =dialog.addFieldValue(typeid(Yr),yrname,"Year","Year"); return dialog;}/public boolean getFromDialog(){ boolean ret; ret = super(); mname = dfmonth.value(); yrname = dfyear.value(); return ret;}public identifiername lastValueElementName(){return reportStr(EquipmentPurchaseOrderStatusReport);}///MonthsOfYear parmMonthName(MonthsOfYear _mName =mname){ ; mname = _mName; return mname;}//Yr parmYear(Yr _yrName = yrname){ ; yrname = _YrName; return yrname;}///static void main(Args args){PurchaseOrderStatusReport purchaseOrderStatusReport;;purchaseOrderStatusReport = newPurchaseOrderStatusReport(); if(purchaseOrderStatusReport.prompt()) { purchaseOrderStatusReport.run(); }}///In this code there is no compilation error but on therun time its not opening and shows the above messages.I am not able to find out the reason of thisproblem.If anybody has any suggestion/solution then kindlyhelp me.Thanks in AdvanceRegards, Arabinda.__Do you Yahoo!?Yahoo! Mail SpamGuard - Read only the mail you want.http://antispam.yahoo.com/tools Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Validating web user password
Hi Ernestas Daraska, Maybe you try this sample of code: Boolean checkPassword(str p_strUserId,str p_strEncodedPassword) { Dictionary a = new Dictionary(); ; return (p_strUserId == 'ED' a.buildPassword('123',p_strUserId) == p_strEncodedPassword));} which '123' is the correct password for userid 'ED'. Cheers, Sonny Wibawa Adi Ernestas Daraska [EMAIL PROTECTED] wrote: Hello,I was wondering how i could validate web user password. As you know, all webuser passwords are encoded, using Dictionary.buildPassword function. Thequestion is, how could i manually validate normal password to its encodedform?Thank youErnest Yahoo! Groups Sponsor -~--Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or LexmarkPrinter at MyInks.com. Free s/h on orders $50 or more to the US Canada.http://www.c1tracking.com/l.asp?cid=5511http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/saFolB/TM-~-Yahoo! Groups Links* To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/* To unsubscribe from this group, send an email to:[EMAIL PROTECTED]* Your use of Yahoo! Groups is subject to:http://docs.yahoo.com/info/terms/ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: SV: [development-axapta] Index Index Hint - Oracle / MSSQL
Hi For SQL Server, I have a way to check what exactly Axapta application do when we use Index and Index hint. Just run Profiler, use host filter with value of your computer name, check what is the command toSQL Server. I have tried Index command, Axapta convert it toORDER BYSQL command.When I tried Index hint, Axapta convert it to sp_execute command, using ID and I still don't understand the exact command is. So, when Svein tried to explain: Running MSSQL 7.0 the use of index worked fine in a specific select statement. After the upgrade this specific select statement seemed to take forever to execute. Axapta Index command will be converted into ORDER BY in SQL, so, that is the reason why the statement seemed to take forever to execute. :) Cheers, Sonny Wibawa AdiSvein Tore Hanssen [EMAIL PROTECTED] wrote: Hi I have made an observation regarding the use of index and index hint in the Axapta application of one of our customers. Axapta 2.5 MP3SP3 and MS SQL. The customerupgraded to a new version of the MSSQL. (Upgrading from MSSQL Server 7.0 to MSSQL Server 2000) Running MSSQL 7.0 the use of index worked fine in a specific select statement. After the upgrade this specific select statement seemed to take forever to execute. Changing to index hint made the select statement run quickly like it used to on MSSQL 7.0. Also simply removing the use of index/index hint made it run quickly. Seems to me that in this case itmatterswhat MSSQL version is running Axapta. Regards Svein T. Hansen Fra: HEW (Mag. Helmut Wimmer) [mailto:[EMAIL PROTECTED] Sendt: 11. februar 2004 11:24Til: '[EMAIL PROTECTED]'Emne: RE: [development-axapta] Index Index Hint - Oracle / MSSQL HiYou are right. "Index" and "Index hint" will produce a simple "index"statement when you are using MSSQL. There is no difference between the twothen. For Oracle, it's another story.BTW: Sometimes it is better not to assign an "index" command at all. Let theMSSQL figure out the best index. Normally it will find the best one. (That'sa thing somebody told me that was part of the programming team of MSSQL 2Kserver).-Ursprüngliche Nachricht-Von: Rudi Hansen [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 06. Februar 2004 15:02An: [EMAIL PROTECTED]Betreff: [development-axapta] Index Index Hint - Oracle / MSSQLHow is it with the index index hint options.It it correct that index hint is the same as index on MSSQL but on Oracleindex hint is really a hint? Yahoo! Groups Sponsor -~-- BuyInk Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printerat MyInks.com. Free s/h on orders $50 or more to the US Canada.http://www.c1tracking.com/l.asp?cid=5511http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/saFolB/TM-~-Yahoo! Groups Links Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. Yahoo! Groups Sponsor ADVERTISEMENT Click Here Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[development-axapta] Re: Creating new numbersequences
Hi, Recently I've done created a documentation of number sequence reference creation. You might get this as a useful stuff.Some people asking about converting using Num2Text and I saw that method doesn't convert decimals in real numbers, I add that too in this doc. I see if this mailgroup can attach file, if it is not, tell me howor you can send me email for thedoc. Have a nice day. Sonny Wibawa Adi --- In [EMAIL PROTECTED], "ernstmeijer1974" [EMAIL PROTECTED]... wrote: Hi, I created a couple of new tables and now i want to set up some new numbersequences to go with it. but... how do i do that? Other thing. How do i create an autonumber field. Cheers, Ernst meijer Do you Yahoo!? Yahoo! Finance: Get your refund fast by filing online Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. attachment: New_Number_Sequence_Step_by_Step_in_Axapta.zip
Re: [development-axapta] CustTrans and taxtrans relation
Go to AOT, and then to Table TaxTrans, check the relations, Find CustTrans Table, there should be: TaxTrans.TransDate == CustTrans.TransDate TaxTrans.Voucher == CustTrans.Voucher Sonny Wibawa Adi Cenk Ince [EMAIL PROTECTED] wrote: Hi;When i create a journal from \General Ledger\Journals\Journal Entry andcreate two lines for it and post it, in custtrans and taxtrans there aretwo lines in both tables. But i can't find the relation which is relatedwhich.Thanks in advance. Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! Yahoo! Groups Links To visit your group on the web, go to:http://groups.yahoo.com/group/development-axapta/ To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Printing Invoice Line Problem
Hi Julio, Try to edit the report and change the TopMargin and BottomMargin properties to zero of the Body at the SectionGroup related to the Table. Regards, Sonny Wibawa Adi Julio Jimenez [EMAIL PROTECTED] wrote: Hi All 1 When I print invoice with more than one line , I obtain this result: Example A Item Id Qty Descripcion Price 1225 1Product A50 1226 1Product B75 1227 1Product C100 But I dont need any space in middle of the lines I need the print lines like this Item Id Qty Descripcion Price 1225 1Product A50 1226 1Product B75 1227 1Product C100 Which property I must change for obtain this result? Thanks Julio ___ Yahoo! Messenger - Nueva versin GRATIS Super Webcam, voz, caritas animadas, y ms... http://messenger.yahoo.es Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? The New Yahoo! Shopping - with improved product search Yahoo! Groups Sponsor ADVERTISEMENT click here Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[development-axapta] Re: catching resultset of a query before printing report...
Rich, Maybe you should check the relations between InventTable and InventDim or InventSum at DataSource of the report. It should have between ItemId of InventTable and ItemId of InventDim or InventSum. Rgrs, Sonny Wibawa Adi Hi, here is my code: public boolean fetch() { boolean ret; InventDim iDim; InventSum iSum; InventTable inv; QueryRun LocalQuery = new QueryRun(this); ret=true; LocalQuery.setRecord(iDim); LocalQuery.setRecord(isum); LocalQuery.setRecord(inv); if (LocalQuery.next()) { iDim=LocalQuery.get(tablenum(InventDim)); iSum=LocalQuery.get(tablenum(InventSum)); inv=LocalQuery.get(tablenum(InventTable)); LocalQuery.reset(); while (LocalQuery.next()) { info(iDim.InventLocationId + ' test: ' + iDim.wMSLocationId); info(isum.ItemId + ' test1: ' + isum.InventDimId); info(inv.ItemId + ' test2: ' + inv.ItemName); } } return ret; } For some reason the values for the inv table never return (test2 info line never has any values). Any idea what I am doing wrong? Thanks, Rich _ Do you Yahoo!? The New Yahoo! Shopping - with improved product search Yahoo! Groups Sponsor ADVERTISEMENT click here Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[development-axapta] how to get current user info
Hi all, I am a newbie and I do some scripting for checking the security group for current user logged on. The question is: Can I know the current userGroupId (admin, etc.) and current company (DAT, etc.)? Thx, Sonny Wibawa Adi _ Do you Yahoo!? Exclusive Video Premiere - Britney Spears Yahoo! Groups Sponsor ADVERTISEMENT click here Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: AW: [development-axapta] how to get current user info
Thank you, I searched at class UserInfoHelp | getUsersInUserGroup and I create this line of code at Job: UserGroupList userGroupList; UserGroupInfo userGroupInfo; UserInfouserInfo; ; select userGroupList where userGroupList.userId == curuserid(); select userGroupInfo where userGroupInfo.id == userGroupList.groupId; box::info(userGroupList.groupId + ' ' + userGroupInfo.name); So it works. :) Sonny Wibawa Adi Mister L [EMAIL PROTECTED] wrote: Current company: curext() Current user: curuserid() Current usergroup: (???) Take a look into the tables... best regards Herbert -Ursprngliche Nachricht- Von: Sonny Wibawa Adi [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 28. Oktober 2003 09:01 An: [EMAIL PROTECTED] Betreff: [development-axapta] how to get current user info Hi all, I am a newbie and I do some scripting for checking the security group for current user logged on. The question is: Can I know the current userGroupId (admin, etc.) and current company (DAT, etc.)? Thx, Sonny Wibawa Adi _ Do you Yahoo!? Exclusive Video Premiere - Britney Spears Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Exclusive Video Premiere - Britney Spears Yahoo! Groups Sponsor ADVERTISEMENT click here Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] Problem with Exel import again
Hi All, I have encountered the same problem with the error: Error executing code: SysDictType object not initialized. Stack trace: \Classes\SysDictType\baseType \Classes\SysExcelTemplateWizard\formatType - line 11 \Classes\SysExcelTemplateWizard\formatColumns - line 34 \Classes\SysExcelTemplateWizard\createTemplate - line 17 \Classes\SysExcelTemplateWizard\run - line 21 \Classes\SysExcelTemplateWizard\main - line 11 After I debugged the classes and check the codes, it's because there is a field in the table I tried to create the template, that doesn't have an extended type. the codes try to check what is the base type of the extended code but there is no extended code (it is saved in object SysDictType). So the object is accessed when the object is not constructed. My solution is to change my Table (that time I used my own created table, different solution if you try to create template for reserved table), so all fields have extended type. Regards, Sonny Wibawa Adi Harry [EMAIL PROTECTED] wrote: hi Are u getting this error for some specific fields? If yes then what is the extended data type for such field? regards harry deshpande -Original Message- From: Jonathan St-Louis [mailto:[EMAIL PROTECTED] Sent: Tuesday, 28 October 2003 2:22 a.m. To: [EMAIL PROTECTED] Subject: Re: [development-axapta] Problem with Exel import again Thanks, but it didn't solve my problem. I always got the same error. But the first problem appear someday. But usualy it worked. Now, even with SP2 installed it didn't work. Can it be a garbage data? Like when the fields in a form are displayed incorrectly and you must delete something in Tools -- Development Tools -- Application objects -- Usage Data? Someone have any idea? - Original Message - From: Dirk Tollenaere To: [EMAIL PROTECTED] Sent: Friday, October 24, 2003 1:40 PM Subject: RE: [development-axapta] Problem with Exel import again Hello John, I had the same problem. The problem occurs when I' ve selected the option to create a definition group. I solved the problem by not creating a definition group. The created Excel sheets are saved as a CSV-files. For the csv file I create a definition group. Good luck Dirk Van: johnn_16 [mailto:[EMAIL PROTECTED] Verzonden: vr 24-10-2003 19:13 Aan: [EMAIL PROTECTED] Onderwerp: [development-axapta] Problem with Exel import again Hi, I want to import data by exel. So I use the Template Wizard in Exel Spreadsheets. I had a problem that was supose to be corrected with SP2. Unfortunatly, the problem isn't fix with SP2 but I got a different error msg. The error occur only with some of my personnal tables. Before SP2, my newest created tables always get that error: Error executing code: SysDictType object not initialized. Stack trace: \Classes\SysDictType\baseType \Classes\SysExcelTemplateWizard\formatType - line 11 \Classes\SysExcelTemplateWizard\formatColumns - line 34 \Classes\SysExcelTemplateWizard\createTemplate - line 17 \Classes\SysExcelTemplateWizard\run - line 21 \Classes\SysExcelTemplateWizard\main - line 11 Since SP2 installation, I got this error msg. Error executing code: DictEnum object not initialized. Stack trace: \Classes\DictEnum\label \Classes\SysExcelTemplateWizard\formatCell - line 22 \Classes\SysExcelTemplateWizard\formatType - line 21 \Classes\SysExcelTemplateWizard\formatColumns - line 37 \Classes\SysExcelTemplateWizard\createTemplate - line 17 \Classes\SysExcelTemplateWizard\run - line 21 \Classes\SysExcelTemplateWizard\main - line 11 Anyone know why? Thanks! Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Exclusive Video Premiere - Britney Spears Yahoo! Groups Sponsor ADVERTISEMENT click here Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Problem with Exel import again
Hi All, I have encountered the same problem with the error: Error executing code: SysDictType object not initialized. Stack trace: \Classes\SysDictType\baseType \Classes\SysExcelTemplateWizard\formatType - line 11 \Classes\SysExcelTemplateWizard\formatColumns - line 34 \Classes\SysExcelTemplateWizard\createTemplate - line 17 \Classes\SysExcelTemplateWizard\run - line 21 \Classes\SysExcelTemplateWizard\main - line 11 After I debugged the classes and check the codes, it's because there is a field in the table I tried to create the template, that doesn't have an extended type. the codes try to check what is the base type of the extended code but there is no extended code (it is saved in object SysDictType). So the object is accessed when the object is not constructed. My solution is to change my Table (that time I used my own created table, different solution if you try to create template for reserved table), so all fields have extended type. Regards, Sonny Wibawa Adi Harry [EMAIL PROTECTED] wrote: hi Are u getting this error for some specific fields? If yes then what is the extended data type for such field? regards harry deshpande -Original Message- From: Jonathan St-Louis [mailto:[EMAIL PROTECTED] Sent: Tuesday, 28 October 2003 2:22 a.m. To: [EMAIL PROTECTED] Subject: Re: [development-axapta] Problem with Exel import again Thanks, but it didn't solve my problem. I always got the same error. But the first problem appear someday. But usualy it worked. Now, even with SP2 installed it didn't work. Can it be a garbage data? Like when the fields in a form are displayed incorrectly and you must delete something in Tools -- Development Tools -- Application objects -- Usage Data? Someone have any idea? - Original Message - From: Dirk Tollenaere To: [EMAIL PROTECTED] Sent: Friday, October 24, 2003 1:40 PM Subject: RE: [development-axapta] Problem with Exel import again Hello John, I had the same problem. The problem occurs when I' ve selected the option to create a definition group. I solved the problem by not creating a definition group. The created Excel sheets are saved as a CSV-files. For the csv file I create a definition group. Good luck Dirk Van: johnn_16 [mailto:[EMAIL PROTECTED] Verzonden: vr 24-10-2003 19:13 Aan: [EMAIL PROTECTED] Onderwerp: [development-axapta] Problem with Exel import again Hi, I want to import data by exel. So I use the Template Wizard in Exel Spreadsheets. I had a problem that was supose to be corrected with SP2. Unfortunatly, the problem isn't fix with SP2 but I got a different error msg. The error occur only with some of my personnal tables. Before SP2, my newest created tables always get that error: Error executing code: SysDictType object not initialized. Stack trace: \Classes\SysDictType\baseType \Classes\SysExcelTemplateWizard\formatType - line 11 \Classes\SysExcelTemplateWizard\formatColumns - line 34 \Classes\SysExcelTemplateWizard\createTemplate - line 17 \Classes\SysExcelTemplateWizard\run - line 21 \Classes\SysExcelTemplateWizard\main - line 11 Since SP2 installation, I got this error msg. Error executing code: DictEnum object not initialized. Stack trace: \Classes\DictEnum\label \Classes\SysExcelTemplateWizard\formatCell - line 22 \Classes\SysExcelTemplateWizard\formatType - line 21 \Classes\SysExcelTemplateWizard\formatColumns - line 37 \Classes\SysExcelTemplateWizard\createTemplate - line 17 \Classes\SysExcelTemplateWizard\run - line 21 \Classes\SysExcelTemplateWizard\main - line 11 Anyone know why? Thanks! Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Exclusive Video Premiere - Britney Spears Yahoo! Groups Sponsor ADVERTISEMENT click here Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
RE: [development-axapta] How to filter data when lookup?
oreobizkitja, Right click at the method of StringEdit, then override lookup method. You may get a good example by locating your cursor at lookup (in first row of editor - 'public void lookup()') and then press F1. This is example to show dimensions having DimensionCode of SysDimension::Department). public void lookup() { Query query = new Query(); QueryBuildDataSourcequeryBuildDataSource; SysTableLookup sysTableLookup; ; sysTableLookup = SysTableLookup::newParameters(tableNum(Dimensions), this); sysTableLookup.addLookupfield(fieldNum(Dimensions, Num)); sysTableLookup.addLookupfield(fieldNum(Dimensions, Description)); queryBuildDataSource = query.addDataSource(tableNum(Dimensions)); queryBuildDataSource.addRange(fieldNum(Dimensions, DimensionCode)).value(enum2str(SysDimension::Department)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); } Regards, Sonny Wibawa Adi K.A. Abinsam [EMAIL PROTECTED] wrote: Not recommended on the salesorder form, but still if you wanna customize it !!! Override the method lookup() on the itemid on the grid. That's it ! Abin -Original Message- From: oreobizkitja [mailto:[EMAIL PROTECTED] Sent: 29 October 2003 14:46 To: [EMAIL PROTECTED] Subject: [development-axapta] How to filter data when lookup? how to do that i wanna show item in some item group not all item when we choose Item Number on grid in tab lines in form 'salesorder' Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Exclusive Video Premiere - Britney Spears Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Problem with args's class
johnn_16, Do you know the difference between static method and dynamic method? The method you have created with name static void main, is a static method, so static method can only access the static variables and other static methods. You may do some tricks using this way: public static void main (Args args) { MyClass o; o = new MyClass(args); o.run(); } void new (Args args) { m_enuMyEnum = args.parmEnum(); } void run () { //do process switch (m_enuMyEnum) { case MyEnum::Enum1: break; default: break; } } Sonny Wibawa Adi johnn_16 [EMAIL PROTECTED] wrote: Hi, I would like to pass value from one form to another. Unfortunatly, the value must pass trought classes because the called form is called with a menuItem--Action. When I pass the value with the args.parm() of the menuItem to the class, I lost the value. I can access it in the construct and main method of the class, but after that, I lost it. Also, in the Construct and Main method, I can't access variables in the classDeclaration neither the other method of the class. Can anyone can explain me why? Help is greatly needed here and if you don't understand what I want, please ask me to re-explain. Thanks! Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard Yahoo! Groups Sponsor ADVERTISEMENT click here Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Updating temporary table
Steeve, I have the same problem before, but mine is not a temporary table. I have no idea why this can be happenned, maybe it's a bug in AXAPTA.I solve the problem by modify the code like this: int arrRecId [,1]; int swTot = 0; LedgerJournalTrans swTrans; ; select count(recId) from swTrans where swTrans.JournalNum == swJournalId; b = swTrans.RecId; while select forupdate swTrans where swTrans.JournalNum == swJournalId { if (arrRecId [swTrans.RecId] != swTrans.RecId) { arrRecId [swTrans.RecId] = swTrans.RecId; swTot++; } else { if (swTot = b) break; } //... process } Sonny Wibawa Adi Steeve Gilbert [EMAIL PROTECTED] wrote: itemChilds is a temporary table. I want to modify and update every record in it so I thought the following code would do the job: BOACF20_USCustomsLine itemChilds; Real ratio = 1.1; //Or whatever else while select forupdate itemChilds { itemChilds.PriceUnit = (itemChilds.PriceUnit * ratio); itemChilds.update(); } I have 4 records in this table but this code keeps on looping on the same 4 record. I think it stops when the field PriceUnit is full (huge number). Because when I go in debug mode, it keeps on looping and when I'm in normal mode the report is displayed with *** where the value would be. Don't worry, I've got plenty of space to display the value. If I remove itemChilds.update();, the loop browse every record once and exit, but this way I can't update the field. Got an idea? Thanks. Steeve... Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard Yahoo! Groups Sponsor ADVERTISEMENT Click to learn more... Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: [development-axapta] Unable to use SecurityKeySet
Somehow, I tried using SysSecurity, not SecurityKeySet and it work very well. I include the source code in case any of you will need it. Please enjoy. static void SWASecurity2(Args _args) { SecurityKeySet swSecurityKeySet; SWAClassTesta; ; swSecurityKeySet = SysSecurity::constructSecurityKeySet(); swSecurityKeySet.loadUserRights('aa','com'); // 'admin','dat' print swSecurityKeySet.access(SecurityKeyNum(Cust)) AccessType::NoAccess; pause; } Sonny Wibawa Adi Sonny Wibawa Adi [EMAIL PROTECTED] wrote: Hello, masters, Does anybody know the use of class SecurityKeySet? I want to use a security checking for the user if the user can access particular menu, or security id. I tried to check using the codes below, but I still cannot use it, because the value is incorrect. dictSecurityKey.rights() always return Delete and swSysSecurity.access(dictSecurityKey.id()) always return NoAccess. I tried SecurityKeySet::getMenuItemAccess, but it always return Delete. Any help would be appreciated. Thank you. Sonny Wibawa Adi SecurityKeySet swSysSecurity; UserGroupList userGroupList; UserInfouserInfo; DictSecurityKey dictSecurityKey; Dictionary dict = new Dictionary(); int i; str name; ; while select userGroupList where userGroupList.userId == curuserid() { swSysSecurity = new SecurityKeySet(); swSysSecurity.loadGroupRights(userGroupList.groupId, '100'); for (i=dict.securityKeyCnt(); i; i--) { dictSecurityKey = new DictSecurityKey(dict.securityKeyCnt2Id(i)); if (!swSysSecurity.disabledByConfigurationKey(dictSecurityKey.id())) { name = dictSecurityKey.name(); infolog.add(Exception::Info,strfmt('%5 %6 %1 %2 %3 %4',name, enum2str(swSysSecurity.access(dictSecurityKey.id())), dictSecurityKey.id(), enum2str(dictSecurityKey.rights()), userGroupList.groupId, userGroupList.userId )); } } } _ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard Yahoo! Groups Sponsor ADVERTISEMENT Click Here! Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Re: SV: [development-axapta] Select data from a different company
Try using changecompany(p_strDataAreaID){ ... } I've try to use changecompany syntax in a looping, but the company didn't changed properly and solved by placing the code in a different method. // source code: loop { changecompany(..) { ... // didn't work properly } } solved using new method: private void processDataAreaID(strID) { changecompany(strID) { ... // selection in this area will work on dataareaid == strID } } // source code: loop { processDataAreaID(strID); } For further information, see changecompany help. Sonny Wibawa Adi Stefan Lundquist (Priv) [EMAIL PROTECTED] wrote: you have to use the global ChangeCompany() method. More info can be found on Technet. /Stefan -Ursprungligt meddelande- Frn: eva_aksnes [mailto:[EMAIL PROTECTED] Skickat: den 23 december 2003 12:48 Till: [EMAIL PROTECTED] mne: [development-axapta] Select data from a different company How can I make a select of data in a different company? I want - in a parameters table - that there should be only one company which will be able to have an noyes-enum checked. How do you suggest that I write this check? I've tried code like this, but it did not seem to work: select firstonly p where p.dataAreaId != curext() p.noyesid; if(p) return checkFailed(This is already selected in another company); _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. _ Do you Yahoo!? Free Pop-Up Blocker - Get it now Yahoo! Groups Sponsor ADVERTISEMENT click here _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/development-axapta/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.