cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Dummy Contact - set country code as null ( Please select.. value)

Former Member
0 Kudos
194

Hi expert,

The purpose of my requirment is to add new contact from supplier and then add dummy contact infos via toolbar scirpting.

Here steps to follow :

1- i click on the Add contact : when i click on the add contact button from supplier , i see country code of contact is filled in automaticallywith value like "United States" value.

2- i click on the Add dummy contact via toolbar - scripting : i would like to set country code as null (Please select value) instead default value ( "United States" value)

i am using the following code scripting:

doc.setCountryObjRef(null);

After clicking on the toolbar, thefield country - dropdown has disappeared from contact page.

why it has been diappered?

why "Please select" value is not displayed ?

could you correct my scripting code ?

Thanks for your help.

Kind Regards,

Anacia

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mudit_UCB,

Many thanks for your quick reply and for your proposal solution.

Indeed, this is normal behaviuor of method doc.setCountryObjRef(null);

I tried another way to set 'Please select' value as default :

'Please select' value is already a value from Country value list value and no need to create new one.

I modified my scripting code by setting the the default value of Country as 'Please select" value

Iit is working fine and country is fille d in automatically with 'Please select' value after clicking on the toolbar - Add Dummy contact button.

Kind Regards,

Anacia

Former Member
0 Kudos

Hi Anacia

doc.setCountryObjRef(null) method is working fine.When executed, this method would remove the dropdown. That is normal behaviour

For what you are looking for, I can suggest an alternate approach

1. In value list value: Country, create a entry with display name as "null (Please select value)"

2. Create script definition to include this entry instead of default "United States" (which is coming from enterprise context)

This way you can maintain the dropdown and it would not dissappear as was happening with doc.setCountryObjRef(null) method

Regards

Mudit Saini