Rename all objects in a within a folder

Rename all objects in a within a folder

Comments

  • I copied a project folder using the “Copy Designer Folder” feature and wanted to change the names of everything because we use a moniker in our object names so that we don’t get confused by similar things in several different projects in pick menus and other places when we are building things.

    So, everything that started with the moniker “PInv” I wanted to change to “PT”. I successfully did this with this query, but I wanted to make sure I wouldn’t have any unintended consequences. Maybe I could do this with a flow? Can anyone help me out so I don’t break a bunch of stuff. Thanks.

    UPDATE element_registration
    SET entity_name = REPLACE(entity_name, PInv, PT)
    WHERE component_registration_id in (select er.component_registration_id
    from element_registration er
    inner join entity_folder ef on er.entity_folder_id = ef.folder_id
    left join module_resource mr on mr.entity_id = er.component_registration_id
    where er.entity_name like PInv% and mr.entity_id is null
    and er.entity_name is not null
    and ef.full_path not like Paper Invoices%
    -- and er.entity_name !=mr.entity_name
    )
    ;

  • Hi Austin,

    This change would not cause an issue. However, "module_resource" and "module_resource_dependency" records probably still have the old names. You may need to check these records and do necessary changes as well.

    Also, you need to restart the Service Host Manager to see changes in UI.

    If you have any questions please let me know.

    Regards
    [i]edited by kenan@decisions.com on 11/13/2019[/i]

Sign In or Register to comment.