Question6Replies3007Views Avinash.Haridasu Member since 2014 264 posts Morgan Stanley Posted: May 27, 2016Last activity: June 5, 2016 Closed How to save as a rule using activityI have a requirement to move several images to another ruleset.I have tried to lock the Rule-File-Binary rule and tried to update the pyRuleset and pyRulesetVersion but failed as we cannot lock the Rule-File-BinaryI'm looking for some activity code which will save as the existing rule to ruleset desired and delete it from the source ruleset. Pega Customer Service ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 4 years agosahup1 PEGA replied to Avinash.HaridasuHi Avinash, Good morning!could we try the following steps?build Rule-File-Binary pxResults list using RD created either in class 'Rule-File-Binary' or 'Data-Rule-Summary'iterate through the pxResults Open the record using pzInskey on a temp pageOn the temp page call pxUpdateRecord by passing the appropriate parameters (Ruleset name, ruleset version, commit & byPassBestRuleset should be set to true)Notes: since it is an one time activity, please ensure the following checksno private edit rule exists if exists need to exit the activitythe original record is not in checkedout state if need to auto checkout the rule on save as it will through error...exit the iteration if rule already exist in the target rulesettarget ruleset and version are openno ruleset restriction is applied on class rule forms of advanced tabdelete the original ones if not required [pxDeleteRecord] if they are in locked rulesets need to program it again...[.pyVersionSecure & .pyVersionPassword]otherwise we need to standardize calling ... pxChooseBestRuleSet (for ruleset)pzIsRuleSetVersionLocked (to check if version is locked)pxChooseBestRuleSetVersion (to get highest open version of the ruleset)pzGetNextRuleSetVersion (to get next ruleset version in open state)Please share your comments/observations, Thank you!psahukaru Posted: 4 years agoAvinash.Haridasu Morgan Stanley replied to sahup1Thanks PhaniThe pxUpdateRecord works as expected. It has saved as the rule to the expected ruleset..However i'm unable to delete the record using pxDeleteRecord from the unlocked source ruleset version.The step page is same as the page given for pxUpdateRecord Posted: 4 years agoAvinash.Haridasu Morgan Stanley replied to Avinash.HaridasuIt works well if we use any one of the pxDeleteRecord or pxUpdateRecord.. The issue is when both are used in the same activity Posted: 4 years agosahup1 PEGA replied to Avinash.Haridasuplease try Rule-.Delete or Obj-Delete/Obj-Delete-by-Handle and share your observations, Thank you! Posted: 4 years agoAvinash.Haridasu Morgan Stanley replied to sahup1Obj-Delete has worked.. thanks..But i have one more issue..--> Saving images from top ruleset in the stack to the bottom ruleset works. Obj-Open would return the image on the top of the stack and i delete it.. which is as expected.--> However, the other way around does not work.. I mean saving as from the bottom ruleset to the top ruleset. Because Obj-Open returns the image in the top most rulesetAny thoughts? Posted: 4 years agosahup1 PEGA replied to Avinash.Haridasu>>> I mean saving as from the bottom ruleset to the top ruleset.API pxUpdateRecord should be passed with record page. if the page is well constructed we should be able to save the rule.>>> Obj-Open returns the image in the top most rulesettrue, if we can build the pxResults (filter by ruleset, if required) we should be able to delete the specific version from specified ruleset. It only needs the right pzInskey.