Textbox Not Saving in C# Snippet Action Obsolete in SalesLogix

Question: When I click the ‘Save’ button for a text box I have in the C# snippet
action obsolete in SalesLogix it won’t save, even though the text box
works and shows a value.  Here is the code I’m using:

if(this.txtAirfare.Text == “” && this.txtTax.Text == “”)
double a = double.Parse(this.txtAirfare.

double b = double.Parse(this.txtTax.Text);

a = 0.0000;

b = 0.0000;
double a;
double b = double.Parse(this.txtAirfare.Text);
double c = double.Parse(this.txtTax.Text);
a = b + c;
this.txtTotal.Text = a.ToString();

Why is this happening?

Answer:  Update the entity, not the control.  Here is an example to get a reference to the current entity:


IAccount acc = (Sage.Entity.Interfaces.IAccount)this.BindingSource.Current;

acc.TOTALPROPERTY = a.ToString();

Additionally, if
txtAirFare and txtTax are properties of the entity, access them through the entity model as well.


Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!