cancel
Showing results for 
Search instead for 
Did you mean: 

Set Default Value for Standard Field - New Phone Call Activity - Direction

keynesa85
Participant
0 Kudos

Hi Experts,

I am trying to set default value "Inbound" for field, "Direction" under Phone Call Activity. Tried to maintain the initial value for the data element in UI Designer but when i save the value i entered vanishes.

If anyone has achieved setting default value for a standard field, please share your experience. Thanks

Screenshots attached.

Regards,

Keynes Austin

Accepted Solutions (1)

Accepted Solutions (1)

former_member186648
Active Contributor
0 Kudos

Hi,

You cannot change standard UI directly, you will have to make change only via Extensibility explorer.

Alternatively, you could create XBO on the standard BO and create AfterModify event and then set the value for the field in the event .

Thanks, Pradeep.

keynesa85
Participant
0 Kudos

Hi Pradeep,

Thank you. Would you please post the steps to do this using Extensibility Explorer.

Regards,

Keynes Austin

former_member186648
Active Contributor
0 Kudos

Hi,

I was stating it in general you can only make changes to standard UI via extensibility explorer.
But, setting default value to standard field is not possible even in extesibility explorer , you could follow my second approach.

Thanks, Pradeep.

keynesa85
Participant
0 Kudos

Hi Pradeep,

Thank you, got it.

Regards,

Keynes Austin

keynesa85
Participant
0 Kudos

Hi Pradeep,

Event AfterModify doesn't seem to work for my requirement as it always keeping/saving the default value even though user wants to change to the other value. If possible please tell how this could be included when the user clicks "New" button in OWL. Thanks. Please give reference to any blog or SDK documentation to achieve this. Thanks for your help.

Regards,

Keynes Austin

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Keynes,

The "InitiatorCode" at the Root node of the Activity has no public write accesss (check it in the Repository Explorer).

Therefore you cannot change the value, neither in the Extensibility Explorer nor in the ABSL code.

Sorry,

  Horst

keynesa85
Participant
0 Kudos

Hi Horst,

When i set a value for "InitiatorCode" under AfterModify event, i was able to save the transaction with the value i set. The issue is if user changed the default value i set through SDK it does not hold the user set value and takes the default value i set and get saved.

I am looking for the right place to put the code to set the default value, when user clicks the new button the value should display the value i set through code, if user changes it should get changed and saved else it should get saved with the default value set through code.

Please help.

Regards,

Keynes Austin

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Keynes,

That is strange: Modifying the "InitiatorCode" in an AfterModify should not be possible at all.

Bye,

    Horst

ludger_bunger
Participant
0 Kudos

Hi Keynes,

could you please provide the code you used?

Best regards,

Ludger

keynesa85
Participant
0 Kudos

Hi Ludger,

Thank you

Regards,

Keynes

former_member186648
Active Contributor
0 Kudos

Hi Keynes,

You are trying to update Activity -> PhoneCallActivity -> InitiatorCode
This is PSM write enabled, so you are able to edit.

1) But, this field is of type code which accepts values 1, 2 and 3 only, so your value should be one of these.

2) also you could try to edit other acivity, may be the current activity you have choosen cannot be edited.

Thanks, Pradeep

ludger_bunger
Participant
0 Kudos

Hi Keynes,

Two observations:

1.

AfterModify for this would be placed best on the node where the InitiatorCode itself is located, i.e. the parent of BusinessTransactionDocumentReference.

2.

If you like to set the default value only once, you need to surround your code with checks ensuring that this happens only once.

Thus you either could add an


if (this.InitiatorCode.IsInitial()) {

     this.InitiatorCode = "2";

}

or add an indicator "initialized" which you set after initializing and only set if this indicator is not set.

Best regards,

Ludger

Answers (0)