Skip to main content
Solved

My customize code working fine but when we use software more a week

  • 3 January 2024
  • 3 replies
  • 41 views

Forum|alt.badge.img

My customize code working fine but when we use software more a week, this block of code stop working. But if we restart IIS service, it start working gain. Could you advice how to do it

 

Best answer by Naveen Boga

@vannakheng66  Have you checked the Request Profiler and reviewed the Resource Usage when using this screen?

 

In my experience, memory leaks can lead to this issue. We need to identify the specific code block causing the problem and address it.

 

 

View original
Did this topic help you find an answer to your question?

Naveen Boga
Captain II
Forum|alt.badge.img+19

@vannakheng66  Have you checked the Request Profiler and reviewed the Resource Usage when using this screen?

 

In my experience, memory leaks can lead to this issue. We need to identify the specific code block causing the problem and address it.

 

 


Forum|alt.badge.img+5
  • Captain II
  • January 3, 2024

You should also add some logging code into your catch block. If there are errors happening that haven’t been trapped within the try block then who knows what is going on in there.


Leonardo Justiniano
Jr Varsity I
Forum|alt.badge.img+5

Hi @vannakheng66 

I would suggest make sure your current object pointer is what you expect. Take a look at

Inserting record in the cache

Make sure you are inserting considering your primary key. For Reason Codes is the ReasonCodeID. Then explicitly assign your view’s current pointer.

ReasonCodeMaint instance = PXGraph.CreateInstance<ReasonCodeMaint>();

instance.reasoncode.Current = instance.reasoncode.Insert(new ReasonCode() { ReasonCodeID = this.boqView.Current.BOQCode + "I" });
...

Also when you get the extension you do not need to save before that. You can save just once at the end of the block. Basic DAC and its extensions are part of the same DB record.

 

Hope this helps.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings