---
title: "setSurfaces Method"
canonical: https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.setsurfaces.htm
archived: true
applies_to:
  - product: "Customer's Canvas On-Premises"
  - product: "Design Editor"
    versions: ["6.15.0", "6.x (may differ)"]
---

**You’re viewing outdated documentation.** [View the latest Customer’s Canvas On-Premises documentation](https://customerscanvas.com/docs/on-premises/).

# setSurfaces Method

**Applies to:** Customer's Canvas On-Premises; Design Editor 6.15.0, 6.x (may differ) · **Archived documentation**
 
### Callable
 
- setSurfaces(surfaces:  [SurfaceTypes](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.htm.md) [] ) :  Promise &lt; [Product](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.product.htm.md) &gt;

- Replaces a product.
  
 - example
     - ```
    editor.getProduct()
        // When we get the product.
        .then(function(product) {
            // Replace the product with two new pages.
            product.setSurfaces([
                { width: 300, height: 300 },
                { designFile: "postcard" }
            ])
            // If there was an error while replacing pages in the product.
            .catch(function (error) {
                console.error("Setting surfaces failed with exception: ", error);
            });
        });
    ```

#### Parameters

    - ##### surfaces: [SurfaceTypes](https://customerscanvas.com/docs/cc6/customerscanvas.iframeapi.objectmodel.htm.md) [] 
  
        An array of the new surfaces.

#### Returns Promise &lt; Product &gt;
 
    The product instance with the new surfaces.
