Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > customer address information transfer

Forum

Search UsersRules
customer address information transfer
#1
Active user
Points:: 0
Joined:: Apr 10, 2020

1c: In Drive program, I want to transfer customer address information by writing a program from excel (Picture-1). Can you help me?
Note: The screenshot is in the attached file.

Profile
#2
Administrator
Points:: 0
Joined:: Oct 3, 2019

Hello Ertuğrul,

of course it is possible.

First, you need to read the data from the Excel file. Can I give you an example of how this can be implemented?

Then this data must be written to the catalog "Counterparties". This catalog has a tabular section "ContactInformation" (see screenshot), which stores all contact information on the counterparty - addresses, phone numbers, etc.

Below is a piece from the working code, which just adds the "LegalAddress" value for the counterparty:


Code
      moduleAddressManagerClientServer = Common.CommonModule("AddressManagerClientServer");
      structureAddress = moduleAddressManagerClientServer.NewContactInformationDetails(Enums.ContactInformationTypes.Address);
      
      structureAddress.PostalCode    = zip_code;
      structureAddress.Country   = country;
      structureAddress.CountryCode   = country_iso_code;
      structureAddress.City      = city;
      structureAddress.AddressLine1   = street_1;
      structureAddress.AddressLine2   = street_2;
      
      stringShippingAddress = street_1 + ", " + street_2 + ", " + zip_code 
      + ", " + city + ", " + country; 

      structureAddress.value      = stringShippingAddress;
      
      Value = ContactsManagerInternal.ToJSONStringStructure(structureAddress);
      ContactsManager.AddContactInformation(NewCustomer, Value, Catalogs.ContactInformationKinds.CounterpartyLegalAddress, , False);



Best,
Aleksandr

Profile
#3
Active user
Points:: 0
Joined:: Apr 10, 2020

Thank you very much. Problem solved. I wish you happiness in the new year.

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.