![]() |
Checkin Trigger Script: snapshot['metadata'] is null (although it shouldn't) - Printable Version +- TACTIC Open Source (http://forum.southpawtech.com) +-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3) +--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4) +--- Thread: Checkin Trigger Script: snapshot['metadata'] is null (although it shouldn't) (/showthread.php?tid=257) |
Checkin Trigger Script: snapshot['metadata'] is null (although it shouldn't) - stefanovilla - 04-07-2022 Hello there, I've been trying to useĀ checkin triggers but I run into the following problem. Although snapshot's 'metadata' information is set at 'checkin' time (and properly displayed when, later on, I access to the DB), it becomeĀ 'Null' when I read the snapshot data as they became available within the trigger script: As a matter of fact, in the trigger script, when I access to input['snapshot'] or input['update_data'] (which is the same thing), the 'metadata' content is empty!! Is there a way to have 'metadata' field properly set when trigger script is executed? Or, is there any other way to pass arguments at 'checkin' time (i.e.: simple_checkin()) so that they are available when the trigger script is executed? Many thanks, regards, Stefano RE: Checkin Trigger Script: snapshot['metadata'] is null (although it shouldn't) - listy - 04-13-2022 Hi! Is there something like input['kwagrs'] ? You cold print all the input data to the console in the dev mode RE: Checkin Trigger Script: snapshot['metadata'] is null (although it shouldn't) - gilesfinance - 04-14-2022 greet post RE: Checkin Trigger Script: snapshot['metadata'] is null (although it shouldn't) - Diego - 04-22-2022 Hi Stefano, are you referring to the metadata field in the SObject? How do you fill in the filed at checkin time? RE: Checkin Trigger Script: snapshot['metadata'] is null (although it shouldn't) - stefanovilla - 06-09-2022 Hello there, many thanks for you answers and sorry for the late reply, I've ended up solving the issue by slightly modifying few methods: 'metadata', already argument of 'directory_checkin', is propagate to the creation of the snapshot. As a matter of fact although 'metadata' argument makes its way to 'simple_checkin' it still needed to be passed along to FileCheckin.create_snapshot(...) method and from there to Snapshot.create() where it would be finally placed within the snapshot object (snapshot.set_value("metadata", metadata )).. Doing so, data placed within the 'metadata' argument when *_checkin() is called it will be already available when the trigger is caught. Many thanks, regards, Stefano |