Hi Kevin.
As you know, deleting of records, is a very specific thing, in my understanding it is an exceptional capability.
The normal way to let records vanishing is to deactivate them.
Without knowing the business background for this delete request and the pressure behind it, I suggest not to publish a solution if one is known.
It will open the door to data inconsistency and chaos, as people don't be aware of what they do, sometimes....
just my 2 cents.
Kevin, start thinking about deactivating records. This might fulfill your requirement as well.
And if you really have concerns regarding the number of records in your custom table, think about archiving and purge.
kind regards.
.....Michael
------------------------------
Principal Services Consultant
HCL Enterprise Studio
Germany
------------------------------
Original Message:
Sent: 09-17-2020 12:46 AM
From: Kevin Christopher Chacon Campos
Subject: Add delete to custom table list
Hi, I've been trying to add a delete option to a custom table list on the same way it's done for cr_prptpl, so far I have been able to add the option itself on the menu and invoke a custom function which performs an ajax call with the following values
SID=<auto-populated with cfgSID>+FID=<auto-generated with fid_generator()>+FACTORY=zmytable+WHERE_CLAUSE=id=<id from list>+OP=DELETE_RECORD_AJAX
This returns an error with the not helpful message "ERROR", checking the schema I see cr_prptpl has a method delete_wc( object|nil, string, long ); I've added this to my custom table and get this error in sdm logs: mods\majic\wsp.mods:930 syntax error, unexpected YACC_STR at "long"
Investigating, I found a definition for delete_wc as follows delete_wc(string, string, object|nil ) ; I've changed it for my table and sdm starts ok, but still the same error when attempting to delete from list.
I'm guessing I need to add an specific definition of delete_wc to the methods, but I haven't found any information online, if someone knows how to do this, I'll highly appreciate the information.