cancel
Showing results for 
Search instead for 
Did you mean: 

Error while creating Marketing lead

former_member207526
Participant
0 Kudos

HI  , I am facing issue while creating Marketing lead .This error start occurring when i make Account fields Mandatory by enhancing Customer BO .Now  I am able to create Account and Contact but when I try to creating marketing lead then it will give exception . Can Any one help me .

Accepted Solutions (0)

Answers (1)

Answers (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Rishi,

Can you provide some more details about the error / exception?

Thanks,

   Horst

former_member207526
Participant
0 Kudos

Here , You can see exception . I have Entered all Mandatory Fields  and when i press save then , i got that Exception .

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Rishi,

If not all mandatory fields are filled a message should come up. But not an exception.

You can create an incident direct or try to find out which field triggers the dump by removing the mandatory flag element by element.

HTH,

   Horst

former_member207526
Participant
0 Kudos

Hi Horst ,

As I explained , I have created Extension Object for Customer BO . To create Account Fields Mandatory (City & State) and write Code in Script file (root -> Validation on Save)

Is there any possibility that this code is affecting ? As Marketing Lead is associated with Account .

import ABSL;

if(this.AddressInformation.Address.CommunicationPreference.ToParent.DefaultPostalAddressRepresentation.GetFirst().CityName.Trim().IsInitial())

{  //3

raise Error_Message1.Create("E");

return false;

}//3

else

{//4

if(this.AddressInformation.Address.CommunicationPreference.ToParent.DefaultPostalAddressRepresentation.GetFirst().RegionCode.IsInitial())

{//5

raise Error_Message2.Create("E");

return false;

}//5

else

{//6

return true;

}//6

return true;

}//4

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Rishi,

Sure.

Youre ABSL code travers some associations

  • this -> AddressInformation
  • AddressInformation -> Address
  • Address -> CommunicationPreference
  • Root -> DefaultPostalAddressRepresentation

If any of those associations are not set, an execption (with a backend dump) like yours is raised.

You can (in general: should) check, if an associatiosn is set (function "isSet()" ) before using it.

HTH,

   Horst

former_member207526
Participant
0 Kudos

I have checked that there is a field that is returning that  Marketing Lead is creating or not (True 0r False) . I have used and its working .

thanks for your active response .