sudhangi | Posts: 59

Get LayoutId from Layout Name

0 votes
Hi, I need to know how to get the layoutId of an existing layout that was created using eSL web portal. The requirement we have is; The user will send the layout name, document and signer info, we then need to go fetch this layout and apply it to the document that the user sent. Also while applying the layout we will need to replace the signature placeholders with the signer information that the user provides. Thanks, Sudhangi

Approved Answer
harishaidary | Posts: 1812

Reply to: Get LayoutId from Layout Name

0 votes
Hi Sudhangi, You can follow this feature guide on how to retrieve your layouts and apply them. The feature guides section is a great place to start when looking for examples. Once you've applied your layouts, you will need to retrieve your package in order to get the id of the placeholder and pass that id when creating your Signer object using the info provided by your user:
DocumentPackage pack = eslClient.getPackageService().getPackage(packageId);
		
List placeholders = pack.getPlaceholders();
		
List ids = new ArrayList();
		
for (Signer placeholder : placeholders){
			
       System.out.print(placeholder.getPlaceholderName() + " " + placeholder.getId());
	ids.add(placeholder.getId());
			
}
		
Signer signer = SignerBuilder.newSignerWithEmail("[email protected]")
	.withFirstName("John")
	.withLastName("Smith")
	.withCustomId(ids.get(0))
	.build();

eslClient.getPackageService().updateSigner(packageId, signer);

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off