Answer
If you are a Swiss national or EU/EFTA citizen and your Swiss employer temporarily posts you to an EU or EFTA state, you generally remain subject to Swiss social security legislation. As a rule of thumb, postings may not be longer than 24 months, but can be extended if necessary (CH–EU and CH–EFTA posting fact sheets).
Prior to your departure, your employer must apply to their OASI office for a posting certificate. If the application is approved, the OASI office will issue an A1 certificate, which your employer will pass on to you.