Pages

Banner 468 x 60px

 

Wednesday, March 15, 2017

active() methode x++

0 comments
THis is is sample of active() methode x++

public int active()
{
    int ret;

    ret = super();

    BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyhg)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
    BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyhg)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);

    BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPL)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
    BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPL)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);

    BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPC)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::Failed);
    BIT_Tb_TemporaryFFB_ds.object(fieldNum(BIT_Tb_TemporaryFFB, qtyPC)).allowEdit(BIT_Tb_TemporaryFFB.Status == BIT_StatusTransfer::NotTransferred);

    return ret;
}
Read more...

Tuesday, March 14, 2017

Maxof and Minof X++

0 comments
Hi guys, i want to share Maxof and Minof X++ :

static void Addit_Maxof(Args _args)
{
    GG_FPJVoucher               _GG_FPJVoucher_AfterDP;
    ;
   
     select maxof(createdDateTime) from _GG_FPJVoucher_AfterDP where _GG_FPJVoucher_AfterDP.SalesId == 'SP0-1609-0158';
     info(strfmt('%1', _GG_FPJVoucher_AfterDP.createdDateTime));
}

static void Addit_Maxof(Args _args)
{
    GG_FPJVoucher               _GG_FPJVoucher_AfterDP;
    ;
   
     select minof(createdDateTime) from _GG_FPJVoucher_AfterDP where _GG_FPJVoucher_AfterDP.SalesId == 'SP0-1609-0158';
     info(strfmt('%1', _GG_FPJVoucher_AfterDP.createdDateTime));
}
Read more...

Update SQL with LEN

0 comments
Hi guys, i want to share Update SQL with LEN :

 update [DB_Staging].[dbo].[LedgerJournalTrans]
  set BIT_LEDGERDIMENSION = SUBSTRING(BIT_LEDGERDIMENSION, 1, LEN(BIT_LEDGERDIMENSION)-2)
  where BIT_LEDGERDIMENSION like '%M1'
Read more...

Access Microsoft Dynamics 365 for Operations instances

1 comments
This topic describes how to access development instances of Microsoft Dynamics 365 for Operations, configure on-premises development VMs, and find important configurations settings for developers and administrators.
Dynamics 365 for Operations is deployed in two modes:
A cloud environment that is provisioned through Microsoft Dynamics Lifecycle Services (LCS), and that supports various topologies (developer, demo, and high availability)
  • A local (on-premises) development virtual machine (VM) that is downloaded from LCS
Cloud environment that is provisioned through LCS
When a cloud environment is provisioned through LCS, the following events occur:
  • The user who requests the cloud environment is provisioned as the administrator in that environment.
  • A user who requests access through LCS will be able to access the cloud environment through Remote Desktop.
Accessing an instance through a URL
The system can be accessed by end users. The administrator can add users to this system by using the Users page in the instance. Note that these additional users don’t have to be users in LCS.
You obtain the base URL for the cloud environment from your LCS project site.
  1. Go to your LCS project page.
  2. In the Environments section, click the deployed environment.
  3. When the environment page opens, you can access the application by clicking Login > Log on to Dynamics 365 for Operations in the upper-right corner.
  4. Use valid end user credentials to sign in to the application. If the current LCS user is the user who originally deployed the environment, that user is probably a valid end user and the administrator of the application.
  5. In your browser, make a note of the Dynamics 365 for Operations base URL after you sign in. For example, the base URL might be https://dynamicsAx7aosContoso.cloud.dynamics.com.
Accessing the cloud instance through Remote Desktop
Some cloud environments can be accessed both as an end user and as a developer. The developer gets access to the system through Remote Desktop credentials. The Remote Desktop credentials are obtained from the environment page on the LCS project site (see the illustration earlier in this topic).
  1. Click the VM name.
  2. Use the local administrator user name and password that are shown to connect to the cloud VM through Remote Desktop. You can reveal the password by clicking the eye icon.
After you sign in to the environment through Remote Desktop, if you want to access the local application from the browser, use the same base URL that you use to access the application from a remote computer. The previous section explains how to obtain this base URL from LCS.
VM that is running on-premises
An environment virtual hard disk (VHD) is made available for download from LCS, so that it can be set up on a local machine. This system is intended to be accessed by a developer.
  1. On the main page for your LCS project, in the Environments section, click the plus sign (+), and then click Locally. You’re taken to the Connect site.
  2. Go to the Downloads page to download the latest VHD.
  3. In Microsoft Hyper-V Manager, create a local VM from the VHD that you downloaded. It’s a good idea to give your VM the recommended 16 gigabytes (GB) of memory and two virtual processors. Don’t use dynamic memory allocation.
Retail configuration
A newer downloadable VHD is also provided, in Preview state, to support Retail point-of-sale (POS) customization scenarios. This VHD is based on Microsoft Windows Server 2016 and lets you test your customized Retail POS app in an emulator on the VM. Except for this difference, both VHDs are self-contained and support the same set of developer scenarios.
To use the downloadable VHD for POS customizations, you must also follow this step.
Running the Virtual Machine (VM) locally
Follow these steps to run the VM from Hyper-V Manager.
  1. To start the VM, click Start.
  2. To open the VM in a window, click Connect.
  3. Click the Ctrl+Alt+Delete button on the toolbar. The VM receives most keyboard commands, but Ctrl+Alt+Delete isn’t one of them. Therefore, you must use the button or a menu command.
  4. Sign in to the VM by using the following credentials:
    • User name: Administrator
    • Password: pass@word1
Tip: You can resize the VM window by changing the screen resolution. Right-click the desktop on the VM, and then click Screen resolution. Select a resolution that works well for your display.
  1. Provision the administrator user. For more information, see the next section.
  2. Start the Batch Manager Service. This step is required if you’re running batch jobs or workflows.
    1. Open a Command Prompt window as an administrator.
    2. Type net start DynamicsAxBatch, and then press Enter.
You can also start the service from the Services window.
Retail configuration
For the downloadable VHD for POS customizations, you must also follow these steps on the guest VM.
  1. Download and install Microsoft Emulator for Windows 10 Mobile Anniversary Update.
  2. Start the Hyper-V host service. For more information, see Hyper-V: The Hyper-V Virtual Machine Management service must be running. If errors occur during startup, you can also try to uninstall and reinstall the Hyper-V role on the guest VM.
Provisioning the administrator user
For developer access, you must be an administrator on the instance. To provision your own credentials as an administrator, run the admin user provisioning tool that is provided on the desktop, and provide your email address (Azure AD credentials) in the tool.
  1. From the desktop, run the admin user provisioning tool as an administrator (right-click the icon, and then click Run as administrator).
  2. Enter your email address, and then click Submit.
Read more...

Menambah kapasitas Hardisk pada Hyper-v :

0 comments
Hi guys, berikut cara gampang menambah space hardisk di Hyper-V :

1. Berikut tampilan hardisk pada virtual mesin Windows 7 dengan kapasitas awal 17 GB.
2. Untuk dapat menambahkan kapasitas hardisk, Shutdown Virtual mesin terlebih dahulu. Proses shutdown bisa dalam virtual mesin atau dari Hyper-V manager.
3. Kemudian pada Komputer Host buka Hyper-V manager, dari menu Start – Administrative Tools Plih Hyper-V Manager.
4. Pada Hyper-v Manager klik kanan pada virtual mesin yang di maksud kemudian pilih pilihan Settings…. 
5. Pada halaman Settings, pilih menu IDE Controller kemudian pilih hardisk yang di maksud kemudian klik tombol Edit. 
Kebetulan pada  di bawah hanya terdapat satu hardisk jika terdapat beberapa hardisk pada menu IDE Controller 0 atau IDE Controller 2 atau juga pada SCSI Controller akan ada beberapa Hard drive, pastikan Hard Drive yang akan di tambah kapsitasnya yang terpilih. 
6. Muncul halaman Edit Virtial Hard Disk Wizzard, pada Choose Action, karena kita ingin menambahkan kapasitas Hardisk maka pilih opsi Expand kemudian klik tombol Next.
7. Pada halaman Configure Disk di sini anda dapat menentukan besaran kapasitas hardisk yang baru. Pada contoh di bawah penulish mengisikan New size: 150 GB dari kapasitas sebelumnya Current size is 127 GB kemudian klik tombol Next, berarti di sini penulis menambahkan kapasitas hardisk sebesar 23 GB. 
8. Kemudian pada halaan Summary, klik tombol Finish. 
9. Sampai di sini proses penambahan Hardisk telah selesai, tetapi kapastias yang kita tambahkan belum bisa di gunakan oleh pengguna, kita perlu mengekspannya terlebih dahulu sebelum dapat di gunakan.
10. Buka Disk Management, dari menu Start klik kanan pada Computer kemudian pilih Manage.

11. Pada halaman Disk management, perhatikan pada Disk 0, 23 GB kapasitas hardisk yang di tambahkan tadi masih dalam status Unallocated, langkah selanjutnya yaitu mengekspand drive C agar menjadi 150 GB.
Selain mengekspan Drive C anda juga dapat membuat partisi baru pada kapasitas hardisk yang kita tambhakan tadi. 
12. Untuk mengekspan Drive C, klik kanan pada Drive C kemudian pilih Extend Volume….
13. Muncul halaman Welcome to the Extend Volume Wizzard kemudian klik tonbol Next.
14. Pada halaman Select Disks, secara default semua kapasitas hardisk yang kita tambahkan langsung di tambahkan semua, terlihat pada kolom Selected kemdudian klik tombol Next.
Jika anda ingin hanya sebagian kapasitas hard disk di tambahkan pada Drive C dan sisanya ingin di jadikan partisi baru, anda pat mengedit nilai paa Select the amount of space in MB lebih kecil, kemudian sisanya anda dapat jadikan partisi sendiri.
15. Muncul halaman Completing the Extend Volume Wizzard klik Finish.
16. Penambahan kapasitas hardisk telah selesai, klik kanan pada drive C kapasitas hardisk telah menjadi 150 GB dan sudah tidak terdapat lagi partisi unallocated. Selanjutnya pengguna dapat bekerja dengan kapasitas hardisk yang baru


Referensi : http://mymisfah.blogspot.co.id/2013/07/menambah-kapasitas-hardisk-pada-hyper-v.html
Read more...

Wednesday, March 8, 2017

Delete where in SQL Server

1 comments
-- Delete data from Table1
DELETE Table_2
FROM Table_2 t2
INNER JOIN Table_1 t1 ON t1.journalid = t2.journalid
WHERE t1.status IN ('posted')
GO
 
-- Delete data from Table1
DELETE [BSPLive].[dbo].[INVENTJOURNALTRANS]
FROM [BSPLive].[dbo].[INVENTJOURNALTRANS] t2
INNER JOIN [BSPLive].[dbo].[INVENTJOURNALTABLE] t1 ON t1.journalid = t2.journalid
WHERE t1.POSTED IN ('0') and t1.JOURNALID like 'M%'
GO



Update table_name set BIT_LEDGERDIMENSION = Replace(BIT_LEDGERDIMENSION,'50','51') where BIT_LEDGERDIMENSION Like '50%' and BIT_Location = 'M12' and JournalNum like 'R%'

DELETE [BSPLive].[dbo].[LEDGERJOURNALTRANS]
FROM       [BSPLive].[dbo].[LEDGERJOURNALTRANS] t2
INNER JOIN [BSPLive].[dbo].[LEDGERJOURNALTABLE] t1
ON t1.journalnum = t2.journalnum
WHERE t1.POSTED IN ('0') and t1.CREATEDBY = 'admin' and t1.journalname = 'GJPCP'

/****** Script for SelectTopNRows command from SSMS  ******/
SELECT [JOURNALID], recid
  FROM [BSPLive].[dbo].[INVENTJOURNALTRANS]
  where cast(recid as varchar)like '%.%'
  and recid < 10000

SELECT [BSPLive].[dbo].[INVENTJOURNALTRANS].[JOURNALID], [BSPLive].[dbo].[INVENTJOURNALTRANS] .recid
  FROM [BSPLive].[dbo].[INVENTJOURNALTRANS]
  inner join [BSPLive].[dbo].[INVENTJOURNALTABLE]
  on [BSPLive].[dbo].[INVENTJOURNALTABLE].JOURNALID = [BSPLive].[dbo].[INVENTJOURNALTRANS].JOURNALID
  where cast([BSPLive].[dbo].[INVENTJOURNALTRANS].recid as varchar)like '%.%'
   and [BSPLive].[dbo].[INVENTJOURNALTRANS].recid < 10000
   and [BSPLive].[dbo].[INVENTJOURNALTABLE].POSTED = 0

DELETE [BSPLive].[dbo].[INVENTJOURNALTRANS]
FROM [BSPLive].[dbo].[INVENTJOURNALTRANS] t2
INNER JOIN [BSPLive].[dbo].[INVENTJOURNALTABLE] t1 ON t1.journalid = t2.journalid
WHERE cast(t2.recid as varchar)like '%.%'
   and t2.recid < 4000
   and t1.POSTED = 0

select t2.JOURNALID, t2.RECID FROM [BSPLive].[dbo].[INVENTJOURNALTRANS] t2
INNER JOIN [BSPLive].[dbo].[INVENTJOURNALTABLE] t1 ON t1.journalid = t2.journalid
WHERE cast(t2.recid as varchar)like '%.%'
   and t2.recid < 4000
   and t1.POSTED = 0

select t2.JOURNALID, t2.RECID FROM [BSPLive].[dbo].[INVENTJOURNALTRANS] t2
WHERE t2.RECID like '%761%'

delete from [BSPLive].[dbo].[INVENTJOURNALTRANS]
where [BSPLive].[dbo].[INVENTJOURNALTRANS].JOURNALID = 'M3BSP02R24728'

select journalid, recid from  [BSPLive].[dbo].[INVENTJOURNALTRANS]
where  [BSPLive].[dbo].[INVENTJOURNALTRANS].RECID like '%.%'
       and [BSPLive].[dbo].[INVENTJOURNALTRANS].recid < 4000

delete from [BSPLive].[dbo].[INVENTJOURNALTRANS]
where  [BSPLive].[dbo].[INVENTJOURNALTRANS].RECID like '%.%'

       and [BSPLive].[dbo].[INVENTJOURNALTRANS].recid < 4000
Read more...

A table, Extended Data Type, Base Enum or class called TableName already exists. Import of Table aborted

0 comments
If during import of XPO file, we get the following error.

 A table, Extended Data Type, Base Enum or class called TableName already exists. Import of Table aborted.

This error is basically due to cache and ID mismatch problems for the related ojbects, 

Solution
Cache files - close the client, delete files .AUC files in cache directory:
* C:\Documents and Settings\[USERNAME]\Local Settings\Application Data for Win Xp or Server 2003,
* C:\Users\[USERNAME]\AppData\Local for Vista/Win7.
Reopen the client, try import again.
Read more...

A financial dimension value is based on the record and has been used on a transaction. You cannot delete the record

  SOLUTION delete in table DimensionAttributeLevelValue base on Bank Account  :  and Delete the Bank Account FINISH