Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Getting a form to initialize a webservice on opening.

Avatar

Former Community Member

Hi There,  I would like to know how it would be possible to  get a newly created form to connect to a web service and  retrieve data from it as soon as the PDF for is opened.  Im assuming a would use the doc Ready but do not know which code  will allow an automatic communication to happen without having to  click a button.  Thanks  Joey

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Doc Ready ...Initialize is too early

Paul

View solution in original post

4 Replies

Avatar

Former Community Member

You can hide (make it invisible) the web service submit button on the form and programmatically click it by using submitButtonName.execEvent("click").

Paul

Avatar

Former Community Member

Does submitButtonName.execEvent("click")  still go into the docReady for it to be automatic

or should I place it into Initialize?

Thanks

J

Avatar

Correct answer by
Former Community Member

Doc Ready ...Initialize is too early

Paul

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----