Skip to Content
Author's profile photo Rishi verma

How to create Marketing Lead Fields Mandatory with Error message ?

We can create Marketing Lead  standard/Custom fields  Mandatory with error message .

In this Scenario we are going to make Email and Phone fields Mandatory and it shows error message if try to save with null values .

Step 1 : To create Marketing Lead , we have create extension of  “Lead” Business Object .

Step 2: Create a solution ex: “MarketingFldMandt” by click right on “My Solution” .

Step 3: Now go to Solution Explorer and and right click and select “Add” -> “New Item”

           Give Any name ex: [MarketingLead].xbo and press “Add” button

Step 4:  A new Window get Opened then select following  data and press “OK”

Step 5:Now double Click on “MarketingLead.xbo” and xbo screen get opened , there add the following code  then Save and Activate

Step 7: Now we need to Enhance the screen . For that right click on “MarketingLead.xbo” and select “Enhance Screen”

Step 8: A new window Get open there Select : COD_Mkt_Prospect_QC , COD_Mkt_Prospect_QV and COD_Mkt_Prospect_TI

Step 9:  Now A new window get open after few min and there Check for “Extensibility Explorer”  there select “New Marketing Lead” and click on it and Check for “Adjust Property” . So click on Adjust Property then new window get opened and there check for Email and Phone . There you would have to select “”Email

and Phone fields Mandatory drop down field = “True”.

Step 10 : Click on apply -> then save and activate by going to “file” button and select save and Activate .

—-<< Now “*” sign will get appeared on UI for Email and Phone————————————————————->>—

–<< Now we would have to display message if try to create new marketing lead with Email and Phone —- >>—

Step 6:Now right Click on “MarketingLead.xbo” and select “CreateScripitFile”

Step 7 : A new window get opened there Select Root -> “Validation On save” and press ok

Step 8:

“Validation-OnSave.absl” file will get created .

Step 9: Now add the following code in absl

import ABSL;

import AP.Common.GDT;

var llead = this.LeanLeadIndicator.ToString();

var leanleadobj = LeanLead.Retrieve(this.UUID);

if (this.LeanLeadIndicator == true)


if (leanleadobj.IsSet())


if (leanleadobj.Address.TelephoneFormattedNumberDescription.IsInitial())


raise Mand_Fld_Phone.Create(“E”);

return false;


else if (leanleadobj.Address.EmailURI.IsInitial())


raise Mand_Fld_email.Create(“E”);

return false;




return true;

Save and Activate your Solution and refresh your UI screen to see changes :

Note :Now if you try to save New Marketing Lead with Email and Phone then it will display error message and not allow to save data .

I hope it will be helpful .

Thanks ,

Rishi Verma

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.