Bonjour,
Je dois faire un test pour une classe que vous trouverez ci-dessous mais je ne m'en sors pas.
Pouvez-vous m'aider ?
Code JAVA : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 public with sharing class variable { public variable(ApexPages.StandardController controller) { } Contact contact; public String conid = ApexPages.currentPage().getParameters().get('CF00NJ00000015FEb_lkid'); public Contact getContact() { Integer counter = [ Select count() from Contact where id = :conid ]; if (contact == null){ if (counter==1) { contact = [select Account.name from Contact where id = :conid]; } else { contact = null; } } return contact; } }
Merci d'avance
Partager