on 06-21-2016 11:27 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.