web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Opening card from third party applicaiton

(0) ShareShare
ReportReport
Posted on by 165

HI

I am looking to do some integrate from a C# application into Dynamics GP so that I can open a specific card.

In the example below I am trying to open a Debtor Maintenance card to a record with Debtor ID AMERICAN0002.

The Sanscript below opens the Debtor card, then opens the Customer lookup and populates this with the ID. I cannot work out how then to automatically close the lookup window. I have to manually close it, and it then opens the card to the correct record.

"open form RM_Customer_Maintenance; " +

"open form Customer_Lookup return to 'Customer Number' of window 'RM_Customer_Maintenance' of form 'RM_Customer_Maintenance'; " +

"call INITIALIZE of form Customer_Lookup, 1,0,\"AMERICAN0002\",\"\",\"\",\"\",\"\",\"\";"

I am calling this using the Dynamics Continuum Integration Library ActiveX component:

Dynamics.Application  gpapp = new Dynamics.Application();

gpapp.ExecuteSanscript();

Can anybody suggest what I need to change in the Sanscript to make this fully automatic? Also am I approaching this in the best way or are there any other suggestions?

Regards

Ben

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Ben

    Have you considered setting the Customer Number field directly, without using the lookup?  You would have to know the Customer Number prior to opening the form, but you could just simply pass in that value to the field, and then run the Customer Number change script.

    Sanscript example:

    open form RM_Customer_Maintenance;

    set 'Customer Number' of window RM_Customer_Maintenance of form RM_Customer_Maintenance to 'XXX'; (your value or field containing the customer number.)

    run script 'Customer Number' of window RM_Customer_Maintenance of form RM_Customer_Maintenance;

    Hope this helps,

    Aaron

  • cowlinb6 Profile Picture
    165 on at

    Thanks Aaron, this worked a treat. The Sanscript documentation is not that clear.

  • Community Member Profile Picture
    on at

    Ben

    Glad I could help!

    Aaron

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans