Posts

why to set autodeclaration property to yes in combo box

  set Auto Declaration Property to Yes why? It will allow us to reference this Combo Box and retrieve the value later in this article. ret = super() // essentially just tells the system to do what the control is supposed to do,  and display a new value anytime a new value is selected.  what is GUID? A GUID (a globally unique identifier) is a 16 byte, or a 128 bit integer that can be used  across all computers and networks wherever a unique identifier is required.

where we can use coc

 chain of command can be used in the following objects 1.Classes 2.Tables 3.Forms 4.Datasource on a form. 5.Data field on a form. 6.Control of a form. 7.Data entities step1:name of the chain of command class we create must end with the _Extension. step2:The keyword ‘final’ must be used in the class definition line. step3: The class needs to have the attribute        [ExtensionOf(classStr(<NameOfBaseObject>))]    The “classStr” text above will change depending on the type of base objecting you are extending. -> Below are the extensions used based on where we are using chain of commands.  -> When extending a class, use classStr(<NameofBaseClass>) -> When extending a table, use tableStr(<NameOfBaseTable>) -> In the case of a form, use formStr(<NameOfBaseForm>) -> When extending a form Datasource use formDataSourceStr(<NameOfBaseForm>,<NameOfDataSource>) -> When extending a form Data field, use for...

where we can use chain of commands

 chain of command can be used in the following objects 1.Classes 2.Tables 3.Forms 4.Datasource on a form. 5.Data field on a form. 6.Control of a form. 7.Data entities step1:name of the chain of command class we create must end with the _Extension. step2:The keyword ‘final’ must be used in the class definition line. step3: The class needs to have the attribute        [ExtensionOf(classStr(<NameOfBaseObject>))]    The “classStr” text above will change depending on the type of base objecting you are extending. -> Below are the extensions used based on where we are using chain of commands.  -> When extending a class, use classStr(<NameofBaseClass>) -> When extending a table, use tableStr(<NameOfBaseTable>) -> In the case of a form, use formStr(<NameOfBaseForm>) -> When extending a form Datasource use formDataSourceStr(<NameOfBaseForm>,<NameOfDataSource>) -> When extending a form Data field, use for...

what is retry in x++

 -> A retry can be written in a catch block to jump back to the first line of code within the try block.  -> This can be used if the issue in the implementation can be fixed by code in the catch block. -> Then, the try block will run again to give it a second chance to succeed.  **** -> Make sure that the retry does not cause an infinite loop.  Example: try { //Run some code that might throw a numeric or other type of exception. } catch (Exception::Numeric) { info('Found a Numeric exception.'); } catch { info('Caught an exception'); retry; } finally {         // Executed no matter how the try block exits. }

what is recordinsertlist ini D365

 RecordInsertList class to copy a bill of materials (BOM) from one BOM to another. Ex: void copyBOM(BOMId _FromBOM, BOMId _ToBOM)  {      RecordInsertList BOMList;  // This is recordinsertlist     BOM BOM, newBOM;      BOMList = new RecordInsertList(tableNum(BOM));      while select BOM      where BOM.BOMId == _FromBOM      {          newBOM.data(BOM);          newBOM.BOMId = _ToBOM;          BOMList.add(newBOM);      }      BOMList.insertDatabase();  }

what is execute query method in d365

 what is execute method in D365? ->A method is called once when the form is opened.  ->But it is also called when the ‘refresh’ button is pushed on a form.  ->It can also called by other controls on the form. note** The init method is only called once when the form first opens.

validatewrite method in x++

  what is validatewrite method in x++? Answer: Method validateWrite() will just check mandatory fields and is triggered when the record . Checks made by validateWrite() are the same as the super() call in validateField(). So if your condition is not related to the value an application user enters in a specific field, you should put the validation in validateWrite().