sgoEma / EventManagement

0 stars 1 forks source link

[SPIKE] Change "Attendee" field API name to "Contact" on Session Registration Object #47

Open sgoEma opened 2 years ago

sgoEma commented 2 years ago

Analyze what needs to be done to change the field API name (or create a new field instead of the Attendee)

sgoEma commented 2 years ago

SP: 3

t-gul commented 2 years ago

@sgoEma @sercanEmakina @secoEmakina Issue: Change "Attendee" field API name to "Contact" on Session Registration Object Where it is Used : Reference Type | Reference Label

FlexiPage | Session_Registration_Record_Page Flow | After Insert Event Registration Flow | Before Delete Event Regs Flow | Before Save Session Registration Validations Layout | Session Registration Layout Layout | Contact (Attendee) Layout Layout | Speaker Layout Layout | Contact Layout

Problem: It is not allowed for Users to change the API name of the Objects/Fields, if it is referenced in any of the metadata. The changing of API Name without removing references can result in errors being thrown as the operation will be unsupported.

Solution 1

Removal of the usage of Field/Object in the metadata, then the components will be needed to be changed in order to refer to the new API Name of the Field.

Solution 2

We can use tools like Salesforce Extension for VS Code which enables you to search for the references in the metadata after it has been retrieved from the Org. After doing the same, you can change the references to the old API Name of the Fields.

sercanEmakina commented 2 years ago
Screen Shot 2022-04-14 at 10 12 53

@t-gul I noticed there are 2 "Before Save Session Registration Validations" flows, I guess second one is a different flow , is that correct? or is it just a typo error ?

t-gul commented 2 years ago

@sercanEmakina It's just a type error. It is fixed

sercanEmakina commented 2 years ago
Screen Shot 2022-04-14 at 10 40 49

@t-gul do we have a flow named "Prevent Duplicate Session Regs" ? is that flow being actively used? if so we need to check what kind of processes are executed in the flow, we might need to move the logic inside that flow to Before Save Session Registration flow or a new flow that runs in an appropriate trigger context.

Let's discuss it in the daily meeting.

t-gul commented 2 years ago

@sercanEmakina "Prevent Duplicate Session Regs" flow is not actively used The flow is deleted from related org and related comment is updated.

sgoEma commented 2 years ago

@t-gul Thanks for the analysis. Are you sure that we must change the references for this change?

t-gul commented 2 years ago

@sgoEma Yes I'm sure. If we don't change them we can't see them at layout or flexipage, and related flows can result in errors.

sgoEma commented 2 years ago

@t-gul Can you please try to change the name of the field directly in a test environment and share the results?

t-gul commented 2 years ago

@sgoEma When I changed the API name of field, It's automatically changed in flows and it doesn't result in errors

We must not change the references for this change according to test which I did.

But in documentation said that "The changing of API Name without removing references can result in errors being thrown as the operation will be unsupported"

https://help.salesforce.com/s/articleView?id=000314907&type=1

sgoEma commented 2 years ago

@t-gul I could not totally understand your plan about this. So the references should be removed first and then the field name should be changed is that correct? So will we implement the functions again after changing the name?

t-gul commented 2 years ago

@sgoEma Sorry for the confusion, As we mention on meeting, we can change "Attendee" field API name to "Contact" on Session Registration Object and it will be changed in related flows After the changing, tests case must be opened and tests must be done for related flows.

sgoEma commented 2 years ago

@t-gul thanks! I'm gonna move the ticket under "Ready for Deployment".