Delete values of list properties catalog.productPropertyEnum.delete

We are still updating this page

Some data may be missing — we will fill it in shortly.

Scope: catalog

Who can execute the method: any user

Description

catalog.productPropertyEnum.delete(id)
        

This method deletes values of list properties. If the operation is successful, true is returned in the response body.

Parameters

Parameter

Description

id
integer

Identifier of the list property value.

Required parameters are marked with *

Examples

try
        {
        	const response = await $b24.callMethod(
        		'catalog.productPropertyEnum.delete',
        		{
        			id: 42 // Specify the ID of the value to be deleted
        		}
        	);
        	
        	const result = response.getData().result;
        	if (result.error())
        		console.error(result.error().ex);
        	else
        		console.log(result);
        }
        catch( error )
        {
        	console.error('Error:', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'catalog.productPropertyEnum.delete',
                    [
                        'id' => 42, // Specify the ID of the value to be deleted
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            if ($result->error()) {
                error_log($result->error()->ex);
            } else {
                echo 'Success: ' . print_r($result->data(), true);
            }
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error deleting product property enum: ' . $e->getMessage();
        }
        
BX24.callMethod(
            'catalog.productPropertyEnum.delete',
            {
                id: 42 // Specify the ID of the value to be deleted
            },
            function(result) {
                if (result.error())
                    console.error(result.error().ex);
                else
                    console.log(result.data());
            }
        );
        

How to Use Examples in Documentation