crmTech/ May 25, 2019/ Cloud, CRM, Salesforce Marketing Cloud/ 0 comments

Syntax: dataextension.Row.Lookup([“Field Name”],[“Hard coded value to search in field”,variable name to search the field]);

Find below code example to retrieve row from custom de.

   var @FirstName
   SET @FirstName = QUERYPARAMETER("FirstName")
  <title>Rows Lookup</title>
     <script runat=server type=text/javascript>
	var FirstName = Variable.GetFieldValue("@FirstName");
	  var de = DataExtension.Init('TEST_DE');//External Key of de
	  var rowCount = de.Rows.Lookup(["FirstName","LastName"], [FirstName,"XYZ"]);
	 if(rowCount.length >= 1)
	   FirstName = rowCount[0]["FirstName"];
	   LastName = rowCount[0]["LastName"];
	   FullName = FirstName + " " + LastName;//
	   Write("FullName" +FullName);
	 Write("<br>Exception: " + e);

Share this Post

About crmTech

Sharad is working from more than 11 years in IT industry. He has giving his technical services in CRM for telecom, automobile, retail, finance industry in Sales, Service and Marketing. He has primary skill in Siebel and Salesforce Marketing Cloud. Apart from this he has worked in Google Cloud, Wordpress blogging, SEO optimization, Short film making, mobile apps creation,logo design creation for his own interest.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.