I have a customization in this class where createFromAgreementLine will not have a value instead of that another buffer will have the data. Now my process is working fine, But while running the default class this point is throwing error. I have written all the logics before next call. Please anyone give me some idea to skip this.
Hmm, how is a value of a variable related to whether the method is called inside a transaction or not?
Hi Martin,
I wrote this to be executed only if the default buffer don't have a value while executing. On this scenario also will it affect like what u said?
You shouldn't throw info and warnings.
Also, it means that this logic will always fail when anyone calls it from inside a transaction, because it'll roll back the transaction.
Hi All,
I have solved that problem in another way by doing all the default process in the method which I am extending and at the end I just throw a info which is default message. I don't know weather its a correct practice or not but this worked for me and the process happening by the extended class is working perfectly. For sample, I have attached a image. If this should not be like this, Suggest your opinion.
Anyhow to execute your code the standard should run. The standard variable is giving error. As this buffer is not used now I guess it is not all used for your total development. But can you please confirm if this table buffer is not at all used anywhere and only your coc should be used? If yes, you can do in this way.
This buffer is coming from some other method. As you said so if this buffer won't have value, then you can extend that method from where the present method is getting value and in that try assigning a value like 1 for that buffer rec I'd explicitly after next call as it won't have the buffer at all and not at all used anywhere. As it will have some value like 1 this validation would be skipped. But make sure it should not be used anywhere else.
Hi Anoop,
You are correct in your understanding. As I don't know your exact requirements, it was just a thought.
Hi André Arnaud de Calavon,
This PurchAutoCreate_ReleaseFromAgreement class is used in some other classes too while finding reference. If I am creating new class with same functionality, then I have to replace on those classes too right. I hope that will be huge process then.
Hi Anoop,
There is another workaround. Instead of using the PurchAutoCreate_ReleaseFromAgreement, you can copy this class and call the new class from your process.
Hi Anoop,
createFromAgreementLine is defined outside this method, check if you can get a buffer of this using any other method and pass the same into your code.
Hi Anoop,
There is no other way to bypass the standard validation unless you pass the values to createFromAgreementLine buffer.
You must pass the buffer to createFromAgreementLine buffer to solve this error.
Thanks,
Girish S.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156