I am writing a code for a checkbox(smylHexSpecIncomplete ) which when enabled should have to enable another check box(Blocked) in SalesOrderLine
I wrote following code for it :
if(salesline.smylHexSpecIncomplete == noyes::yes)
{
salesline.Blocked = noyes::Yes;
// I have also tried
salesline.Blocked = true;
}
At first i placed this code in the clicked method of smylHexSpecIncomplete in the design. But now i have placed it in Modified field method in SalesLine Table
But when i click on the first check box i.e smylHexSpecIncomplete , second one has no affect on it.
Please use the debugger to see if your code is called at all and what exactly happens there at runtime. Asking in forums isn’t a replacement for debugging.
I used the debugger and its setting the desired value but i am not able to get the changed done in my form and also i have used the Salesline_ds.refresh() in the checkbox (design part )
All right, so we now know that your code setting the value works and we don’t have to bother about it.
Now the problem can caused by two things:
- The value is saved, but not shown. Check if it’s saved to see if it’s the case.
- The value is set by your code, but overwritten by another logic later, and never saved.