How to Populate a Case field in a Workflow Rule action without context ?

Hi,

I am using a version 7.1 and I want to get a case field automatically populated from with the value of the same field from the Company that owns the ticket.

Problem is :

it is working when I create my case from the Company, thanks to the "Context", but when users create Cases from no context (from My CRM menu for example), my Javascript is not working anymore.

What I did :

Add a "Create Script" on the field "case_id_tiers" in my Workflow rule "New Case" which does the following :

var strIdTiers = eWare.GetContextInfo("Company", "comp_id_tiers");

DefaultValue = strIdTiers ;

What I want to do and can't find on the forum after an hour or search :

When no context is available, I want my field to be populated AFTER the Company SSA field of the Case screen has been selected.

I thought about adding something in the "OnChange Script" value of the "case_primarycompanyid" field in the "CasesWebPicker" screen, but the issue is the same, there is no context available when the page is loaded...


So I don't know how to deal with that...

Should I use some Custom content script + ajax or something ?

Could someone give me an example or some correct to move on ?

Thank you