> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set address info

> How to set address info with CRMScript.

Writing address information back to this data structure can be challenging if the consumer application has a less dynamic address structure than SuperOffice CRM. You need to format their address data structure into one that SuperOffice understands.

<Tip>
  You can use the **pre-defined field names** to locate the same info in a corresponding external data structure. You can also flatten the address into a Map.
</Tip>

## Void setFormattedAddress(NSLocalizedField\[]\[] addr)

Sets the formatted address of the company.

```crmscript theme={null}
Company c;
c.load(2);
NSLocalizedField[][] address;
address[0][0].SetValue("NO-" + address[0][0].GetValue());
c.setFormattedAddress(address);
c.save();
```

Adds "NO-" to the 1st address field.

## Set address using the contact agent

```crmscript theme={null}
NSContactAgent contactAgent;
NSContactEntity contact = contactAgent.GetContactEntity(2);

NSAddress address = contact.GetAddress();

NSLocalizedField[][] localAdr = address.GetLocalizedAddress();
localAdr[1][0].SetValue("Götabergsgatan 22");
localAdr[2][0].SetValue("Götabergsgatan 22");

address.SetLocalizedAddress(localAdr);
contact.SetAddress(address);
contactAgent.SaveContactEntity(contact);
```


## Related topics

- [Get address info](/en/automation/crmscript/howto/address/get-address.md)
- [AddressInfo](/en/api/plugins/quote-connectors/api/data-carriers/addressinfo.md)
- [Address Provider](/en/api/plugins/quote-connectors/addresses.md)
- [Get Participant Info From Email Address](/en/api/reference/restful/agent/email_agent/get-participant-info-from-email-address.md)
- [NSAddress](/en/automation/crmscript/reference/CRMScript.NetServer.NSAddress.md)
- [Set LocalizedAddress](/en/api/web-services/howto/address/set-localized-address.md)
