function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dkndkn 

Visualforce page--Help needed..!

My org is an student enrollment application.I have an contact object, application custom object and recommender custom object and admissions custom object to name a few.When a student fills the contact details , automatically an application is generated for that particular student which has all the application details.And the application object has an related list admission document which has an document name and document status like statement of intent , letter of documentation etc...which is a pick list.And the document status has a pick list of required, read for approval etc...

I need to create an recommender email address in the application object such that as soon as the student fills his application with the recommender's email address ,an email shoots to the recommender saying that that particular student is requesting an letter of recomendation.Over here the recommender is the professor who will be recommending the student.And in the email the professor should click an link , which takes him to the visual force page with all the details.( all the fields related to the recommender and applicant name) , So, I have created an recommender object which is a related list of application.So, that when a professor enters a data, it creates a record.Now, the issue is I need to get the student name automatically populated in the visual force page such that he knows to which student he is recommending.And second issue is I need to get the recommender object record to be created/inserted to that particular students application.And the third issue is I need to get the document name changed to letter of recommendation as soon as the recommender object record is created in the student's application object. Over her, recommender object and admission document object are not related to each other , Although they are related to applications object. These are my issues .I would really appreciate any help in solving me this problem.
Now, i have done is created a trigger , such that when an recommender's email address is entered in the field of application an related recommender object is created with application ID and applicant name populating automatically...
Now,
to populate the applicant name in your VF page first I need  to insert the applicantId into the Recommender object Lookup filed. This will be done into the same trigger which I  created for the  Recommender record.

 

Now I have to  pass the Recommender Id into your Site VF page URL. This link will be into the Emial.

 

https://<your company doman> /<yourVF Page Name>?Id=< Recommender Id >

 

Now i need to write a  class controller to get this Id

 

My classConstructor()

{

String Id= Pagereferce.get(“Id”)

 

//Then select the Recommender record

Recommender rd=[Select id, name,xyz… from  Recommender__c ]

}

I am not able to get hold of the exact logic and syntax....please..please guide me...
I am lost after this ...I need to pass the ID onto the URL ..So, that I can put a link in the email template....but how ???I am totally lost here...need help ...
thank you

 

Ispita_NavatarIspita_Navatar

First your controller code:-

public class MyclassConstructor {

 String RecId;

 

public MyclassConstructor()

{

RecId= ApexPages.currentPage().getParameters().get('id');

//Then select the Recommender record

Recommender rd=[Select id, name,xyz  from  Recommender__c  where id=:Recid];

 

  OR


Recommender rd=[Select id, name,xyz  from  Recommender__c  where id:ApexPages.currentPage().getParameters().get('id')];

}

}

 

Now your question of link in the email template try that through a formula field for that try the following formula field:-

HYPERLINK( "https://<your  company doman> /<yourVF Page Name>?Id="+ Id ,"",_BLANK)

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.