10-17-2014 12:12 PM
Hi
I am trying to update the opportunity record which contains some validation rules/business rules. It is working fine when i update it from opportunity screen but if i update the opportunities from another entity using irepository the business rules are calling there which we dont want
In other words, how to update the record by avoiding the business rules/by avoiding the on before rules of an entity.
Please help.
Thanks,
jack
10-20-2014 01:13 AM
Hi,
If you want to update a record without the rules beeing fired you need to execute a hql update statement.
using (Isesson session = new SessionscopeWrapper())
{
string hql = "update myentity set value = 'test' where Id == 'abcde'");
Iquery query = session.CreateQuery(hql);
query.ExecuteUpdate();
]
I have writtent his down without santax check, but it gives you an idea how it works.
Alexander