Skip to Content
0
Former Member
Jun 16, 2016 at 06:08 AM

How to Create Lead from Webpage

192 Views

Hi ,

Please help me on this and I am new to SAP C4C SDK

My idea is first I want to create lead by hard coding the values

Then from xml , xl sheet or some other webpage , the data would be reading to create lead dynamically.

I have created custom lead.xbo

[Extension] businessobject AP.CRM.Global:Lead {

node Party {

}

node Item {

}

action createLeads;

}

Please following code for Action-createleads.absl.

var elLead_Root: elementsof Lead;

var instLead;

elLead_Root.Name.content = "Borras2"; // subject

var elLead_Party: elementsof Lead.Party;

var elLead_Item: elementsof Lead.Item;

var cutDate= Date.ParseFromString("20160530");

elLead_Root.Name.content="borras";

// Lead: create new instance

instLead = Lead.Create(elLead_Root);

var btd = this.BusinessTransactionDocumentReference;

//var LeanLead:crm:elementsof LeanLead;

var eleLeanLeadRoot :elementsof LeanLead;

eleLeanLeadRoot.Lead.Name.content="borras1";

eleLeanLeadRoot.Person.FamilyName="Borra1";

eleLeanLeadRoot.Person.GivenName="Srinivas1";

eleLeanLeadRoot.Organisation.FirstLineName="IBM1";

//eleLeanLeadRoot..= cutDate;

//eleLeanLeadRoot.

LeanLead.Create(eleLeanLeadRoot);

Please find the following screen short when I am saving I am getting validation error like start date mis

sing

Thanks

Srinivas Borra

Attachments

LeadCreate1.png (38.8 kB)