Showing posts with label Data entity. Show all posts
Showing posts with label Data entity. Show all posts

Monday, September 21, 2026

computed column in Dataentity

synatx:-  

public static server str methodname()

  {
      str purchid=SysComputedColumn::returnField(dataentityviewstr(Dataentityname),dataEntityDataSourceStr(Dataentityname,Datasourcename),fieldStr(Datasourcename,fieldname));

      return strFmt(@'SELECT TOP 1 from tablename where tablename.fieldname=%1',purchid);


Note:-For lengthy sql stmts dont write direclty here it will show huge errors so pls write first huge sql stmts in SSMS then confirm data correctly then paste in above return statement
--------------------------------------------------------
     To declare a string use SysComputedColumn::returnLiteral('string value');

Thursday, August 21, 2025

Export and import data through data entity globally meaning with all legal entities

 scenario:- Today in this blog we learn about how to Export and import data through data entity globally meaning with all legal entities 

>> Generally when we create a data project either Export or Import the data project will appear in all legal entities but when we do export or import it will give only data from which legal entity you are doing the process but if you want data to be imported or exported from all legal entities then you need customization

>>Customization at two levels 

1) One drag DataAreaId field from Any datasource in dataentity to fields in Dataentity 

2) Open Data entity properties and change Primary context field to empty , Default is DataAreaID as shown in image below


3) After that do Regenerate and Update staging if the data entity is Customized if it is standard then build is enough followed by Modelbuild and sync 

Thats all Start Importing and Exporting You will see changes 

NOTE:-IF changes are not reflecting please do modify mapping and build sync 

Undo settlement of payment and invoice through code

 internal final class RunnableClasstestforundosettlement {     /// <summary>     /// Class entry point. The system will call this meth...