I am geeting error while creating new record, I am using 2 tables Building and organization tables. Building Id is showing zero value while debbugging it is not storing any value and getting this error. Anybody please help on this.

Hi Anusha,

Does the Building Entity have a foreign key to your Organization Entity? Can you show us how it's defined?

If you can share screenshots of your save action, that will be very useful in diagnosing the issue as well.

Hi Anusha,

Select the CreateUpdateBuilding on the flow, press F8 to add a breakpoint and press Start Debugging button to inspect what is happening.



Maybe some Foreign Key is null in the Record

 I did debug. Now I am able to update record but not able to create new record. I dont know why could you help me on this. When i am creating recording it is updating previous record. See  below for my entity , preparation, save 


Hi Anusha,

Select the CreateUpdateBuilding on the flow, press F8 to add a breakpoint and press Start Debugging button to inspect what is happening.



Maybe some Foreign Key is null in the Record



Hi,

  The behavior of "Create or Update" Action is the first checking the building.id = Nullidentifier if it is true it creates a new record else it will update record. So you need to check building.id in your debugging. 

Anusha Pakalapati wrote:

I am geeting error while creating new record, I am using 2 tables Building and organization tables. Building Id is showing zero value while debbugging it is not storing any value and getting this error. Anybody please help on this.

Hi Anusha,

Please share sample OML file, so i can help you.

Best Regards,

Amit Verma


Hi Anusha, 

Your Join coindition on your aggregate Organization.PartyId = Building.OrganizationId.


would it be Organization.Id = Building.OrganizationId ?

Maybe you may have 2 attributes of Type Organization Identifier and one of them is missing or mandatory.


Moreover, you are reffering data from Form (buildingForm.Record.Building.Id) in our aggregate. Do you use this aggregate to build your form? 

If you need create a new building for that organization you could simplify your buildindId Filter to Building.Id = BuildinID  and you may choose to  change your filter condition to left join (with or without).



Posts above me all make sense. But my guess would be you need the form record and not the get from your preparation.


This all assuming you use the id as input for your aggregate.

Amit Verma wrote: OML File Attached

Anusha Pakalapati wrote:

I am geeting error while creating new record, I am using 2 tables Building and organization tables. Building Id is showing zero value while debbugging it is not storing any value and getting this error. Anybody please help on this.

Hi Anusha,

Please share sample OML file, so i can help you.

Best Regards,

Amit Verma




Hi Anusha,

In the CreateOrUpdateAction select BuildingForm.Record.Building 


And do an assign to the mandatory field LastUpdatedBy