Making a particular Sales Line non-editable

jks
jks Member Posts: 277
Hi all,

I want to make a entire Sales Line on the Sales Quote non- editable if SalesLine.Type = G/L Account. For any other Type Sales Line should remain editable.

How can I achieve this??

Thanks for any help.

Comments

  • kriki
    kriki Member, Moderator Posts: 9,127
    You can try to do it on the OnGetCurrentRecord:
    Currform."field".EDITABLE(Type <> Type::"G/L Account");
    
    BUt you need to put it on each field.

    So, I would try to let it editable and block the modification in the "Form - OnModifyRecord() : Boolean"-trigger.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • jks
    jks Member Posts: 277
    Thanks.
    It works.