 Hello everyone. I am Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video I'm going to give you an idea like what is the difference if we import references to fields while using wire decorator to get the data and versus if what if we use field through string. So let's jump to Visual Studio code. So here like in my previously explained videos I demonstrated you how to import references of fields. So these two statements are for them. So we imported these references and like if I want to use these references so I can use this name field and phone field. And here I have used this field API as string, right? So if I remove this string, so what I can do, I can write name underscore field, right? And I need to uncomment this. So anytime you can import the references and use them like this. So if you import references of fields, then you can use them with the help of this identifier. Identifier name can be anything. So you can use them if you want to pass the data using this wire decorator. If you don't want to use these services, so what I'm doing, I'm just doing undo. So this way like these two statements are coming now. So they are not making any sense in this code. And we are using account dot name and account dot phone directly with the help of string, right? So if you watched the previous video, so you might be thinking like what is the difference when to use which file? Can we use account dot name, account dot phone or any other field API directly within single quotes or do we need to import their references and then we can use them? So let's understand the difference like what if you use references and what if you use API names directly with the help of string? So why to import references to Salesforce objects and fields? So when I will be explaining and discussing this, so you will automatically get an understanding. So when you use a wire adapter in a lightning UI as stress API, so here actually we use lightning slash UI record API, right? So other modules are also available. So when you use a wire adapter in a lightning UI as stress API module, we strongly recommend importing references to objects and fields, right? Why so? Because Salesforce verifies that the objects and fields exist, prevents objects and fields from being deleted and cascades any renamed objects and fields into your components source port. It also ensures that dependent objects and fields are included in chain set and packages. So this is the benefit like if you import references of particular field with the help of this statement import statement. Now going forward, importing references to objects and fields ensures that your code works even when object and field names change. If a component isn't aware of which object it's using, use strings instead of imported references, use get object info to return the object's fields. All wire adapters in the lightning slash UI as stress API modules, respect object grad rules, grad means create, read, update and delete, field level security and sharing. If a user doesn't have access to a field, it isn't included in the response. So this is about this wire service that we use. So now if you want to see another examples like can we import custom objects. So in this example, we just imported standard fields like standard objects, standard fields. Now, if you want to import object reference, so you can do that like position underscore underscore C, if you want to import standard object that you can do, then you can you can have the like labeling. Sorry, you can have custom object custom field position underscore underscore C dot level underscore underscore C. So here level fields reference will be imported then account dot name we already saw. Then if you want to use a relationship field, so that is also possible custom as well as standard. So this way you can import references to objects fields, maybe it can be standard or custom, right, and you can use relationship fields as well here. So this way, I hope you understood the difference like when to use references and when to use APIs directly with the help of simple quotes. So now you can decide like which way to go, whether to import the references of fields or to use them directly. So it is recommended like you import the references so it is safe. And in some scenarios you may be using these APIs directly as well. So this is all about the difference between importing references to fields and like using fields to string. So now if you watch the previous videos again so you will be having clear understanding like these two ways are available and which one we can use here.