I'm customising the free sales app and need to add a separate invoice address. My problem comes when I try to add a auto complete widget for the country part of the second address. I understand that the same name can't be used in both widgets so I added a new static entity in the 'Countries' espace (just a copy with a different name) However when I try to add a new variable it doesn't give me the option to select it. My question is, where do these records come from when selecting variables?
Hi Martin,

I believe you are over-complicating the problem, possibly because you're missing a couple of subtleties here.

You don't need to have a different Static Entity for countries to be able to use in more than one in a single screen. What you need is to have a different Variable to receive this additional country code (as you'll need a different variable for the address, postal code and city).

Have a look at the modified eSpace in attach. What I did was create a new entity to (optionally) have an additional address for a Company. Then on Company_Edit I do an outer join and pull in this additional address if it exists. On Save, if you specified an additional address I CreateOrUpdate this address (as well as the company, that the original eSpace already did). If you don't specify the additional address, it will delete the additional address record, if it existed.

This wasn't thoroughly tested, but should suffice as an example for you to get the gist of it. :)

Let me know,

Thanks Miguel. Going through your example now. Much appreciated.

I have this working now. Thanks again for your help. Your OML was invaluable and a great learning tool for me.


Glad it worked out for you! :)