When trying to firm the kanbans by dragging a Kanban card to a date on the Kanban schedule board, the below error is occurring.
The weird thing noticed was, when image is getting inserted into SysImageTable, the dataareaid is 'DAT" rather than “XX” (company dataareaid).
how to fix this?
SysImageTable is not a company specific table. Look at the SaveDataPerCompany on that table. It is set to No, so the data will not be stored per company.
The error (cannot create a record) is due to the violation of unique index.
Here is the table index
name field is always unique. language and theme are blank for all records.
below is the code where a record is getting inserted
I am getting clueless here as everything looks fine for me. but an error msg is thrown
The newGuid() function will generate a unique identifier. Not sure what is happening in your case.
For testing can you check, if that same GUID exists before the insert (use a select ).
The newly generated GUID does not exist in the table before insert.
Here is the modified code:
info(‘Record already exists’);
there is no existing record and the cursor goes to the ELSE statements.
Validatewrite() is true so, It tries to insert but throws the same error.
Do you know where these image settings exist? Is there any setup issue from kanban side or images side that’s making it throw the error.?
we may have to think about this differently to figure out why that error occurs.
I haven’t worked with the kanban functionality before. I am not even sure, why would it create a record in SysImageTable table.
Never mind, i can see the below call in \Forms\KanbanBoardSchedule\Methods\kanbanJobScheduleUpdated
SysTaskRecorder_Eventing::fire_UserSpecified(strFmt("@SYS4002409", kanbanJobId, plannedPeriod), kanbanJobSchedule);
Can you just try executing this job?
static void test(Args _args)
imgNameSuffix = newguid();
imgName = #imgImagePrefix + guid2str(imgNameSuffix);
images.Name = imgName;
The index violation problem is with recid.
In systemsequences table (dat ) company, there is a record for sysimagetable (tabid = 843). the nextVal field value must always be one greater than the maximum recid value of sysImagetable. i.e. newly inserted record will have nextVal recid.
in my system, the value is less than the maximum recid. so a record already exists in sysimagetable with a value less than maximum recid.
for e.g. max recid in SysImagetable is 5637155861. But in Systemsequences table, if nextVal is 5637149086. Then a new record cannot be inserted because a record with recid 5637149086 already exists in SysImageTable.
I have updated the nextval as required and it solved the problem.
Thanks Kranthi for all effort you have taken in understanding and debugging the issue.
That is unusual. The RecId generation is handled by the kernel.
Glad, you were able to identify the issue.