Data entity

FiscalEstablishmentEntity

Holds fiscal establishments, used for Brazil. It includes tax registrations such as CNPJ and IE, and NF-e and NFC-e settings like authority, certificate, environment and version. It joins party, accountant and organization data. The key is the fiscal establishment ID.

Entity name
FiscalEstablishmentEntity
Public entity name
FiscalEstablishment
OData collection
FiscalEstablishments
Category
Not set
Module
Accounts receivable
Read-only
No
Data management enabled
Yes
Configuration key
None
Keys
FiscalEstablishmentId
Staging table
FiscalEstablishmentStaging

Use it in Power BI and Power Platform

OData URL
https://<environment>/data/FiscalEstablishments
Dataverse virtual table
mserp_fiscalestablishmententity. Listed in the virtual-table catalogue. An administrator must make the virtual table visible before you can use it.
Data management
Enabled: you can use it in import and export projects.

Data sources

  • FiscalEstablishment_BR · root
  • Accountant_BR · OuterJoin to FiscalEstablishment_BR · read-only
  • DirPartyLocation · InnerJoin to FiscalEstablishment_BR · read-only
  • DirPartyTable · InnerJoin to DirPartyLocation · read-only
  • DirPerson · Derived to DirPartyTable
  • DirOrganizationBase · Derived to DirPartyTable
  • DirOrganization · Derived to DirOrganizationBase
  • OMInternalOrganization · Derived to DirOrganizationBase
  • CompanyInfo · Derived to OMInternalOrganization
  • OMTeam · Derived to OMInternalOrganization
  • OMOperatingUnit · Derived to OMInternalOrganization
  • LogisticsLocation · InnerJoin to DirPartyLocation · read-only
  • FiscalEstablishmentGroup_BR · InnerJoin to FiscalEstablishment_BR · read-only
  • FiscalEstablishmentSalesIssuer (table FiscalEstablishment_BR) · OuterJoin to FiscalEstablishment_BR · read-only

Fields (45)

Field and descriptionType / EDT / enumMandatoryOData / DataverseReferencesLineage root
AccountantPoints to the accountant record linked to this establishment.Int64
AccountantRecId_BR
NoNo (private)Accountant_BR.RecIdFiscalEstablishment_BR.Accountant_BR
CCMMunicipal taxpayer registration number (CCM) of the establishment.String (20)
CCMNum_BR
NoYesFiscalEstablishment_BR.CCMNum_BR
CNPJCNPJ number, the Brazilian company tax ID, of the establishment.String (20)
CNPJCPFNum_BR
NoYesFiscalEstablishment_BR.CNPJCPFNum_BR
AddressPoints to the party location record that gives the establishment's address.Int64
DirPartyLocationRecId
YesNo (private)DirPartyLocation.RecIdFiscalEstablishment_BR.DirPartyLocation
NFeAuthorityCode of the NF-e authority that the establishment sends electronic documents to.String
EFDocAuthorityId_BR
NoYesEFDocAuthority_BR.AuthorityIdFiscalEstablishment_BR.EFDocAuthority
PrintDanfeWhenAprovedYes or no choice for printing the DANFE automatically once an NF-e is approved.Enum
EFDocAutomaticPrinting_BR
boolean

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.EFDocAutomaticPrinting
BlockPostingNotValidatedNfeXmlYes or no choice: only allow posting of NF-e documents that have a valid access key.Enum
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.EFDocBlockPostingNotValidatedXml
NFeDigitalCertificateSubject text of the digital certificate used to sign electronic fiscal documents.String (960)
DigitalCertificateSubject
NoYesFiscalEstablishment_BR.EFDocDigitalCertificateSubject
EmailTemplateApprovedNFeE-mail template ID used when an NF-e is approved.String
SysEmailId
NoYesSysEmailTable.EmailIdFiscalEstablishment_BR.EFDocEmailApproved
EmailTemplateCanceledNFeE-mail template ID used when an NF-e is cancelled.String
SysEmailId
NoYesSysEmailTable.EmailIdFiscalEstablishment_BR.EFDocEmailCanceled
EmailTemplateCorrectionLetterNFeE-mail template ID used for the correction letter event.String
SysEmailId
NoYesSysEmailTable.EmailIdFiscalEstablishment_BR.EFDocEmailEvent
NFeEnvironmentEnvironment for NF-e: testing, production or blank.Enum
EFDocEnvironment_BR
  • Testing 1
  • Production 2
  • Blank 0
NoYesFiscalEstablishment_BR.EFDocEnvironment
PreprintedSecurityFormYes or no choice showing whether a pre-printed security form is used.Enum
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.EFDocPrePrintedSecurityForm
SendDanfePdfInEmailYes or no choice for attaching the DANFE as a PDF to the e-mail.Enum
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.EFDocSendPdfInEmail
ValidateXmlSchemaChoice to check the XML schema of the NF-e when the document is posted.Enum
EFDocValidateSchemaOnPosting_BR
boolean

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.EFDocValidateSchemaOnPosting
NFeVersionVersion of the NF-e feature in use: 2.0, 3.1 or 4.0.Enum
EFiscalDocVersion_BR
  • V4 1
  • V31 2
  • V40 3
NoYesFiscalEstablishment_BR.EFDocVersion
FciToIntrastateEnabledYes or no choice for applying FCI to operations inside the same state.Enum
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.FciToIntrastateEnabled
FiscalEstablishmentGroupPoints to the fiscal establishment group this establishment is in.Int64
FiscalEstablishmentGroupRecId_BR
YesNo (private)FiscalEstablishmentGroup_BR.RecIdFiscalEstablishment_BR.FiscalEstablishmentGroup_BR
FiscalEstablishmentIdUnique ID of the fiscal establishment. It is the business key of the table.String
FiscalEstablishmentId_BR
YesYesFiscalEstablishment_BR.FiscalEstablishmentId
SalesIssuerPoints to another fiscal establishment that issues sales documents for this one.Int64
RefRecId
NoNo (private)FiscalEstablishment_BR.RecIdFiscalEstablishment_BR.FiscalEstablishmentSalesIssuer
FiscalOrganizationPoints to the fiscal organization that this establishment belongs to.Int64
FiscalOrganizationRecId_BR
NoNo (private)FiscalOrganization_BR.RecIdFiscalEstablishment_BR.FiscalOrganization_BR
IEState registration number (IE) of the establishment.String (20)
IENum_BR
NoYesFiscalEstablishment_BR.IENum_BR
ClosedWarehouseYes or no flag marking the establishment as a closed warehouse.Enum
NoYesId
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.IsClosedWarehouse
NameName of the fiscal establishment.String (60)
FiscalEstablishmentName_BR
NoYesFiscalEstablishment_BR.Name
NextFiscalPrinterDailyReportNumberNext number to use for the daily operation report of the fiscal printer (ECF).Integer
PositiveNumber
NoYesFiscalEstablishment_BR.NextFiscalPrinterDailyReportNumber
NIRENIRE number, the company registration number at the trade board.String (11)
NIRE_BR
NoYesFiscalEstablishment_BR.NIRE
SPEDContribReportingTypeReporting type for NF-e and ECF in SPED contributions: detailed or consolidated.Enum
SPEDContribReportingType_BR
  • Detailed 0
  • Consolidated 1
NoYesFiscalEstablishment_BR.SPEDContribReportingType
MatchNfeXmlOnPostingYes or no choice to stop NF-e posting when the XML does not match.Enum
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.EFDocMatchNfeXmlOnPosting
NFCeAuthorityCode of the authority that receives consumer electronic documents (NFC-e).String
EFDocAuthorityId_BR
NoYesEFDocAuthority_BR.AuthorityIdFiscalEstablishment_BR.ConsumerEFDocAuthority
CSCCSC code, a security code used for NFC-e, stored as long text.String (-1)
ConsumerEFDocCsc
NoYesFiscalEstablishment_BR.ConsumerEFDocCsc
CSCTokenShort token that goes with the CSC code for NFC-e.String (6)
ConsumerEFDocCscToken
NoYesFiscalEstablishment_BR.ConsumerEFDocCscToken
NFCeEmailApprovedE-mail template ID used when an NFC-e is approved.String
SysEmailId
NoYesSysEmailTable.EmailIdFiscalEstablishment_BR.ConsumerEFDocEmailApproved
NFCeEnvironmentEnvironment for NFC-e: testing, production or blank.Enum
EFDocEnvironment_BR
  • Testing 1
  • Production 2
  • Blank 0
NoYesFiscalEstablishment_BR.ConsumerEFDocEnvironment
NFCeSendPdfInEmailYes or no choice for attaching the DANFE NFC-e as a PDF to the e-mail.Enum
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.ConsumerEFDocSendPdfInEmail
NFCeVersionVersion of the NFC-e feature in use: 2.0, 3.1 or 4.0.Enum
EFiscalDocVersion_BR
  • V4 1
  • V31 2
  • V40 3
NoYesFiscalEstablishment_BR.ConsumerEFDocVersion
AccountantCPFCPF number, the Brazilian personal tax ID.String (20)
CPFNum_BR
YesYesAccountant_BR.CPFNum_BR
AccountantCRCCRC registration number of the accountant.String (20)
CRCNum_BR
YesYesAccountant_BR.CRCNum_BR
AddressLocationPoints to the location. Part of the key.Int64
LogisticsLocationRecId
YesNo (private)LogisticsLocation.RecIdDirPartyLocation.Location
AddressPartyPoints to the party in the global address book. Part of the key.Int64
DirPartyRecId
YesNo (private)DirPartyTable.RecIdDirPartyLocation.Party
PartyNumberUnique ID of the party. It is the key of the table.String (40)
DirPartyNumber
YesYesDirPartyTable.PartyNumber
AddressNameUnique ID of the location. It is the key of the table.String (40)
LogisticsLocationId
YesYesLogisticsLocation.LocationId
FiscalEstablishmentGroupIdUnique ID of the fiscal establishment group.String
FiscalEstablishmentGroupId_BR
YesYesFiscalEstablishmentGroup_BR.FiscalEstablishmentGroupId
FiscalEstablishmentSalesIssuerIdUnique ID of the fiscal establishment. It is the business key of the table.String
FiscalEstablishmentId_BR
NoYesFiscalEstablishment_BR.FiscalEstablishmentId
EFDocNFe402018005v110Yes or no switch for turning on the latest NF-e technical note.Enum
NoYes

Platform enum: values not in the metadata extract.

NoYesFiscalEstablishment_BR.EFDocNFe402018005v110
EFDocNFeTechNotesSelected NF-e technical note, by year, number and version.Enum
EFDocNFeTechNotes_BR
  • NFe402018005v110 0
  • NFe402018005v120 1
  • NFe402019001v100 2
  • NFe402019001v110 3
  • NFe402019001v120 4
  • NFe402019001v140 5
  • NFe402019001v151 6
  • NFe402020006v100 7
  • NFe402020006v110 8
  • NFe402020005v110 9
  • NFe402021004v100 10
  • NFe402020006v120 11
  • NFe402021004v131 12
  • NFe402019001v160 13
  • NFe402019001v162 14
NoYesFiscalEstablishment_BR.EFDocNFeTechNotes

Foreign keys (13)

Each field below points to the key of another table. Join on it in Power BI, or follow the link to an entity that exposes that table.

  • Accountant → Accountant_BR.RecId (key of Accountant_BR)

    Zero or one FiscalEstablishment_BR record → zero or one Accountant_BR record

    Accountant_BR details: see AccountantEntity

  • Address → DirPartyLocation.RecId (key of DirPartyLocation)

    Exactly one FiscalEstablishment_BR record → exactly one DirPartyLocation record

    DirPartyLocation details: see DirPartyLocationPostalAddressV2Entity, HcmWorkerPostalAddressDualWriteEntity, CustCustomerV3Entity

  • NFeAuthority → EFDocAuthority_BR.AuthorityId (key of EFDocAuthority_BR)

    Many FiscalEstablishment_BR records → zero or one EFDocAuthority_BR record

    EFDocAuthority_BR details: see EFDocAuthorityEntity

  • EmailTemplateApprovedNFe → SysEmailTable.EmailId (key of SysEmailTable)

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

    Not exposed by a public entity.

  • EmailTemplateCanceledNFe → SysEmailTable.EmailId (key of SysEmailTable)

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

    Not exposed by a public entity.

  • EmailTemplateCorrectionLetterNFe → SysEmailTable.EmailId (key of SysEmailTable)

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

    Not exposed by a public entity.

  • FiscalEstablishmentGroup → FiscalEstablishmentGroup_BR.RecId (key of FiscalEstablishmentGroup_BR)

    Exactly one FiscalEstablishment_BR record → exactly one FiscalEstablishmentGroup_BR record

    FiscalEstablishmentGroup_BR details: see FiscalEstablishmentGroupEntity, TaxesMatrixEntity

  • SalesIssuer → FiscalEstablishment_BR.RecId (key of FiscalEstablishment_BR)

    Exactly one FiscalEstablishment_BR record → exactly one FiscalEstablishment_BR record

    FiscalEstablishment_BR details: see EFDocTechResponsibleInformationEntity, FiscalOrganizationFiscalEstablishmentEntity, AssetFixedAssetEntity

  • FiscalOrganization → FiscalOrganization_BR.RecId (key of FiscalOrganization_BR)

    Many FiscalEstablishment_BR records → zero or one FiscalOrganization_BR record

    FiscalOrganization_BR details: see FiscalOrganizationEntity, FiscalOrganizationFiscalAuditorEntity, FiscalOrganizationFiscalEstablishmentEntity

  • NFCeAuthority → EFDocAuthority_BR.AuthorityId (key of EFDocAuthority_BR)

    Many FiscalEstablishment_BR records → zero or one EFDocAuthority_BR record

    EFDocAuthority_BR details: see EFDocAuthorityEntity

  • NFCeEmailApproved → SysEmailTable.EmailId (key of SysEmailTable)

    Many FiscalEstablishment_BR records → zero or one SysEmailTable record

    Not exposed by a public entity.

  • AddressLocation → LogisticsLocation.RecId (key of LogisticsLocation)

    Many DirPartyLocation records → exactly one LogisticsLocation record

    LogisticsLocation details: see AccountantEntity, CustPostalAddressV2Entity, DirPartyLocationPostalAddressEntity

  • AddressParty → DirPartyTable.RecId (key of DirPartyTable)

    Many DirPartyLocation records → exactly one DirPartyTable record

    DirPartyTable details: see CustFoundationEntity, smmContactPersonV2Entity, CustCustomerV3Entity

Need help with FiscalEstablishmentEntity in Power BI, Power Automate or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk