Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Bronze Super Contributor
Posts: 141
Registered: ‎02-22-2010

SLX 7.5.4 .. Update a record by avoiding business rules

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

 

Highlighted
Silver Contributor
Posts: 1,262
Registered: ‎04-08-2009

Re: SLX 7.5.4 .. Update a record by avoiding business rules

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