Guest User

Untitled

a guest
Nov 22nd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. List<Product_for_Sample_Literature__c> ProductLineItems =[SELECT id,Sample_Literature_Request__c,Batch_Information__c,Detail__c,Product__r.Name,Quantity__c,Product_APN__c from Product_for_Sample_Literature__c WHERE Sample_Literature_Request__c ='a0Eb0000001UVLF'];
  2.  
  3.  
  4. If list size has one, the XMl should like this.And assign the values of list to below elements
  5. <Items>
  6. <SFDCLineID>1</SFDCLineID>
  7. <Material>ProductLineItems.Batch_Information__c</Material>
  8. <Quantity>ProductLineItemsQuantity__c</Quantity>
  9.  
  10. </Items>
  11.  
  12.  
  13. If list size has two, the XMl should like this.
  14. <Items>
  15. <SFDCLineID>1</SFDCLineID>
  16. <Material>ProductLineItems.Batch_Information__c</Material>
  17. <Quantity>ProductLineItemsQuantity__c</Quantity>
  18.  
  19. </Items>
  20.  
  21. <Items>
  22. <SFDCLineID>2</SFDCLineID>
  23. <Material>ProductLineItems.Batch_Information__c</Material>
  24. <Quantity>ProductLineItemsQuantity__c</Quantity>
  25.  
  26. </Items>
  27.  
  28. the list size has 3 ,
  29.  
  30.  
  31. <Items>
  32. <SFDCLineID>1</SFDCLineID>
  33. <Material>ProductLineItems.Batch_Information__c</Material>
  34. <Quantity>ProductLineItemsQuantity__c</Quantity>
  35.  
  36. </Items>
  37.  
  38. <Items>
  39. <SFDCLineID>2</SFDCLineID>
  40. <Material>ProductLineItems.Batch_Information__c</Material>
  41. <Quantity>ProductLineItemsQuantity__c</Quantity>
  42.  
  43. </Items>
  44.  
  45. Items>
  46. <SFDCLineID>3</SFDCLineID>
  47. <Material>ProductLineItems.Batch_Information__c</Material>
  48. <Quantity>ProductLineItemsQuantity__c</Quantity>
  49.  
  50. </Items>
Add Comment
Please, Sign In to add comment