customer address information transfer

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Apr 10, 2020
Company: HerSüreçYazılım

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.

 
#2
People who like this:0Yes/0No
Administrator
Rating: 23
Joined: Oct 3, 2019
Company:

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

Download 1.png (14.47 KB)
 
#3
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Apr 10, 2020
Company: HerSüreçYazılım

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

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.