Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > How do I find a customer using UUID?


Search UsersRules
How do I find a customer using UUID?
Just came
Points:: 0
Joined:: Oct 9, 2018


There are two catalogs.
Catolog1: CustomerName, CustomerCountry
Catolog2: RefCatolog1, CustomerEmail

I want to add a record to the second table with the web service.

The application steps are as follows:
1- User logs in to the application.
2- The customer reference area is searched from the catalog. (Ref)
3- The UUID value is transferred to a variable.

The steps I want:
1- Sending records with web service.
2- Find the customer from UUID.
3- Adding records to catalog 2.

kayitref =
catalogs.catolog1.findbyattribut to (xxxx

How do I find a customer using UUID?

Active user
Points:: 0
Joined:: Jul 3, 2013

Hi Erdoğan Uğuz!

You can function GetRef() to get a CatalogRef by value UUID
Customer = Catalogs.Customers.GetRef(New UUID("134f908b-67f1-11e5-80c4-d4ae52ba0811"));

Just came
Points:: 0
Joined:: Oct 9, 2018


I do it this way.
I can't reach line values.
It gives an error.


Customer = Catalogs.Customers.GetRef(New UUID("134f908b-67f1-11e5-80c4-d4ae52ba0811"));

findedrow = Customer.ref.GetObject();

varcustomerdesc = findedrow.Description; // ?? error

Points:: 0
Joined:: Dec 4, 2017

Dear Erdoğan Uğuz,

Here is an infobase copy (.dt) of a sample that illustrates the behavior you mentioned:!yGQTVaRA!V7ttIjQijk6vtLTvvpT6AvCY2KM638mBfwt2nnof9VA

Best regards,
Vladimir Gurov

Just came
Points:: 0
Joined:: Jan 5, 2016

Erdoğan Uğuz,

GetObject() return Undefined if GetRef(UID) didn't find object in db.
Another word, GetRef() by UID, that don't yet in db, gives you a new kind of Ref.
That why, you need to check searching result by condition:
Catalog1Ref = Catalogs.Catalog1.GetRef(New UUID(Catalog1UUID));
If Catalog1Ref.GetObject() = Undefined Then
   //Can't find the reference with UUID...

By the way, the condition "ValueIsFilled(Catalog1Ref)" will always be true.


© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.