BO method for Add new?

Which method will applicable on Selecting ‘Yes’ or ‘No’ for Vendor BO ??
i want to disable the creation of new vendor through this way (if not found the new ID)…and enable creation only with ‘New Supplier’ menu.
from File menu.

thanks …:slight_smile:

Use the trace log to find the method…:slight_smile:

Clicking on “no” doesn’t show anything different than yes, other than the trace continues.

Maybe Prakash could compare the methods called when a known supplier is entered, to those called when a known supplier is not entered, then something different between the two cases could trigger his error BPM.

1 Like

Problem with trying to avoid that message is that it is baked into the code on change of that controls:

public bool ValidateKeyField(EpiTextBox tb)
{
  //a bunch of system code here.... omitted

    if (!this.isNewRow("VendorDetail") && !this.GetByVendID(text))
    {
        base.SetCurrentEvent(TransactionEvent.AddNewOnPrimaryKey);
        if (this.GetNewVendor())  /* <----     this guy here  */
        {
            tb.Text = text;
            return flag;
        }
        flag = false;
        tb.Text = this.KeyField;
        this.undoChanges();
    }
    return flag;
}

1 Like

Hello @Prakash6738,

Just out of curiosity, what are you trying to accomplish? Is this a way to manage Security? To prevent mistaken records?

Mark W.

I have created a BPM to create auto incremental VendorID, if any user create a new user by this way as @MontyMan said (Good guess :wink: ) ,i want to restrict the creation. Because the auto increment BPM will fail…as the next ID is already defined in User Code setup.

Thanks

And the unknown vendor may be any one…the auto increment BPM wil lost the sequence if below is condition,
Last Vendor ID : 500
next ID -As per my BPM : 501
User creates a new ID : As you said…lets say 505 (becoz its not exists in Vendor table)

It will lost my pre-defined sequence…

Clicking on ‘Yes’ will allow you to create new vendor , and ‘No’ keep the screen as it is.

I meant what the trace shows. The trace doesn’t show you a method to call for “no”

Yes, few minuets before i found that…found other method for this yes/now… will let u know…

Thanks