Mattersphere Developers Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Custom SMS Empty Custom SMS

Mon 30 Mar 2020 - 8:16
I would like to send a SMS from the Add Appointment wizard. I've added a checkbox to the last page of the Add Appointment wizard. If checked the “Finish” button will launch the Create SMS wizard. I pass the file Id to the Create SMS wizard, which loads the associates for the particular matter.
How can I load the phone numbers for each associate, as the NumberList control type does not take DataLists. I can add a ComboBox and populate it on loading the associate ComboBox, but then lose the functionality to add a mobile number on the fly.
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Custom SMS Empty Re: Custom SMS

Mon 30 Mar 2020 - 8:16
The number list controls type is FWBS.OMS.UI.Windows.eNumberSelector which has a Reload method with a number of overloads that you can use to assign a contact and access their telephone numbers.
I haven't tried this but it looks like it will work. One thing to be aware of is that if any changes are made then the contact object will need to be updated to persist those changes.
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Custom SMS Empty Re: Custom SMS

Mon 30 Mar 2020 - 8:16
I tried your suggestion - although I am definately returning a valid contId on changing the associate combobox, it still does not load any values into the mobile number combobox.
My code is:
protected virtual void _assoc_Changed(object sender, System.EventArgs e) { FWBS.OMS.UI.Windows.eNumberSelector _numberOld = new FWBS.OMS.UI.Windows.eNumberSelector(); string p = Convert.ToString(EnquiryForm.GetIBasicEnquiryControl2(“_assoc”).Value); System.Windows.Forms.MessageBox.Show(Convert.ToString(p));
long q = Convert.ToInt64(EnquiryForm.GetIBasicEnquiryControl2(“_assoc”).Value);
_numberOld.Reload(q);
}
Any more suggestions - am I doing something wrong?
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Custom SMS Empty Re: Custom SMS

Mon 30 Mar 2020 - 8:17
You're constructing a new control when you need to get a handle to the control that is on the enquiry. Here is an example: FWBS.OMS.UI.Windows.eNumberSelector _numberOld = EnquiryForm.GetControl(“ctrlName”) as FWBS.OMS.UI.Windows.eNumberSelector;
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Custom SMS Empty Re: Custom SMS

Mon 30 Mar 2020 - 8:17
How do I access values stored in the System Configuration area, e.g the path for the SMS files.
At the end of the SMS wizard the document save wizard pops up. I can get the wizard to pop up, but it looks like you pass some special parameters - which parameters do you pass.
avatar
Lynne Harding
Posts : 335
Join date : 2018-12-20

Custom SMS Empty Re: Custom SMS

Mon 30 Mar 2020 - 8:18
In answer to you first question you can get the SMS directory with the following:
System.IO.DirectoryInfo dir = Session.CurrentSession.GetDirectory(“SMS”);
//and is configured in the AdminKit->System Configuration->Directories
Your second question gives me some concern though because the process to save a document is quite complex. Can you explain what your goals are? I had initially thought you were using the built in SMS generation routines and making a few changes.
How we handle SMS is that matter centre creates a file in a specific format in the SMS directory and then we have a service that monitors that location, sends the message(s) and moves the file(s) to a different location. So from my perspective you wouldn't need to alter anything inside matter centreyou need a service thatmonitors the directory. I'm not sure if this hadn't been explained to you or if your goals are different.
Matter centre also creates a separate document which is what is shown in the documents tab. It is this document that the document save wizard is storing but it has been created as part of the larger SMS generating code.
Sponsored content

Custom SMS Empty Re: Custom SMS

Back to top
Permissions in this forum:
You cannot reply to topics in this forum