I'm trying to toy around with importing data via csv with X++ and creating brand new prospects. So I'm trying to figure out the different problems first.
The first thing I'm trying to do is create a DirParty entry with the org name, address, and contact info. So right now I just have code trying to create this entry so I can get a partyId to then insert when I go to put a new entry into the smmBusRelTable. I am getting this error message though saying Field 'Name' is required and I am not seeing these entries in the global address book or in the tables themselves. I get this error 2x.
smmBusRelTable prospect; DirParty dirParty; DirPartyPostalAddressView dirPartyPostalAddressView; DirPartyContactInfoView dirPartyContactInfoView; ttsBegin; prospect.initValue(); dirParty = dirParty::constructFromCommon(prospect); dirParty.parmName("Test"); dirParty.parmNameAlias("Test"); info(dirParty.parmName()); dirPartyPostalAddressView.LocationName = "Test"; dirPartyPostalAddressView.Address = "Test Address"; dirPartyPostalAddressView.County = "Test"; dirPartyPostalAddressView.State = "IL"; dirPartyPostalAddressView.ZipCode = "60115"; dirPartyPostalAddressView.CountryRegionId = "US"; dirparty.createOrUpdatePostalAddress(dirPartyPostalAddressView); dirPartyContactInfoView.LocationName = "Phone"; dirPartyContactInfoView.Type = LogisticsElectronicAddressMethodType::Phone; dirPartyContactInfoView.Locator = "2222222222"; dirParty.createOrUpdateContactInfo(dirPartyContactInfoView); info(strFmt("%1",dirParty.parmPartyNumber())); ttsCommit;