Adding Fields on the Head view

Good Day

On the service call center there is a field called Phone.


This field brings through the phone number on the customer contract entry.

However I require the Cell Phone number to come through to the Phone field on the service call center

That would mean I would like the 0975436789 value to be shown in the Phone field and not the 124.

I have looked up in the Headview where the phone epibinding is currently and there is no cellphone number column. I was wondering if it is possible to add a column or table so we can reference that field?

Kind regards
Rehaan

If you don’t need both, you could make a BPM that substitutes the Cell Phone for the main phone, when the record is retrieved. Even check if cell phone exists, and if it doesn’t then return the main phone (like it does by default).

And I just noticed that you desire the cell phone from a specific Customer Contact. Is that contact specified anywhere in the Service Call Center header?

1 Like

Thanks Calvin.

I was hoping there was a way we could do it without having to go the BPM route. I was hoping we could add the required fields on the HeadView as it make no sense why that field would not be present.
The reason for me not doing it via a BPM is adding the UD field which we are trying to limit on this project.

This clears it up for me to know that fields cannot be added on the view and will needed to be done via the BPM.

Yes it is specified in the attn section just below the Sold To customer

I didn’t say you couldn’t add a column to a view. It’s just that BPM’s are generally preferred.

If you want both phone #'s (main and cell) on the form then you would need to customize it anyway. And then you might as well do it all in the customization.

My suggestion would just substitute the cell phone for the main phone, in the data that is sent to the form to be displayed. It would never actually create any new data.

How would I go about doing the customisation?

To just add the column to the data view, use the Form Event Wizard to make a handler for EpiViewNotification, and your desired View. In my example it is on the POHeader of the PO Entry form.

image

The wizard will make the function, which you should then change to something like:

private void edvPOHeader_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
	{
	// ** Argument Properties and Uses **
	// view.dataView[args.Row]["FieldName"]
	// args.Row, args.Column, args.Sender, args.NotifyType
	// NotifyType.Initialize, NotifyType.AddRow, NotifyType.DeleteRow, NotifyType.InitLastView, NotifyType.InitAndResetTreeNodes
	
	if ((args.NotifyType == EpiTransaction.NotifyType.Initialize)){
		if ((args.Row > -1)){
			if (!(edvPOHeader.dataView.Table.Columns.Contains("CellPhone"))){
				edvPOHeader.dataView.Table.Columns.Add(new DataColumn("CellPhone"));
				edvPOHeader.dataView.Table.Columns["CellPhone"].ExtendedProperties["ReadOnly"] = true;
				txtCellPhone.EpiBinding = "POHeader.CellPhone";
				}
			}
		}
	}

Take note that the NotifyType was changed from what the wizard creates.

This requires that you added the textbox first (its txtCellPhone in my example).

All that does is add the coulmn to the dataset and bind the text box to that column. You still need to set the value of that column. How do you plan on fetching the particular Cust Contanct?

The plan for fetching the particular cust contact would be when I select on the dropdown