New Tab Customer - save button

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 年 前
Hi,

My plug-in has created a new tab at customer info. Can I also save data via the Save button or do I have to create my own save button?
6 年 前
ksprovis.net wrote:


Can I also save data via the Save button or do I have to create my own save button?


Yes you can use save button and access your data via actionfilter or you can add your own save button as well.

Let me know if you need any help.
6 年 前
nopSquare wrote:


Can I also save data via the Save button or do I have to create my own save button?

Yes you can use save button and access your data via actionfilter or you can add your own save button as well.

Let me know if you need any help.




Thanks for the reply.
Do you have an example?
6 年 前
Hi,

With "filterContext.ActionParameters" I can read the values. But how can I read my new tab values?
6 年 前
public override void OnActionExecuting(ActionExecutingContext filterContext)
        {}

Does anyone have an answer how I can access the fields of the model in my new tab?

Thanks
6 年 前
ksprovis.net wrote:
public override void OnActionExecuting(ActionExecutingContext filterContext)
        {}

Does anyone have an answer how I can access the fields of the model in my new tab?



Use this line

var value= filterContext.Controller.ValueProvider.GetValue("variableName").AttemptedValue;

Here variableName is your variable name.

Let me know it's working or not.
6 年 前
nopSquare wrote:
public override void OnActionExecuting(ActionExecutingContext filterContext)
        {}

Does anyone have an answer how I can access the fields of the model in my new tab?



Use this line

var value= filterContext.Controller.ValueProvider.GetValue("variableName").AttemptedValue;

Here variableName is your variable name.

Let me know it's working or not.



I'm getting this error. What did I forget?
Object reference not set to an instance of an object.
6 年 前
It's likely that GetValue("variableName") is not finding "variableName", but any one of these might be returning null, so you need to debug to see which
filterContext
Controller
ValueProvider
GetValue("variableName")
6 年 前
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
How can I retrieve my data model from the new tab?
}
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.