V
V
Victoria Erofeeva2021-04-24 14:05:45
1C-Bitrix
Victoria Erofeeva, 2021-04-24 14:05:45

How to set a reference type property for an infoblock element via the Bitrix API?

Could you please tell me how to set a lookup type property when creating an element, so as to associate a product (infoblock element) with a specific entry in the block's highload list?

There is a catalog of goods, it is necessary to create new goods in the code, having received data from a CSV file. Goods have a Material property - PR_MATERIAL of the reference type stored in the highload block Material

. This is how the PR_MATERIAL property is displayed in the settings of the goods catalog infoblock

6083fae229d21484555282.jpeg

. How to do it?

6083faef6545f351638750.jpeg

Which field of the highload element of the block should be used to link: ID, external code (UF_XML_ID)?

This is how the highload fields of the Material block look like, the external code is UF_XML_ID
6083fb0007538549313388.jpeg
The highload table of the Material block is called b_hlbd_material

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question