Hi,
I have a problem similar as the one described here. As the conversation has been closed, I open a new one.
I'm using the editor to manage linked entities, like:
Both Status and Project are linked tables, like (in C#):
.LeftJoin("Statuses", "Statuses.Id", "=", "Main.Status_Id")
.LeftJoin("Projects", "Projects.Id", "=", "Main.Project_Id")
Everything works fine as soon as in creation (or in editing) both fields are filled. Is not possible to fill only one on these fields.
If only one filed is filled, then I get the following error: Conversion failed when converting from a character string to uniqueidentifier.
This can be seen for example in inline editing when I try to change only status:
editor.on( 'initEdit', function ( e, node, data, items, type ) {
console.log( 'initEdit', JSON.stringify( data ) );
} );
editor.on( 'preSubmit', function ( e, data, action ) {
console.log( 'preSubmit', JSON.stringify( data ) );
} );
Result is:
preSubmit {"data":{"row_1":{"Main":{"Status_Id":"ad4593bb-045f-455e-a1fe-01fd1a922468","Project_Id":null}}},"action":"edit"}
As printed in debug, Project_Id is null and this cause a problem.
If I try to modify a line where both status and project are already filled, everything works.
Can you please tell me how to set a field as not required?
Or what is the easiest solution to fix this?
Thanks!