You need to sign in to do that
Don't have an account?
Jose María Nicolás Arfelis
Checkbox should be filled automatically when comparing two objects
Hi all,
down vote favoritewe have the object Preinscripción containing records about which Postgraduate course someone applied for and paid. It contains the Name of the Applicant, the Postgraduate Course, the Identification Number, Status of the Preinscripción and a checkbox indicating whether a record with the same values Name of Applicant, Postgraduate Course and Identification Number exists or not in another object, the object Admission.
For example, let's say I have a record with data Name Pepe Flores, Postgraduate Course Cardiovascular Medicine, ID Number 1234567 in the object Preinscripción, if these values are also contained in the same fields in the object Admission, the checkbox should automatically be checked or populated.
Is it possible to make that work? is coding needed?.
down vote favoritewe have the object Preinscripción containing records about which Postgraduate course someone applied for and paid. It contains the Name of the Applicant, the Postgraduate Course, the Identification Number, Status of the Preinscripción and a checkbox indicating whether a record with the same values Name of Applicant, Postgraduate Course and Identification Number exists or not in another object, the object Admission.
For example, let's say I have a record with data Name Pepe Flores, Postgraduate Course Cardiovascular Medicine, ID Number 1234567 in the object Preinscripción, if these values are also contained in the same fields in the object Admission, the checkbox should automatically be checked or populated.
Is it possible to make that work? is coding needed?.
l.Estado_de_Solicitante_en_Admision__c = conlist[0].Estado_del_alumno__c;
My Recommention : Trigger is not bulkified.. current trigger will support one record at time. Please try to bulkify the trigger to support multiple records.
All Answers
try this:
Thanks
Ankur Saini
http://mirketa.com
You can build trigger, If you have exact matching rule to identify the admissiona for Preinscripción. If you do then system will partially create link Admission and Preinscripción.
For Example :
Admission :
Name of Applicant Postgraguate Cource Email
Jose Medicine jose@hotmail.com
Preinscripción
Name of Applicant Postgraguate Cource Email
Jose jose@hotmail.com
Above scenario trigger will not find matching. If the business ok to partial data have assocation then you can build trigger based on matching rule.
If we use the trigger to find the matched records using the rule:
- Find me the records which have the same Name of the Applicant, Postgraduate Course, Email address and Identification Number in the object Admission as they are in the object Preinscripcion.
- If you find records set the checkbox Admission exists? of the corresponding Preinscripcion record to true
Trigger suggested by Ankur, would work right?
I am trying now to set the value of the picklist Estado_de_Solicitante_en_Admision_c for object Preinscripcion to the value found in the picklist Estado_del_alumno_c in the object Admission but I get the error:
the error is pointing to the code line:
can please somebody give me some tips to amend this?
l.Estado_de_Solicitante_en_Admision__c = conlist[0].Estado_del_alumno__c;
My Recommention : Trigger is not bulkified.. current trigger will support one record at time. Please try to bulkify the trigger to support multiple records.