I am trying to sync only approved Products, unfortunately below created Restrictions completely ignored by sync.
INSERT_UPDATE CatalogVersionSyncJob;code[unique=true];sourceVersion(catalog(id),version)[unique=true];targetVersion(catalog(id),version)[unique=true];syncPrincipals(uid);sessionUser(uid)
;testSyncJob;Default:Staged;Default:Online;syncUserGroup;syncUser
INSERT_UPDATE JobSearchRestriction; code[unique = true] ; job(code) ; query ; type(code)
; syncuser_restriction ; mySyncJob ; {approvalStatus} IN ({{ SELECT {pk} FROM {ArticleApprovalStatus} WHERE {code}= 'approved'}}) ; Product
INSERT_UPDATE SearchRestriction;code[unique=true];name[lang=en];query;principal(UID);restrictedType(code);active;generate
;syncuser_restriction;Sync Only Approved Products;{approvalStatus} IN ({{ SELECT {pk} FROM {ArticleApprovalStatus} WHERE {code}= 'approved'}});syncUserGroup;Product;true;true
May I know the reason of ignoring above restrictions by sync? and how to fix?
It's not recommended to use
approvalStatus.See this post from SAP
You can find below a copy-paste
As a side note, I don't know on which version you are working on. It used to not work well in older version. (mentionned on this old page that will probably get deleted)