afficher champ de Gestion commerciale dans CRM

Modérateurs: Super-Apogea, Super Modérateur

afficher champ de Gestion commerciale dans CRM

de EDDE » Ven 24 Juil 2009 17:48

Bonjour,

Nous souhaitons afficher la valeur d’un champ appartenant à la base de Sage Gestion Commercial ligne 100 dans Sage CRM.
Pour cela, nous avons créé un script dans Administration/Personnalisation/Société/ « nom d’un champ » /CreateScript:
We would like to display in SAGE CRM a value(field – the revenue of a customer in 2009) which is coming from the ERP SAGE Line 100. For that we wrote a script to get the value but it does not work:

var strSQL = "SELECT CRM_PROFIL.dbo.Company.Comp_Name, CRM_PROFIL.dbo.Company.comp_codecomptable, PROFIL2.dbo.F_COMPTET.CAHTNET2009
FROM CRM_PROFIL.dbo.Company LEFT OUTER JOIN
PROFIL2.dbo.F_COMPTET ON PROFIL2.dbo.F_COMPTET.CT_NUM = CRM_PROFIL.dbo.Company.comp_codecomptable
where CRM_PROFIL.dbo.Company.comp_codecomptable = '"+eWare.getContextInfo("CRM_PROFIL.dbo.Company","CRM_PROFIL.dbo.Company.comp_codecomptable")+"'";
var Query = eWare.CreateQueryObj(strSQL);
Query.SelectSQL();
if (!Query.bof)
{
errorstr = "Test affichage du CA - "+Query(PROFIL2.dbo.F_COMPTET.CAHTNET2009);
//defaultValue = parseFloat(Query(PROFIL2.dbo.F_COMPTET.CAHTNET2009));
value = Query(PROFIL2.dbo.F_COMPTET.CAHTNET2009);
}

if anybody has some ideas to solve this problem i twill be great

Mais ce script retourne l’erreur suivante :
and the error code is the following :
comp_achat_n jscript error: Constante chaîne non terminée Line: 2 Char: 148

Pourriez-vous nous aider ?

Cdlt,

Benoit EDDE
Profil informatique
Posteur néophyte
Posteur néophyte
 
Messages: 1
Inscription: Ven 24 Juil 2009 17:43

Re: afficher champ de Gestion commerciale dans CRM

de _mika » Jeu 20 Aoû 2009 17:53

Bonjour,

Ce message stipule une erreur pour une chaîne de caractères.
Comme le dit la documentation jScript à ce sujet : "
L'erreur la plus courante rencontrée est :
Constante de chaîne non terminée
et aussi :
';' attendu
) attendu

Ce message apparaît dans ce cas simple :
var chaine="Bonjour;
Ici, l'erreur est simple et le message est adapté, la chaîne n'est pas terminée par un marqueur de fin de chaîne. Pour corriger, il faut écrire :
var chaine="Bonjour";

Il y a naturellement des cas de chaîne plus complexes, en particulier quand les marqueurs de chaînes (" et ') sont alternés :
alert("Il m'a dit : "Bonjour"")
L'objectif est d'afficher un message contenant Il m'a dit : "Bonjour"
La difficulté est ici d'afficher un caractère qui sert de marqueur de chaîne. Il existe de nombreuses solutions pour répondre au besoin :
alert("Il m'a dit : \"Bonjour\"")
alert('Il m\'a dit : "Bonjour"')
alert("Il m'a dit : "+'"Bonjour"')

"
Posteur néophyte
Posteur néophyte
 
Messages: 1
Inscription: Jeu 20 Aoû 2009 17:51


Qui est en ligne
Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 0 invités
cron