function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ezhil_kezhil_k 

What does put({#...}) and init(......) means ?

String AppNumber = lastApp.Name
Map<String, String> value = new Map<String, String>();
  value.put('{#AppNumber}', AppNumber);

 Agreement template = new Agreementtemplate();
                template.init(lastProg.Thank_You_Page__c, lastProg.Id, 'Prog__c', value);

Team WorksTeam Works

This statement Agreement template = new Agreementtemplate();---Does'nt makes sense.

PUT

Associates the specified value with the specified keyin the map. If the map previously contained a mapping for this key, the old value is returned by the method and then replaced.

If the key is a string, the key value is case-sensitive.

 

ezhil_kezhil_k

Thanks for your answer !

 

Sorry for mistake ..it is as below

 

Agreement  template = new Agreement();

template.init(lastProg.Thank_You_Page__c, lastProg.Id, 'Prog__c', value);

 

what does init () means?

 

vbsvbs

@ezhil - There should be an apex class created in your org 'Agreement'. The first line creates an instance of the class called 'template'. The 'init' should be a class function in the Agreement class. and can be accessed using the instance call

template.init(). The paramters passed seem to be values which can be best described if you investigate what init does...