Quantcast
Channel:
Viewing all articles
Browse latest Browse all 4235

Re: creating an archive

$
0
0

Just to make sure you didn't miss this: the following will return a DataList:

$Archive = Archive::get()->filter(array('QuoteID' => $this->ID));

To get the actual DataObject, do:

$Archive = Archive::get()->filter(array('QuoteID' => $this->ID))->first();

Have you tested if your code ever gets to the if(!$Archive) bit?

Once you get the write going, if I understand this correctly, it should be easy to do something like

$Archive->someField = $this->someFunction();


Posted to: creating an archive | Show Thread | Post Reply


Viewing all articles
Browse latest Browse all 4235

Trending Articles