Order Release Customization

I am trying to change a field in specific releases of the order entry module. I tried to change the release field using
edvOrderRel.dataView.Table.Rows[edvOrderDtl.Row][“UD_releasecomments_c”] = thisValue;

but it doesnt seem to work very well, sometimes only changing the values in the previous release, or release number 1 of a line.

Would somebody be able to let me know how I can change a field in an order release?

Thanks!
Elvin

When do you need to change it?

I added a UD checkbox in the release table, and when this checkbox is changed from false to true, I would like to change the value of this text field and then set the field itself to read only afterwards.

Elvin

You are referencing the line and not the release in the above. I think you need to change it to edvOrderRel.Row

1 Like

After Field Change Event on OrderRel
Simply Set.

args.Row["UD_releasecomments_c"] = "Your Value";
1 Like

I will try the above suggestions!

Thanks for the quick response!
Elvin

When I change it to OrderRel.Row it changes the values on the first line of the order instead of the line i was on.

Use the After Field Changed Event.

Do you know how I would check if args.Row[“UD_releasecomments_c”] is true?
I only want the code to fire only if the checkbox is checked to true.

I tried if (args.Row[“UD_releasecomments_c”] == true) but the compiler does not like it
Elvin

You probably just need:

            If(ars.Row["UD_releasecomments_c"])
            {
                            Do whatever;
            }
1 Like

Mark, it gave me this:
Cannot implicitly convert type ‘object’ to ‘bool’. An explicit conversion exists (are you missing a cast?)

Do this:

if( Convert.ToBoolean(args.Row[“UD_realeasecomments_c”] )
Do stuff;

1 Like