Dans le Onload du formulaire, insérer le code suivant :
crmForm.all.hab_bouton_c.style.display = 'none' crmForm.all.hab_bouton_d.innerHTML = ""; ButtonClick = function() { alert('Hello!'); }
On obtient un bouton qui contient un événement onclick.
crmForm.all.hab_bouton_c.style.display = 'none' crmForm.all.hab_bouton_d.innerHTML = ""; ButtonClick = function() { alert('Hello!'); }
private void prvLectureContacts() { CrmConnection connection = new CrmConnection("Crm"); OrganizationService loService = new OrganizationService(connection); ServiceContext loServiceContext = new ServiceContext(loService); WhoAmIRequest loRequest = new WhoAmIRequest(); WhoAmIResponse loResponse = (WhoAmIResponse) loService.Execute(loRequest); var loRequet = from c in loServiceContext.ContactSet where c.FullName == txtRecherche.Text && c.OwnerId.Id == loResponse.UserId select c; cbResultat.Items.AddRange(loRequet.ToArray()); cbResultat.DisplayMember = "fullname"; }
private void buInsererAdresse_Click(object sender, EventArgs e) { poRange = Globals.ThisAddIn.Application.ActiveDocument.Content; try { string lsAdresse = ((Contact)cbResultat.SelectedItem).FullName + "\n" ; lsAdresse += ((Contact)cbResultat.SelectedItem).Address1_Line1 + "\n"; lsAdresse += ((Contact)cbResultat.SelectedItem).Address1_PostalCode + " "; lsAdresse += ((Contact)cbResultat.SelectedItem).Address1_City + "\n"; poRange.InsertAfter(lsAdresse); } catch { } }