Created
July 30, 2013 12:13
-
-
Save chadhutchins/6112401 to your computer and use it in GitHub Desktop.
Loop through each Product (Quote line items) in SugarCRM and save it. You can use something like this to update SugarLogic/Calculated fields for a module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sql = "SELECT id FROM products WHERE deleted=0"; | |
$result = $GLOBALS["db"]->query($sql); | |
while ($product = $GLOBALS["db"]->fetchByAssoc($result)) | |
{ | |
$product = BeanFactory::getBean("Products",$product["id"]); | |
$product->save(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment