One of our customer needs a LOT of udef-fields and since SuperOffice has restrictions to how many e.g. DateTime-fields you can have I started putting new fields in an extraTable in Service instead. For this i have create a custom screen that shows all the udefs from project and all the udefs from my custom table, to make it easier for them to maintain.
I create a map of all the udef-values that are supposed to go to the udef-fields on the project and save it like this:
NSProjectEntity pEntity = pAgent.GetProjectEntity(projectId.toInteger());
pEntity = pAgent.SaveProjectEntity(pEntity);
This works well for existing projects but new ones dont have a row in udprojectSmall.. This makes the code fail, as it fails to 'update the row', and im wondering why it doesnt create a new row if there is none..
I could possibly fix this with a trigger in the database but i want this to be 'online-friendly' to have a working example for the future.
Is there any way to create this row in udprojectSmall with some 'standard stuff'? I guess i can just insert it with a searchengine but that is my last resort..