Insert Customer VAT number and Registration Type Manually from backend (SQL) Query in D365 F&O

 -----Insert Registration Types----------

insert into TAXREGISTRATION(TaxRegistrationTypeApplicabilityRule, REGISTRATIONNUMBER,DirPartyLocation,VALIDTO)

select TAXREGISTRATIONTYPE.RECID,'300187978800003',(select top 1 RECID from DIRPARTYLOCATION

where LOCATION=(select top 1 RECID from LogisticsLocation 

where LOCATIONID='000012001')),'2154-12-31 00:00:00.000'

from  

TAXREGISTRATIONTYPE

where 

TAXREGISTRATIONTYPE.TAXREGSTRATIONTYPE='TRN'

Comments

Popular posts from this blog

Get Current Worker data in d365 fo x++

Table Level Event Handler in d365 fo x++