cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Cloud For Customer Contact email and Phone field mandatory

Former Member
0 Kudos

Hi Experts,

I need help regarding the Contact email and Phone mandatory in cloud when click on save ..

Can anyone suggest me which Business Object i need to enhance ?

What is the Contact email and Phone field path to check the initial in ABSL script ?

I have enhance the Business Partner Business Object for complete the above scenario and enhance the COD_ContactQuickCreate Screen and ValidateOnSave Event i have done this code for check email id

f (this.CurrentDefaultAddressInformation.Address.DefaultEMail.URI.content.IsInitial())

{

Error_Message.Create("E");

return false;

}

else

{

is it correct to check the contact email ?

Please anyone have any idea about this and how its possible ....

Many Thanks,

Mithun Suthar

Accepted Solutions (1)

Accepted Solutions (1)

vinodkumar_kommineni
Active Contributor
0 Kudos

Hi Mithun,

What you did is correct but the fact is, this code would be called for all the business partners. Technically Customers, Partners, Contacts, Partner Contacts are all Business partners including Employees.

So you should have a check on for which type this code should be called.

You can check the CurrentBusinessCharacters Node to find an indicator named "ContactPersonIndicator" which should ideally fulfill your requirement. You should have this check added to your if condition.

Regards

Vinod

Answers (2)

Answers (2)

barb_judd
Participant
0 Kudos

Hi Mithun,

Are you making them them required after the account number is added?  I am trying to do as you,but the email and phone aren't editable until you attach to an account.  So my question is do you have any reference in the code saying in some way that the fields are 'editable'?  Otherwise I found out that you can get the error saying required but at initial quick create there is no way to edit phone and email.  So I am curious how you handle that.

Best regards,

Barb

Former Member
0 Kudos

Hi Mithun,

I think that's the correct path. Have you tested it? Did it work?

Best regards,

Fernando Giroleti

Cloud Service Center AMEA

Former Member
0 Kudos

Hi Fernando Giroleti,


I tried but it did not work for the mention code ....


I have also make change on COD_Contact_QC screen those 2 field as mandatory from Extensibility Explorer and Save and Activate Successfully.


I dont know where exactly the problem.


Many Thanks

Mithun Suthar


vinodkumar_kommineni
Active Contributor
0 Kudos

Hi Mithun,

Hope you have activated the BO as well after creating the script file. Also have a break point set and see if this code is getting triggered.

Regards

Vinod

Former Member
0 Kudos

Yes i have tried with debugging and the break-point is getting triggered but when cursor check the if condition and press F5 then cursor come out of if block and contact save without check the Email is initial .

Regards,

Mithun

vinodkumar_kommineni
Active Contributor
0 Kudos

Hi Mithun,

I think you are also an ABAPer like many!! please use F10 instead of F5... hope SAP will change this to avoid confusion

Regards

Vinod

Former Member
0 Kudos

Hi Vinod ,

i change the path for check the email for contact

this.CurrentDefaultHasContactPerson.ToParent.DefaultHasContactPersonBusinessPartnerRelationship.ContactPerson.ContactPersonWorkplaceAddressInformation.ContactPersonWorkplaceAddress.DefaultEMail.IsSet().ToString() == " "

its going into true and cursor comes with error on the screen but its checking for multiple times and after fill the email address gives the same error...

Can anyone comment of this problem?

Regards,

Mithun

Former Member
0 Kudos

Hi Mithun,

Your first script version seems to be correct, you just forgot a "raise" before the message creation.

In your second version right above you are converting a boolean to String. Try to use your first approach. If possible, provide more details with screenshots.

Consider Vinod suggestion to check the type code to make sure you are checking only for Contacts.

Best regards,

Fernando