The obvious answer is that you need to create a new record first before using Insert from Device to add a photo.
But there are a lot of details missing here as the relationships from the Order Lines to customer assets to photos is not clear.
Each Table is set up with a _KP & _KF.
Orders is a one to many with Order Lines
Order Lines is one to many with Customer Assets
Customer Assets is one to many with Photos
The first photo saves data to Customer Assets and Photos
I guess the portal is responsible that!
I guess i could:
Capture the KF's with variables
Open a layout
create new record
then return to original layout
Why would you have many customer assets linked to one line item?
Since you start from line items, you'd first have to either select or create an asset record before you can create a photo record linked to your line item record.
> Why would you have many customer assets linked to one line item?
It's not necessary. It could/should be 1 to 1.
Eliminating the Customer Assets table at this point makes sense.
It has a single Photo Container field alone with some lookup fields.
I'll dispense with the lookup fields as they duplicate information in the Line Items table.
Its purpose was to aggregate key data from other tables. I can accomplish the same with a query.