Page 1 of 1

HookAddCode Request

Posted: Mon Jan 18, 2016 2:08 am
by pid_user
Please do help add HookAddCode as shown below on FormSmsTextMessaging at the end of FormSmsTextMessaging_Load

Code: Select all

		private void FormSmsTextMessaging_Load(object sender,EventArgs e) {
			gridMessages.ContextMenu=contextMenuMessages;
			if(!PrefC.GetBool(PrefName.EasyNoClinics)) {//Using clinics
				labelClinic.Visible=true;
				comboClinic.Visible=true;
				comboClinic.Items.Clear();
				_listClinics=Clinics.GetForUserod(Security.CurUser);
				for(int i=0;i<_listClinics.Count;i++) {
					comboClinic.Items.Add(_listClinics[i].Description);
					comboClinic.SetSelected(i,true);
				}
			}
			textDateFrom.Text=DateTimeOD.Today.AddDays(-7).ToShortDateString();
			textDateTo.Text=DateTimeOD.Today.ToShortDateString();			
			checkSent.Checked=IsSent;			
			checkRead.Checked=IsReceived;
			FillGridTextMessages();
                        Plugins.HookAddCode(this,"FormSmsTextMessaging.Load_end");
		}

Re: HookAddCode Request

Posted: Mon Jan 18, 2016 10:18 am
by jsalmon
Hook added and will be released with v15.4.21

Re: HookAddCode Request

Posted: Mon Jan 18, 2016 5:49 pm
by pid_user
jsalmon wrote:Hook added and will be released with v15.4.21
THANK YOU!

HookMethod Request

Posted: Mon Feb 15, 2016 9:45 pm
by pid_user
Please do help add HookMethod in FormSmsTextMessaging in butReply_Click method
try {
if (Plugins.HookMethod(this, "FormTxtMsgEdit.SendText_Start2", patNum, mobileNumber, textReply.Text, YN.Yes))
{
goto customsmscall;
}
SmsToMobiles.SendSmsSingle(patNum,mobileNumber,textReply.Text,clinicNum);
}
catch(Exception ex) {
MessageBox.Show(ex.Message);
return;
}
customsmscall:
textReply.Text="";
FillGridMessageThread(patNum);
}

Re: HookAddCode Request

Posted: Tue Feb 16, 2016 10:37 am
by allends
This has been added to 15.4.31.

I changed a few names to better follow our patterns.
try {
if(Plugins.HookMethod(this,"FormSmsTextMessaging.butReply_Click_sendSmsSingle",patNum,mobileNumber,textReply.Text,YN.Yes))
{
goto HookSkipSmsCall;
}
SmsToMobiles.SendSmsSingle(patNum,mobileNumber,textReply.Text,clinicNum);
}
catch(Exception ex) {
MessageBox.Show(ex.Message);
return;
}
HookSkipSmsCall: { }

Re: HookAddCode Request

Posted: Tue Feb 16, 2016 11:53 am
by pid_user
[quote="adearmondsattler"]This has been added to 15.4.31.

I changed a few names to better follow our patterns.

[quote]

THANK YOU!

Re: HookAddCode Request

Posted: Fri Feb 19, 2016 9:40 am
by nathansparks
I would caution that this may not the best place for a hook. If you are not using the Open Dental built in texting, this form is not the right place to be putting your text messages. You should hook in to the patient level send text button perhaps, but this form is specific to Open Dental two way texting service. If a customer is using some other texting service, this window should probably not be used. Our staff will not know that it is not Open Dental texting and possibly give bad advice. You could make something similar, but in future versions it probably will not show if Open Dental texting is not turned on. There will be functionality that will be specific to our services and we would not expect you to be putting incoming text messages into the table or using that form for displaying the text messages.