0

I have created a URL hacking to populate contract agreement name and account name(through contract agreement) on contract product. For some reasons account name field is showing an error 'Error: Multiple items found. Select from drop-down or click icon to refine search' and is also pulling wrong account name.

Relationship Account is parent to Contract Agreement(Lookup relationship) and contract agreement is parent to contract product(Lookup relationship)

URL hack formula

/a3L/e?CF00N4O000006wG7O={!Contract_Agreement__c.Name}
&CF00N4O000006wG7O_lkid={!Contract_Agreement__c.Id}
&CF00N4O000006wG7N={!Contract_Agreement__c.Account__c}
&00N4O000006wG7N_lkid={!Contract_Agreement__c.AccountId__c}
&retURL=%2F{!Contract_Agreement__c.Id}

enter image description here

4
  • aren't you missing the CF part of the keyprefix on line 4?
    – cropredy
    Feb 2 at 0:47
  • You don't need to escape the name values? Feb 2 at 4:01
  • Thanks @cropredy. Adding CF worked. What a rookie mistake
    – Jatin
    Feb 2 at 6:45
  • @CharlesKoppelman why do we need to escape the name values ?
    – Jatin
    Feb 2 at 6:46
0

If you look at line 4 of your URL

&00N4O000006wG7N_lkid={!Contract_Agreement__c.AccountId__c}

you'll see that the ID is not correct as the custom object Contract_Agreement__c appears (based on your other lines) to use a keyprefix of CF0.

A URL hack that references input fields on the page with invalid Ids simply ignores the URL parameter.

Remember that if you are developing in a sandbox and the fields being referenced in the URL Hack do not yet exist in PROD, the URL will need to be manually edited after deployment as the sandbox field Ids won;t match the PROD field Ids.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.