Type: BCS.Sym3.IProductManager

Product manager

Methods


DeleteAllProduct

Delete all products


GetById(System.Int64)

Gets a product object by its id

  • Parameters:
    • id: product id
  • Returns:
    • The product id if found, null otherwise
  • Example:
This example shows you how to change product color

            var product = Project.Products.GetById(productId);
            product.Color = Project.Colors.Get("Sym3 Red")
            

Events

ProductCreated This event is fired when a product is added

  • Example:
This example shows you how to subscribe to this event

            //---- JAVASCRIPT:
            Project.Products.add_ProductCreated(OnProductCreated);
            
            function OnProductCreated(productId) {
                print(productId);
            }
            
            //---- C#
            Project.Products.ProductCreated += new ProductAddedDelegate(Products_OnProductCreated);
            ...
            
            private void Products_OnProductCreated(long productId)
            {
                Console.Writeline(productId);
            }
            
            

ProductDeleted This event is fired when a product is removed

  • Example:
This example shows you how to subscribe to this event

            //---- JAVASCRIPT:
            Client.Products.add_ProductDeleted(OnProductDeleted);
            
            function OnProductDeleted(productId) {
                print(productId);
            }
            
            //---- C#
            Client.Products.ProductDeleted += new ProductDeletedDelegate(Products_OnProductDeleted);
            ...
            
            private void Products_OnProductDeleted(long productId)
            {
                Console.Writeline(productId);
            }