I have an old scheduler that's been around for years that worked perfectly last year (v9.x) but is now broken on v11.0.2 (Professional On Site)
We only run it twice a year so I didn't notice until now.
In short I have a custom WContracts module that has a M-1 relationship with Accounts
(One Account on the WContract, many WContracts per Account)
This scheduler creates new WContract record for the subsequent contract period and it does so by copying the old Contract and changing some values for the new dates etc.
In essence:
This would correctly populate the New Contract including the related Account.
Now, suddenly, the related Account is blank.
Any ideas why the Account would not be populated?
The vardefs clearly show that WContracts has the fields for the account link (type = link), the account name (type = relate) and the account id (type = id).
What has changed in v11 that would make this stop working?
Thanks,
FrancescaS
-- Edit:
Further investigation shows that after saving the bean the id for the Account is there, the relationship can be retrieved and the id can be printed ( did a loop just to be sure, and yes, there is only one);
The account id is indeed the correct one, the account exists and is not deleted.
But when I query the tables the relationship table has no records for that contract
returns nothing.
I turned on the DEBUG on my logs and I can see the relationship being processed:
And there are no errors in the sugar or php logs.