ActivateField on a PicklistBusComp
Hello,
I'm currently working on an application where I can see 2 ways to search a record in a PicklistBusComp
Here is an example :
function setFieldFromPickListApplet()
{
var bcRandom = this.GetPicklistBusComp("Some Field");
bcRandom.ClearToQuery();
bcRandom.ActivateField("The name of some field in the PicklistBusComp");
bcRandom.SetSearchSpec("The name of some field in the PicklistBusComp", "a value of some field");
bcRandom.ExecuteQuery(ForwardOnly);
if(bcRandom.FirstRecord()){
bcRandom.Pick();
}
}
Do I need to use ActivateField before doing the SetSearchSpec with bcRandom.ActivateField("The name of some field in the PicklistBusComp") ?
What is the best practice ?
Thanks a lot for your time.
Regards,