function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bansal 4Bansal 4 

metadata api for page layout deletion is not working properly

Hi,
I written apex code using metadata api to delete page layout from custom object in managed package and added new layout. Old Layout is deleted and new layout is properly assigned to all profiles.
However, when I try to open up a record and view it, it is still using the prior page layout. If I go back into settings/profiles/ and edit/save the assignment (make no changes, just edit/save) it appears to work. So I must be missing a step when I am deleting the Page Layout?  Any help would be very much appreciated!